pub struct Ilu0<I, T> { /* private fields */ }Expand description
Numeric ILU(0) factor of a CSC matrix A.
Holds the L and U value buffers together with the symbolic structure
and the dense workspace used during refactorisation. After construction the
factor can be refactored against any matrix with the same sparsity pattern
— Ilu0::refactorize performs zero heap allocations.
Implementations§
Source§impl<I: Index, T: ComplexField> Ilu0<I, T>
impl<I: Index, T: ComplexField> Ilu0<I, T>
Sourcepub fn new_with_symbolic(symbolic: SymbolicIlu0<I>) -> Self
pub fn new_with_symbolic(symbolic: SymbolicIlu0<I>) -> Self
Allocate the value buffers and dense workspace for a given symbolic factor.
The returned factor is not yet populated — call Ilu0::refactorize
to fill it with values from a matrix matching symbolic’s pattern.
Sourcepub fn try_new(a: SparseColMatRef<'_, I, T>) -> Result<Self, Ilu0Error>
pub fn try_new(a: SparseColMatRef<'_, I, T>) -> Result<Self, Ilu0Error>
Build a fully populated ILU(0) factor from a CSC matrix A in one shot.
Allocates internally for the symbolic structure, the L/U value
buffers, and the dense workspace.
Sourcepub fn symbolic(&self) -> &SymbolicIlu0<I>
pub fn symbolic(&self) -> &SymbolicIlu0<I>
Borrow the symbolic factor.
Sourcepub fn refactorize(
&mut self,
a: SparseColMatRef<'_, I, T>,
) -> Result<(), Ilu0Error>
pub fn refactorize( &mut self, a: SparseColMatRef<'_, I, T>, ) -> Result<(), Ilu0Error>
Refactorise against a new matrix with the same sparsity pattern.
Performs zero heap allocations.
§Errors
Ilu0Error::PatternMismatchifa’s shape or column lengths disagree with the symbolic structure, or if the diagonal entries land at unexpected positions.Ilu0Error::ZeroPivotif a pivot of magnitude zero is encountered during elimination.
Sourcepub fn l_view(&self) -> SparseColMatRef<'_, I, T>
pub fn l_view(&self) -> SparseColMatRef<'_, I, T>
Construct a SparseColMatRef view over the L factor (unit lower
triangular, diagonal stored first in each column with value 1).
Sourcepub fn u_view(&self) -> SparseColMatRef<'_, I, T>
pub fn u_view(&self) -> SparseColMatRef<'_, I, T>
Construct a SparseColMatRef view over the U factor (upper
triangular, diagonal stored last in each column).
Trait Implementations§
Source§impl<I, T> BiLinOp<T> for Ilu0<I, T>
impl<I, T> BiLinOp<T> for Ilu0<I, T>
Source§fn transpose_apply_scratch(&self, _rhs_ncols: usize, _par: Par) -> StackReq
fn transpose_apply_scratch(&self, _rhs_ncols: usize, _par: Par) -> StackReq
self to a matrix with rhs_ncols columnsSource§impl<I, T> BiPrecond<T> for Ilu0<I, T>
impl<I, T> BiPrecond<T> for Ilu0<I, T>
Source§fn transpose_apply_in_place_scratch(
&self,
_rhs_ncols: usize,
_par: Par,
) -> StackReq
fn transpose_apply_in_place_scratch( &self, _rhs_ncols: usize, _par: Par, ) -> StackReq
self to a matrix with rhs_ncols columns in placeSource§impl<I, T> LinOp<T> for Ilu0<I, T>
impl<I, T> LinOp<T> for Ilu0<I, T>
Source§fn apply_scratch(&self, _rhs_ncols: usize, _par: Par) -> StackReq
fn apply_scratch(&self, _rhs_ncols: usize, _par: Par) -> StackReq
self or the conjugate
o self to a matrix with rhs_ncols columnsSource§impl<I, T> Precond<T> for Ilu0<I, T>
impl<I, T> Precond<T> for Ilu0<I, T>
Source§fn apply_in_place_scratch(&self, _rhs_ncols: usize, _par: Par) -> StackReq
fn apply_in_place_scratch(&self, _rhs_ncols: usize, _par: Par) -> StackReq
self or the conjugate
of self to a matrix with rhs_ncols columns in placeAuto Trait Implementations§
impl<I, T> Freeze for Ilu0<I, T>
impl<I, T> RefUnwindSafe for Ilu0<I, T>where
T: RefUnwindSafe,
I: RefUnwindSafe,
impl<I, T> Send for Ilu0<I, T>
impl<I, T> Sync for Ilu0<I, T>
impl<I, T> Unpin for Ilu0<I, T>
impl<I, T> UnsafeUnpin for Ilu0<I, T>
impl<I, T> UnwindSafe for Ilu0<I, T>where
T: UnwindSafe,
I: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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>
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>
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