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>

source

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)

source

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)

source

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

source

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

source

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

source

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

source

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

source

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

source

pub fn glq_scale(&self) -> f64

The size of the parametric area relative to the unit-parametric area

source

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)

source

pub fn u_glq_scale(&self) -> f64

The scale of the u-axis relative to the unit parametric space

source

pub fn v_glq_scale(&self) -> f64

The scale of the v-axis relative to the unit parametric space

source

pub fn deriv_scale(&self) -> &V2D

The scale of both axes relative to the unit parametric space

source

pub fn sample_scale(&self, [m, n]: [usize; 2]) -> f64

The determinant of the Jacobian at some point (m, n)

source

pub fn max_uv_ratio(&self, [m, n]: [usize; 2]) -> f64

Maximum of uv_ratio and vu_ratio

source

pub fn uv_ratio(&self, [m, n]: [usize; 2]) -> f64

The ratio of the du/dx to dv/dy at some point (m, n)

source

pub fn vu_ratio(&self, [m, n]: [usize; 2]) -> f64

The ratio of the dv/dy to du/dx at some point (m, n)

Trait Implementations§

source§

impl<BSpace: Clone + HierCurlBasisFnSpace> Clone for HierCurlBasisFn<BSpace>

source§

fn clone(&self) -> HierCurlBasisFn<BSpace>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<BSpace: Debug + HierCurlBasisFnSpace> Debug for HierCurlBasisFn<BSpace>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

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

Create a Basis Function instance defined over some Elem (and optionally mapped over some descendant Elem)

Arguments
  • elem : the element to sample over
  • desc_elem : the descendant element to sample over. If None, the BasisFn is defined over the entire Elem
  • u_points : the glq points defined over (-1.0, 1.0) for the u-axis
  • v_points : the glq points defined over (-1.0, 1.0) for the v-axis
  • i_max : maximum u-directed expansion order
  • j_max : maximum v-directed expansion order
  • compute_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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.