pub struct AxisOperator {
pub axis: usize,
pub sub: Vec<f64>,
pub diag: Vec<f64>,
pub sup: Vec<f64>,
}Expand description
A tridiagonal operator along one axis of a TensorGrid, with
per-node coefficients: row i of A u reads
sub[i] * u[i - stride] + diag[i] * u[i] + sup[i] * u[i + stride].
sub must be zero on the first plane of the axis and sup on the
last (there is no neighbor there); boundary conditions are whatever
the boundary rows encode — an all-zero row holds the boundary value
fixed through both explicit application and implicit solves.
Fields§
§axis: usize§sub: Vec<f64>§diag: Vec<f64>§sup: Vec<f64>Implementations§
Source§impl AxisOperator
impl AxisOperator
Sourcepub fn zero(grid: &TensorGrid, axis: usize) -> Self
pub fn zero(grid: &TensorGrid, axis: usize) -> Self
An all-zero operator along axis (a starting point to fill in).
Sourcepub fn solve_shifted(&self, grid: &TensorGrid, c: f64, rhs: &[f64]) -> Vec<f64>
pub fn solve_shifted(&self, grid: &TensorGrid, c: f64, rhs: &[f64]) -> Vec<f64>
Solve (I - c A) x = rhs, line by line with the Thomas algorithm —
the implicit stage of theta and ADI schemes.
Trait Implementations§
Source§impl Clone for AxisOperator
impl Clone for AxisOperator
Source§fn clone(&self) -> AxisOperator
fn clone(&self) -> AxisOperator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AxisOperator
impl RefUnwindSafe for AxisOperator
impl Send for AxisOperator
impl Sync for AxisOperator
impl Unpin for AxisOperator
impl UnsafeUnpin for AxisOperator
impl UnwindSafe for AxisOperator
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