pub struct Stencil<S: Scalar> {
pub coeffs: Vec<S>,
pub offset: i32,
}Expand description
Finite difference stencil coefficients.
Fields§
§coeffs: Vec<S>Coefficients for each point in the stencil
offset: i32Offset of the leftmost point from center
Implementations§
Source§impl<S: Scalar> Stencil<S>
impl<S: Scalar> Stencil<S>
Sourcepub fn d1_central(dx: S) -> Self
pub fn d1_central(dx: S) -> Self
Create a first derivative central difference stencil.
Sourcepub fn d1_forward(dx: S) -> Self
pub fn d1_forward(dx: S) -> Self
Create a first derivative forward difference stencil.
Sourcepub fn d1_backward(dx: S) -> Self
pub fn d1_backward(dx: S) -> Self
Create a first derivative backward difference stencil.
Sourcepub fn d2_central(dx: S) -> Self
pub fn d2_central(dx: S) -> Self
Create a second derivative central difference stencil.
Sourcepub fn d2_central4(dx: S) -> Self
pub fn d2_central4(dx: S) -> Self
Create a fourth-order accurate second derivative stencil.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Stencil<S>
impl<S> RefUnwindSafe for Stencil<S>where
S: RefUnwindSafe,
impl<S> Send for Stencil<S>
impl<S> Sync for Stencil<S>
impl<S> Unpin for Stencil<S>where
S: Unpin,
impl<S> UnsafeUnpin for Stencil<S>
impl<S> UnwindSafe for Stencil<S>where
S: 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more