pub struct SolverUMFPACK { /* private fields */ }Expand description
Wraps the UMFPACK solver for sparse linear systems
Warning: This solver may “run out of memory” for very large matrices.
Implementations§
Trait Implementations§
Source§impl LinSolTrait for SolverUMFPACK
impl LinSolTrait for SolverUMFPACK
Source§fn factorize(
&mut self,
mat: &CooMatrix,
params: Option<LinSolParams>,
) -> Result<(), StrError>
fn factorize( &mut self, mat: &CooMatrix, params: Option<LinSolParams>, ) -> Result<(), StrError>
Performs the factorization (and analysis/initialization if needed)
§Input
mat– the coefficient matrix A. The matrix must be square (nrow = ncol) and, if symmetric, the symmetric flag must be Sym::YesFullparams– configuration parameters; None => use default
§Notes
- The structure of the matrix (nrow, ncol, nnz, sym) must be
exactly the same among multiple calls to
factorize. The values may differ from call to call, nonetheless. - The first call to
factorizewill define the structure which must be kept the same for the next calls. - If the structure of the matrix needs to be changed, the solver must be “dropped” and a new solver allocated.
- For symmetric matrices,
UMFPACKrequires Sym::YesFull
Source§fn solve(
&mut self,
x: &mut Vector,
rhs: &Vector,
verbose: bool,
) -> Result<(), StrError>
fn solve( &mut self, x: &mut Vector, rhs: &Vector, verbose: bool, ) -> Result<(), StrError>
Computes the solution of the linear system
Solves the linear system:
A · x = rhs
(m,m) (m) (m)§Output
x– the vector of unknown values with dimension equal to mat.nrow
§Input
mat– the coefficient matrix A; it must be square and, if symmetric, Sym::YesFull.rhs– the right-hand side vector with know values an dimension equal to mat.nrowverbose– shows messages
Warning: the matrix must be same one used in factorize.
Source§fn update_stats(&self, stats: &mut StatsLinSol)
fn update_stats(&self, stats: &mut StatsLinSol)
Updates the stats structure (should be called after solve)
Source§fn get_ns_init(&self) -> u128
fn get_ns_init(&self) -> u128
Returns the nanoseconds spent on initialize
Source§fn get_ns_fact(&self) -> u128
fn get_ns_fact(&self) -> u128
Returns the nanoseconds spent on factorize
Source§fn get_ns_solve(&self) -> u128
fn get_ns_solve(&self) -> u128
Returns the nanoseconds spent on solve
impl Send for SolverUMFPACK
Enforce Send on the Rust structure
Auto Trait Implementations§
impl Freeze for SolverUMFPACK
impl RefUnwindSafe for SolverUMFPACK
impl !Sync for SolverUMFPACK
impl Unpin for SolverUMFPACK
impl UnwindSafe for SolverUMFPACK
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