MappedFiniteElement

Trait MappedFiniteElement 

Source
pub trait MappedFiniteElement: FiniteElement {
    type TransformationType: Debug + PartialEq + Eq + Clone + Copy + Hash;

    // Required methods
    fn lagrange_superdegree(&self) -> usize;
    fn push_forward<TGeo: RlstScalar, Array3GeoImpl: ValueArrayImpl<TGeo, 3>, Array4Impl: ValueArrayImpl<Self::T, 4>, Array4MutImpl: MutableArrayImpl<Self::T, 4>>(
        &self,
        reference_values: &Array<Array4Impl, 4>,
        nderivs: usize,
        jacobians: &Array<Array3GeoImpl, 3>,
        jacobian_determinants: &[TGeo],
        inverse_jacobians: &Array<Array3GeoImpl, 3>,
        physical_values: &mut Array<Array4MutImpl, 4>,
    );
    fn pull_back<TGeo: RlstScalar, Array3GeoImpl: ValueArrayImpl<TGeo, 3>, Array4Impl: ValueArrayImpl<Self::T, 4>, Array4MutImpl: MutableArrayImpl<Self::T, 4>>(
        &self,
        physical_values: &Array<Array4Impl, 4>,
        nderivs: usize,
        jacobians: &Array<Array3GeoImpl, 3>,
        jacobian_determinants: &[TGeo],
        inverse_jacobians: &Array<Array3GeoImpl, 3>,
        reference_values: &mut Array<Array4MutImpl, 4>,
    );
    fn physical_value_shape(&self, gdim: usize) -> Vec<usize>;
    fn dof_transformation(
        &self,
        entity: Self::CellType,
        transformation: Self::TransformationType,
    ) -> Option<&DofTransformation<Self::T>>;
    fn apply_dof_permutations<T>(&self, data: &mut [T], cell_orientation: i32);
    fn apply_dof_transformations(
        &self,
        data: &mut [Self::T],
        cell_orientation: i32,
    );

    // Provided methods
    fn physical_value_size(&self, gdim: usize) -> usize { ... }
    fn apply_dof_permutations_and_transformations(
        &self,
        data: &mut [Self::T],
        cell_orientation: i32,
    ) { ... }
}
Expand description

A finite element that is mapped from a reference cell.

Required Associated Types§

Source

type TransformationType: Debug + PartialEq + Eq + Clone + Copy + Hash

Transformation type

The Transformation type specifies possible transformations of the dofs on the reference element. In most cases these will be rotations and reflections as defined in Transformation.

Required Methods§

Source

fn lagrange_superdegree(&self) -> usize

The smallest degree Lagrange space that contains all possible polynomials of the finite element’s polynomial space.

Details on the definition of the degree of Lagrange spaces of finite elements are given here.

Source

fn push_forward<TGeo: RlstScalar, Array3GeoImpl: ValueArrayImpl<TGeo, 3>, Array4Impl: ValueArrayImpl<Self::T, 4>, Array4MutImpl: MutableArrayImpl<Self::T, 4>>( &self, reference_values: &Array<Array4Impl, 4>, nderivs: usize, jacobians: &Array<Array3GeoImpl, 3>, jacobian_determinants: &[TGeo], inverse_jacobians: &Array<Array3GeoImpl, 3>, physical_values: &mut Array<Array4MutImpl, 4>, )

Push function values forward to a physical cell.

For Lagrange elements, this is an identity map. For many other element types, the function values on the reference cell differ from those on the physical cell: for example Nedlec elements use a covariant Piola transform. This method implements the appropriate transformation for the element.

  • reference_values: The values on the reference cell. The shape of this input is the same as the data input to the function [FiniteElement::tabulate.
  • nderivs: The number of derivatives.
  • jacobians: A three-dimensional array of jacobians of the map from reference to physical cell. The first dimension is the reference point, the second dimension is the geometric dimension of the physical space, and the third dimension is the topological dimension of the reference element. For example, for the map of 5 points from the reference triangle to a physical surface triangle embedded in 3d space the dimension of jacobians is [5, 3, 2].
  • jacobian_determinants: The determinant of the jacobian at each point. If the jacobian $J$ is not square, then the determinant is computed using $d=\sqrt{\det(J^TJ)}$.
  • inverse_jacobians: A three dimensional array that stores the inverse jacobian for the point with index j at position inverse_jacobians[j, :, :]. The first dimension of inverse_jacobians is the point index, the second dimension is the topological dimension, and the third dimension is the geometric dimension. If the Jacobian is rectangular then the inverse Jacobian is the pseudo-inverse of the Jacobian, ie the matrix $J^\dagger$ such that $J^\dagger J = I$.
  • physical_values: The output array of the push operation. This shape of this array is the same as the reference_values input, with the MappedFiniteElement::physical_value_size used instead of the reference value size.
Source

fn pull_back<TGeo: RlstScalar, Array3GeoImpl: ValueArrayImpl<TGeo, 3>, Array4Impl: ValueArrayImpl<Self::T, 4>, Array4MutImpl: MutableArrayImpl<Self::T, 4>>( &self, physical_values: &Array<Array4Impl, 4>, nderivs: usize, jacobians: &Array<Array3GeoImpl, 3>, jacobian_determinants: &[TGeo], inverse_jacobians: &Array<Array3GeoImpl, 3>, reference_values: &mut Array<Array4MutImpl, 4>, )

Pull function values back to the reference cell.

This is the inverse operation to MappedFiniteElement::push_forward.

Source

fn physical_value_shape(&self, gdim: usize) -> Vec<usize>

The value shape on a physical cell

Source

fn dof_transformation( &self, entity: Self::CellType, transformation: Self::TransformationType, ) -> Option<&DofTransformation<Self::T>>

The DOF transformation for a sub-entity.

Source

fn apply_dof_permutations<T>(&self, data: &mut [T], cell_orientation: i32)

Apply permutation parts of DOF transformations.

Source

fn apply_dof_transformations(&self, data: &mut [Self::T], cell_orientation: i32)

Apply non-permutation parts of DOF transformations.

Provided Methods§

Source

fn physical_value_size(&self, gdim: usize) -> usize

The value size on a physical cell

Source

fn apply_dof_permutations_and_transformations( &self, data: &mut [Self::T], cell_orientation: i32, )

Apply DOF transformations.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: RlstScalar, M: Map, TGeoInternal: RlstScalar> MappedFiniteElement for CiarletElement<T, M, TGeoInternal>