Trait fenris::element::ReferenceFiniteElement
source · pub trait ReferenceFiniteElement<T>where
T: Scalar,
DefaultAllocator: DimAllocator<T, Self::ReferenceDim>,{
type ReferenceDim: SmallDim;
// Required methods
fn num_nodes(&self) -> usize;
fn populate_basis(
&self,
basis_values: &mut [T],
reference_coords: &OPoint<T, Self::ReferenceDim>
);
fn populate_basis_gradients(
&self,
basis_gradients: MatrixViewMut<'_, T, Self::ReferenceDim, Dyn>,
reference_coords: &OPoint<T, Self::ReferenceDim>
);
}
Required Associated Types§
type ReferenceDim: SmallDim
Required Methods§
sourcefn populate_basis(
&self,
basis_values: &mut [T],
reference_coords: &OPoint<T, Self::ReferenceDim>
)
fn populate_basis( &self, basis_values: &mut [T], reference_coords: &OPoint<T, Self::ReferenceDim> )
Evaluates each basis function at the given reference coordinates. The result is given in a row vector where each entry is the value of the corresponding basis function.
TODO: Document that it should panic if the result does not have exactly the correct number of columns (==nodes)
sourcefn populate_basis_gradients(
&self,
basis_gradients: MatrixViewMut<'_, T, Self::ReferenceDim, Dyn>,
reference_coords: &OPoint<T, Self::ReferenceDim>
)
fn populate_basis_gradients( &self, basis_gradients: MatrixViewMut<'_, T, Self::ReferenceDim, Dyn>, reference_coords: &OPoint<T, Self::ReferenceDim> )
Given nodal weights, construct a matrix whose columns are the gradients of each shape function in the element.