:py:mod:`symfem.mappings` ========================= .. py:module:: symfem.mappings .. autoapi-nested-parse:: Functions to map functions between cells. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: symfem.mappings.identity symfem.mappings.l2 symfem.mappings.covariant symfem.mappings.contravariant symfem.mappings.double_covariant symfem.mappings.double_contravariant symfem.mappings.identity_inverse_transpose symfem.mappings.l2_inverse_transpose symfem.mappings.covariant_inverse_transpose symfem.mappings.contravariant_inverse_transpose symfem.mappings.identity_inverse symfem.mappings.l2_inverse symfem.mappings.covariant_inverse symfem.mappings.contravariant_inverse symfem.mappings.double_covariant_inverse symfem.mappings.double_contravariant_inverse symfem.mappings.get_mapping .. py:exception:: MappingNotImplemented Bases: :py:obj:`NotImplementedError` Exception thrown when a mapping is not implemented for an element. .. py:function:: identity(f_in: symfem.functions.FunctionInput, map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType, substitute: bool = True) -> symfem.functions.AnyFunction Map functions. :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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. :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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. :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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. :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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. :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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. :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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(). :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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(). :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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(). :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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(). :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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(). :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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(). :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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(). :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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(). :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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(). :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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(). :param f_in: The function :param map: The map from the reference cell to the physical cell :param inverse_map: The map to the reference cell from the physical cell :param substitute: Should the inverse map be substituted in? :returns: The mapped function .. py:function:: 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. :param mapname: The name of the mapping :param inverse: Should the map be inverted :param transpose: Should the map be transposed :returns: A function that performs the mapping