pub struct Iluk<I, T> { /* private fields */ }Expand description
Numeric ILU(k) factor of a CSC matrix A.
Holds the L/U value buffers, the symbolic structure and the dense
workspace used during refactorisation. Iluk::refactorize performs zero
heap allocations.
Implementations§
Source§impl<I: Index, T: ComplexField> Iluk<I, T>
impl<I: Index, T: ComplexField> Iluk<I, T>
Sourcepub fn new_with_symbolic(symbolic: SymbolicIluk<I>) -> Self
pub fn new_with_symbolic(symbolic: SymbolicIluk<I>) -> Self
Allocate the value buffers and dense workspace for a symbolic factor.
Sourcepub fn try_new(
a: SparseColMatRef<'_, I, T>,
level: usize,
) -> Result<Self, IlukError>
pub fn try_new( a: SparseColMatRef<'_, I, T>, level: usize, ) -> Result<Self, IlukError>
Build a fully populated ILU(k) factor from a CSC matrix A.
Sourcepub fn symbolic(&self) -> &SymbolicIluk<I>
pub fn symbolic(&self) -> &SymbolicIluk<I>
Borrow the symbolic factor.
Sourcepub fn refactorize(
&mut self,
a: SparseColMatRef<'_, I, T>,
) -> Result<(), IlukError>
pub fn refactorize( &mut self, a: SparseColMatRef<'_, I, T>, ) -> Result<(), IlukError>
Refactorise against a new matrix with the same sparsity pattern.
Performs zero heap allocations.
§Errors
IlukError::PatternMismatchifa’s shape disagrees with the symbolic structure.IlukError::ZeroPivotif a pivot of magnitude zero is encountered.
Sourcepub fn l_view(&self) -> SparseColMatRef<'_, I, T>
pub fn l_view(&self) -> SparseColMatRef<'_, I, T>
View over the L factor (unit lower triangular, diagonal first).
Sourcepub fn u_view(&self) -> SparseColMatRef<'_, I, T>
pub fn u_view(&self) -> SparseColMatRef<'_, I, T>
View over the U factor (upper triangular, diagonal last).
Trait Implementations§
Source§impl<I, T> BiLinOp<T> for Iluk<I, T>
impl<I, T> BiLinOp<T> for Iluk<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
computes the workspace layout required to apply the transpose or adjoint
o
self to a matrix with rhs_ncols columnsSource§impl<I, T> BiPrecond<T> for Iluk<I, T>
impl<I, T> BiPrecond<T> for Iluk<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
computes the workspace layout required to apply the transpose or adjoint
of
self to a matrix with rhs_ncols columns in placeSource§impl<I, T> LinOp<T> for Iluk<I, T>
impl<I, T> LinOp<T> for Iluk<I, T>
Source§fn apply_scratch(&self, _rhs_ncols: usize, _par: Par) -> StackReq
fn apply_scratch(&self, _rhs_ncols: usize, _par: Par) -> StackReq
computes the workspace layout required to apply
self or the conjugate
o self to a matrix with rhs_ncols columnsSource§impl<I, T> Precond<T> for Iluk<I, T>
impl<I, T> Precond<T> for Iluk<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
computes the workspace layout required to apply
self or the conjugate
of self to a matrix with rhs_ncols columns in placeAuto Trait Implementations§
impl<I, T> Freeze for Iluk<I, T>
impl<I, T> RefUnwindSafe for Iluk<I, T>where
T: RefUnwindSafe,
I: RefUnwindSafe,
impl<I, T> Send for Iluk<I, T>
impl<I, T> Sync for Iluk<I, T>
impl<I, T> Unpin for Iluk<I, T>
impl<I, T> UnsafeUnpin for Iluk<I, T>
impl<I, T> UnwindSafe for Iluk<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
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> 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>
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