pub trait GeometryMap {
type T: Scalar;
// Required methods
fn entity_topology_dimension(&self) -> usize;
fn geometry_dimension(&self) -> usize;
fn point_count(&self) -> usize;
fn physical_points<Array2Impl: MutableArrayImpl<Self::T, 2>>(
&self,
entity_index: usize,
points: &mut Array<Array2Impl, 2>,
);
fn jacobians<Array3MutImpl: MutableArrayImpl<Self::T, 3>>(
&self,
entity_index: usize,
jacobians: &mut Array<Array3MutImpl, 3>,
);
fn jacobians_inverses_dets<Array3MutImpl: MutableArrayImpl<Self::T, 3>>(
&self,
entity_index: usize,
jacobians: &mut Array<Array3MutImpl, 3>,
inverse_jacobians: &mut Array<Array3MutImpl, 3>,
jdets: &mut [Self::T],
);
fn jacobians_inverses_dets_normals<Array2Impl: MutableArrayImpl<Self::T, 2>, Array3MutImpl: MutableArrayImpl<Self::T, 3>>(
&self,
entity_index: usize,
jacobians: &mut Array<Array3MutImpl, 3>,
inverse_jacobians: &mut Array<Array3MutImpl, 3>,
jdets: &mut [Self::T],
normals: &mut Array<Array2Impl, 2>,
);
}Expand description
A geometry map allows the computation of maps from reference to physical space and their derivatives.
A geometry map is typically initialised with a number of points on a reference entity. We can then for each physical entity compute
- The associated physical points as maps from the reference points.
- The jacobian of the map at the physical points.
- The jacobians, transformation determinants and the normals of the physical entity.
Required Associated Types§
Required Methods§
Sourcefn entity_topology_dimension(&self) -> usize
fn entity_topology_dimension(&self) -> usize
The topoloical dimension of the entity being mapped.
The topological dimension is e.g. two for a triangle, independent of whether it is embedded in two or three dimensional space.
Sourcefn geometry_dimension(&self) -> usize
fn geometry_dimension(&self) -> usize
The geometric dimension of the physical space.
Sourcefn point_count(&self) -> usize
fn point_count(&self) -> usize
The number of reference points that this map uses.
Sourcefn physical_points<Array2Impl: MutableArrayImpl<Self::T, 2>>(
&self,
entity_index: usize,
points: &mut Array<Array2Impl, 2>,
)
fn physical_points<Array2Impl: MutableArrayImpl<Self::T, 2>>( &self, entity_index: usize, points: &mut Array<Array2Impl, 2>, )
Write the physical points for the entity with index entity_index into points
points should have shape [geometry_dimension, npts] and use column-major ordering.
Sourcefn jacobians<Array3MutImpl: MutableArrayImpl<Self::T, 3>>(
&self,
entity_index: usize,
jacobians: &mut Array<Array3MutImpl, 3>,
)
fn jacobians<Array3MutImpl: MutableArrayImpl<Self::T, 3>>( &self, entity_index: usize, jacobians: &mut Array<Array3MutImpl, 3>, )
Write the jacobians at the physical points for the entity with index entity_index into jacobians
jacobians should have shape [geometry_dimension, entity_topology_dimension, npts] and use column-major ordering
Sourcefn jacobians_inverses_dets<Array3MutImpl: MutableArrayImpl<Self::T, 3>>(
&self,
entity_index: usize,
jacobians: &mut Array<Array3MutImpl, 3>,
inverse_jacobians: &mut Array<Array3MutImpl, 3>,
jdets: &mut [Self::T],
)
fn jacobians_inverses_dets<Array3MutImpl: MutableArrayImpl<Self::T, 3>>( &self, entity_index: usize, jacobians: &mut Array<Array3MutImpl, 3>, inverse_jacobians: &mut Array<Array3MutImpl, 3>, jdets: &mut [Self::T], )
Write the jacobians, their inverses and their determinants for the entity with
index entity_index into jacobians, inverse_jacobians and jdets.
jacobians should have shape [geometry_dimension, entity_topology_dimension, npts] and use column-major ordering;
inverse_jacobians should have shape [entity_topology_dimension, geometry_dimension, npts] and use column-major ordering;
jdets should have shape [npts];
Sourcefn jacobians_inverses_dets_normals<Array2Impl: MutableArrayImpl<Self::T, 2>, Array3MutImpl: MutableArrayImpl<Self::T, 3>>(
&self,
entity_index: usize,
jacobians: &mut Array<Array3MutImpl, 3>,
inverse_jacobians: &mut Array<Array3MutImpl, 3>,
jdets: &mut [Self::T],
normals: &mut Array<Array2Impl, 2>,
)
fn jacobians_inverses_dets_normals<Array2Impl: MutableArrayImpl<Self::T, 2>, Array3MutImpl: MutableArrayImpl<Self::T, 3>>( &self, entity_index: usize, jacobians: &mut Array<Array3MutImpl, 3>, inverse_jacobians: &mut Array<Array3MutImpl, 3>, jdets: &mut [Self::T], normals: &mut Array<Array2Impl, 2>, )
Write the jacobians, their inverses, their determinants, and the normals at the physical points for the entity with
index entity_index into jacobians, inverse_jacobians, jdets and normals.
jacobians should have shape [geometry_dimension, entity_topology_dimension, npts] and use column-major ordering;
inverse_jacobians should have shape [entity_topology_dimension, geometry_dimension, npts] and use column-major ordering;
jdets should have shape [npts];
normals should have shape [geometry_dimension, npts] and use column-major ordering
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.