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 should have shape [geometry_dimension, entity_topology_dimension, npts] and use column-major ordering;
  • jacobian_determinants should have shape [npts];
  • inverse_jacobians should have shape [entity_topology_dimension, geometry_dimension, npts] and use column-major ordering;
  • physical_values: The output array of the push operation. This shape of this array is the same as the reference_values but with reference value size replaced by the physical 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>