ffcx.element_interface
Finite element interface.
Functions
|
Get the Basix index of a derivative. |
|
Convert and element to a FFCx element. |
|
Create an FFCx element from a UFL element. |
|
Create a quadrature rule. |
|
Map points from a reference facet to a physical facet. |
|
Get the vertices of a reference cell. |
Classes
|
A quadrature element. |
- class ffcx.element_interface.QuadratureElement(element: FiniteElementBase)[source]
Bases:
_BasixElementBase
A quadrature element.
Initialise the element.
- property cell_type: CellType
Basix cell type used to initialise the element.
- property dim: int
Number of DOFs the element has.
- property discontinuous: bool
True if the discontinuous version of the element is used.
- property dpc_variant: DPCVariant
Basix DPC variant used to initialise the element.
- property element_family: ElementFamily
Basix element family used to initialise the element.
- property entity_closure_dofs: List[List[List[int]]]
DOF numbers associated with the closure of each entity.
- property entity_dofs: List[List[List[int]]]
DOF numbers associated with each entity.
- property family_name: str
Family name of the element.
- get_component_element(flat_component: int) Tuple[_BasixElementBase, int, int] [source]
Get element that represents a component of the element, and the offset and stride of the component.
- Parameters
flat_component – The component
- Returns
component element, offset of the component, stride of the component
- property interpolation_nderivs: int
The number of derivatives needed when interpolating.
- property lagrange_variant: LagrangeVariant
Basix Lagrange variant used to initialise the element.
- property num_entity_closure_dofs: List[List[int]]
Number of DOFs associated with the closure of each entity.
- property num_entity_dofs: List[List[int]]
Number of DOFs associated with each entity.
- property num_global_support_dofs: int
Get the number of global support DOFs.
- property reference_geometry: ndarray[Any, dtype[float64]]
Geometry of the reference element.
- property reference_topology: List[List[List[int]]]
Topology of the reference element.
- tabulate(nderivs: int, points: ndarray[Any, dtype[float64]]) ndarray[Any, dtype[float64]] [source]
Tabulate the basis functions of the element.
- Parameters
nderivs – Number of derivatives to tabulate.
points – Points to tabulate at
- Returns
Tabulated basis functions
- property ufcx_element_type: str
Element type.
- ffcx.element_interface.basix_index(indices: Tuple[int]) int [source]
Get the Basix index of a derivative.
- ffcx.element_interface.convert_element(element: FiniteElementBase) _BasixElementBase [source]
Convert and element to a FFCx element.
- ffcx.element_interface.create_element(element: FiniteElementBase) _BasixElementBase [source]
Create an FFCx element from a UFL element.
- Parameters
element – A UFL finite element
- Returns
A Basix finite element
- ffcx.element_interface.create_quadrature(cellname, degree, rule) Tuple[ndarray[Any, dtype[float64]], ndarray[Any, dtype[float64]]] [source]
Create a quadrature rule.
- ffcx.element_interface.lru_cache(maxsize=128, typed=False)[source]
Least-recently-used cache decorator.
If maxsize is set to None, the LRU features are disabled and the cache can grow without bound.
If typed is True, arguments of different types will be cached separately. For example, f(3.0) and f(3) will be treated as distinct calls with distinct results.
Arguments to the cached function must be hashable.
View the cache statistics named tuple (hits, misses, maxsize, currsize) with f.cache_info(). Clear the cache and statistics with f.cache_clear(). Access the underlying function with f.__wrapped__.
See: http://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)