Struct fem_2d::fem_domain::basis::HierCurlBasisFn
source · pub struct HierCurlBasisFn<BSpace: HierCurlBasisFnSpace> {
pub jac: Vec<Vec<M2D>>,
pub jac_inv: Vec<Vec<M2D>>,
pub det_jac: Vec<Vec<f64>>,
pub para_scale: V2D,
/* private fields */
}
Expand description
A Hierarchical-Type Curl-Conforming Vectorial Basis Function
This basis function has the following vectorial components in the u, v and w directions:
F_u(u, v, i, j) = N_i(u) * T_j(v) * J^-1_u(u, v)
F_v(u, v, i, j) = T_i(u) * N_j(v) * J^-1_v(u, v)
F_w(u, v, i, j) = T_i(u) * T_j(v) * J_z(u, v)
(Not Yet Implemented)
Where the Functions N, and T are the Normal and Tangentially directed Function spaces defined by the HierCurlBasisFnSpace. This structure is Generic over any HierCurlBasisFnSpace.
The Jacobian is defined by the Elem’s mapping to real space (and the mapping between the Elems and its descendant, in the case of sub-sampling)
Fields§
§jac: Vec<Vec<M2D>>
Transformation matrices (or Jacobians) at each sample point. Describes transformation from real space to sampled parametric space
jac_inv: Vec<Vec<M2D>>
§det_jac: Vec<Vec<f64>>
Determinants of the “Sampling Jacobian” at each point
para_scale: V2D
Parametric scaling factors (used to scale derivatives in parametric space as necessary)
Implementations§
source§impl<BSpace: HierCurlBasisFnSpace> HierCurlBasisFn<BSpace>
impl<BSpace: HierCurlBasisFnSpace> HierCurlBasisFn<BSpace>
sourcepub fn f_u(&self, [i, j]: [usize; 2], [m, n]: [usize; 2]) -> V2D
pub fn f_u(&self, [i, j]: [usize; 2], [m, n]: [usize; 2]) -> V2D
Evaluate the u-directed basis function at some point (m, n)
sourcepub fn f_v(&self, [i, j]: [usize; 2], [m, n]: [usize; 2]) -> V2D
pub fn f_v(&self, [i, j]: [usize; 2], [m, n]: [usize; 2]) -> V2D
Evaluate the v-directed basis function at some point (m, n)
sourcepub fn f_u_d1(
&self,
[i, j]: [usize; 2],
[m, n]: [usize; 2],
para_scale: &V2D
) -> V2D
pub fn f_u_d1( &self, [i, j]: [usize; 2], [m, n]: [usize; 2], para_scale: &V2D ) -> V2D
Evaluate the first derivative of the u-directed basis with respect to another Elem
’s parametric space
sourcepub fn f_v_d1(
&self,
[i, j]: [usize; 2],
[m, n]: [usize; 2],
para_scale: &V2D
) -> V2D
pub fn f_v_d1( &self, [i, j]: [usize; 2], [m, n]: [usize; 2], para_scale: &V2D ) -> V2D
Evaluate the first derivative of the v-directed basis with respect to another Elem
’s parametric space
sourcepub fn f_u_d2(
&self,
[i, j]: [usize; 2],
[m, n]: [usize; 2],
para_scale: &V2D
) -> V2D
pub fn f_u_d2( &self, [i, j]: [usize; 2], [m, n]: [usize; 2], para_scale: &V2D ) -> V2D
Evaluate the second derivative of the u-directed basis with respect to another Elem
’s parametric space
sourcepub fn f_v_d2(
&self,
[i, j]: [usize; 2],
[m, n]: [usize; 2],
para_scale: &V2D
) -> V2D
pub fn f_v_d2( &self, [i, j]: [usize; 2], [m, n]: [usize; 2], para_scale: &V2D ) -> V2D
Evaluate the second derivative of the v-directed basis with respect to another Elem
’s parametric space
sourcepub fn f_u_dd(
&self,
[i, j]: [usize; 2],
[m, n]: [usize; 2],
para_scale: &V2D
) -> V2D
pub fn f_u_dd( &self, [i, j]: [usize; 2], [m, n]: [usize; 2], para_scale: &V2D ) -> V2D
Evaluate the gradient of the u-directed basis with respect to another Elem
’s parametric space
sourcepub fn f_v_dd(
&self,
[i, j]: [usize; 2],
[m, n]: [usize; 2],
para_scale: &V2D
) -> V2D
pub fn f_v_dd( &self, [i, j]: [usize; 2], [m, n]: [usize; 2], para_scale: &V2D ) -> V2D
Evaluate the gradient of the v-directed basis with respect to another Elem
’s parametric space
sourcepub fn glq_scale(&self) -> f64
pub fn glq_scale(&self) -> f64
The size of the parametric area relative to the unit-parametric area
sourcepub fn edge_glq_scale(&self, edge_idx: usize) -> f64
pub fn edge_glq_scale(&self, edge_idx: usize) -> f64
The size of the parametric space relative to the unit-parametric space (along a single edge)
sourcepub fn u_glq_scale(&self) -> f64
pub fn u_glq_scale(&self) -> f64
The scale of the u-axis relative to the unit parametric space
sourcepub fn v_glq_scale(&self) -> f64
pub fn v_glq_scale(&self) -> f64
The scale of the v-axis relative to the unit parametric space
sourcepub fn deriv_scale(&self) -> &V2D
pub fn deriv_scale(&self) -> &V2D
The scale of both axes relative to the unit parametric space
sourcepub fn sample_scale(&self, [m, n]: [usize; 2]) -> f64
pub fn sample_scale(&self, [m, n]: [usize; 2]) -> f64
The determinant of the Jacobian at some point (m, n)
sourcepub fn max_uv_ratio(&self, [m, n]: [usize; 2]) -> f64
pub fn max_uv_ratio(&self, [m, n]: [usize; 2]) -> f64
Maximum of uv_ratio
and vu_ratio
Trait Implementations§
source§impl<BSpace: Clone + HierCurlBasisFnSpace> Clone for HierCurlBasisFn<BSpace>
impl<BSpace: Clone + HierCurlBasisFnSpace> Clone for HierCurlBasisFn<BSpace>
source§fn clone(&self) -> HierCurlBasisFn<BSpace>
fn clone(&self) -> HierCurlBasisFn<BSpace>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<BSpace: Debug + HierCurlBasisFnSpace> Debug for HierCurlBasisFn<BSpace>
impl<BSpace: Debug + HierCurlBasisFnSpace> Debug for HierCurlBasisFn<BSpace>
source§impl<BSpace: HierCurlBasisFnSpace> HierBasisFn for HierCurlBasisFn<BSpace>
impl<BSpace: HierCurlBasisFnSpace> HierBasisFn for HierCurlBasisFn<BSpace>
source§fn defined_over(
elem: &Elem,
desc_elem: Option<&Elem>,
[u_points, v_points]: [&[f64]; 2],
[i_max, j_max]: [usize; 2],
compute_d2: bool
) -> Self
fn defined_over( elem: &Elem, desc_elem: Option<&Elem>, [u_points, v_points]: [&[f64]; 2], [i_max, j_max]: [usize; 2], compute_d2: bool ) -> Self
Create a Basis Function instance defined over some Elem
(and optionally mapped over some descendant Elem
)
Arguments
elem
: the element to sample overdesc_elem
: the descendant element to sample over. IfNone
, the BasisFn is defined over the entireElem
u_points
: the glq points defined over (-1.0, 1.0) for the u-axisv_points
: the glq points defined over (-1.0, 1.0) for the v-axisi_max
: maximum u-directed expansion orderj_max
: maximum v-directed expansion ordercompute_2d
: whether or not to compute the second derivatives of the Basis Functions
If a descendant Elem
is provided, the raw_points
are mapped (according to GLQ rules) to match the parametric bounds of the descendant Elem
Auto Trait Implementations§
impl<BSpace> RefUnwindSafe for HierCurlBasisFn<BSpace>where BSpace: RefUnwindSafe,
impl<BSpace> Send for HierCurlBasisFn<BSpace>
impl<BSpace> Sync for HierCurlBasisFn<BSpace>
impl<BSpace> Unpin for HierCurlBasisFn<BSpace>where BSpace: Unpin,
impl<BSpace> UnwindSafe for HierCurlBasisFn<BSpace>where BSpace: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.