Trait BaseMatOpDiffmat

Source
pub trait BaseMatOpDiffmat {
    type NumType;

    // Required methods
    fn diffmat(&self, _deriv: usize) -> Array2<Self::NumType>;
    fn diffmat_pinv(
        &self,
        _deriv: usize,
    ) -> (Array2<Self::NumType>, Array2<Self::NumType>);
}
Expand description

Collection of differentiation matrix operators

Required Associated Types§

Source

type NumType

Scalar type of matrix

Required Methods§

Source

fn diffmat(&self, _deriv: usize) -> Array2<Self::NumType>

Explicit differential operator $ D $

Matrix-based version of BaseGradient::gradient()

Source

fn diffmat_pinv( &self, _deriv: usize, ) -> (Array2<Self::NumType>, Array2<Self::NumType>)

Explicit inverse of differential operator $ D^* $

Returns (D_pinv, I_pinv), where D_pinv is the pseudoinverse and I_pinv the corresponding pseudoidentity matrix, such that

D_pinv @ D = I_pinv

Can be used as a preconditioner.

Implementors§