Space Map#

Since the Basis Functions and Integration are both done on hypercube domain, where each dimension goes from -1 to +1, this severely limits their usability on any deformed domain. As such a mapping between the \(N\)-dimensional reference domain and the target \(M\)-dimensional (where \(M \ge N\)) target domain can be defined using SpaceMap object. This mapping then determines the way integration is done and how k-form components are mapped between the two domains.

The mapping is specified one target coordinate at the time, using CoordinateMap objects. These require the DegreesOfFreedom as well as the IntegrationSpace to define. This map is used to store the values, as well as the derivatives of the coordinate mapping at all points in the integration space.

Note

All CoordinateMap object that you want to use together for a complete SpaceMap must use the same IntegrationSpace.

class fdg.CoordinateMap#
gradient(idim: int, /) numpy.typing.NDArray[numpy.double]#

Retrieve the gradient of the coordinate map in given dimension.

dimension#

Number of dimensions in the coordinate map.

Type:

int

integration_space#

Integration space used for the mapping.

Type:

IntegrationSpace

values#

Values of the coordinate map at the integration points.

Type:

numpy.typing.NDArray[numpy.double]

To specify the SpaceMap, CoordinateMap must be specified for each of the target domain dimensions. With that, SpaceMap can be used in place of IntegrationSpace for many functions that integrate quantities. It also contains both the Jacobian and its (pseudo-)inverse, along with the determinant.

class fdg.SpaceMap(*coordinates: CoordinateMap)#

Mapping between a reference space and a physical space.

A mapping from a reference space to a physical space, which maps the \(N\)-dimensional reference space to an \(M\)-dimensional physical space. With this mapping, it is possible to integrate a quantity on a deformed element.

Parameters:

*coordinates (CoordinateMap) – Maps for each coordinate of physical space. All of these must be defined on the same IntegrationSpace.

basis_transform(order: int) numpy.typing.NDArray[numpy.double]#

Compute the matrix with transformation factors for k-form basis.

Basis transform matrix returned by this function specifies how at integration point a basis from the reference domain contributes to the basis in the target domain.

Parameters:

order (int) – Order of the k-form for which this is to be done.

Returns:

Array with three axis. The first indexes over the input basis, the second over output basis, and the last one over integration points.

Return type:

array

coordinate_map(idx: int) CoordinateMap#

Return the coordinate map for the specified dimension.

Parameters:

idx (int) – Index of the dimension for which the map shoudl be returned.

Returns:

Map used for the specified coordinate.

Return type:

CoordinateMap

determinant#

Array with the values of determinant at integration.points.

Type:

numpy.typing.NDArray[numpy.double]

input_dimensions#

Dimension of the input/reference space.

Type:

int

integration_space#

Integration space used by the mapping.

Type:

IntegrationSpace

inverse_map#

Local inverse transformation at each integration point.

This array contains inverse mapping matrix, which is used for the contravarying components. When the dimension of the mapping space (as counted by SpaceMap.output_dimensions()) is greater than the dimension of the reference space, this is a rectangular matrix, such that it maps the (rectangular) Jacobian to the identity matrix.

Type:

numpy.typing.NDArray[numpy.double]

output_dimensions#

Dimension of the output/physical space.

Type:

int