symfem.mappings
¶
Functions to map functions between cells.
Module Contents¶
Functions¶
|
Map functions. |
|
Map functions, scaling by the determinant of the jacobian. |
|
Map H(curl) functions. |
|
Map H(div) functions. |
|
Map matrix functions. |
|
Map matrix functions. |
|
Inverse transpose of identity(). |
|
Inverse transpose of l2(). |
|
Inverse transpose of covariant(). |
Inverse transpose of contravariant(). |
|
|
Inverse of identity(). |
|
Inverse of l2(). |
|
Inverse of covariant(). |
|
Inverse of contravariant(). |
|
Inverse of double_covariant(). |
Inverse of double_contravariant(). |
|
|
Get a mapping. |
- exception symfem.mappings.MappingNotImplemented¶
Bases:
NotImplementedError
Exception thrown when a mapping is not implemented for an element.
- symfem.mappings.identity(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.AnyFunction ¶
Map functions.
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.l2(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.AnyFunction ¶
Map functions, scaling by the determinant of the jacobian.
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.covariant(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.AnyFunction ¶
Map H(curl) functions.
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.contravariant(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.AnyFunction ¶
Map H(div) functions.
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.double_covariant(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.MatrixFunction ¶
Map matrix functions.
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.double_contravariant(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.MatrixFunction ¶
Map matrix functions.
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.identity_inverse_transpose(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.AnyFunction ¶
Inverse transpose of identity().
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.l2_inverse_transpose(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.AnyFunction ¶
Inverse transpose of l2().
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.covariant_inverse_transpose(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.AnyFunction ¶
Inverse transpose of covariant().
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.contravariant_inverse_transpose(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.AnyFunction ¶
Inverse transpose of contravariant().
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.identity_inverse(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.AnyFunction ¶
Inverse of identity().
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.l2_inverse(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.AnyFunction ¶
Inverse of l2().
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.covariant_inverse(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.AnyFunction ¶
Inverse of covariant().
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.contravariant_inverse(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.AnyFunction ¶
Inverse of contravariant().
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.double_covariant_inverse(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.AnyFunction ¶
Inverse of double_covariant().
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.double_contravariant_inverse(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) symfem.functions.AnyFunction ¶
Inverse of double_contravariant().
- Parameters:
f_in – The function
map – The map from the reference cell to the physical cell
inverse_map – The map to the reference cell from the physical cell
substitute – Should the inverse map be substituted in?
- Returns:
The mapped function
- symfem.mappings.get_mapping(mapname: str, inverse: bool = False, transpose: bool = False) Callable[[symfem.functions.FunctionInput, symfem.geometry.PointType, symfem.geometry.PointType, bool], symfem.functions.AnyFunction] ¶
Get a mapping.
- Parameters:
mapname – The name of the mapping
inverse – Should the map be inverted
transpose – Should the map be transposed
- Returns:
A function that performs the mapping