Class SUNLinSolKLU¶
Defined in File sundials_linsol_wrapper.h
Inheritance Relationships¶
Base Type¶
public amici::SUNLinSolWrapper
(Class SUNLinSolWrapper)
Class Documentation¶
-
class
amici
::
SUNLinSolKLU
: public amici::SUNLinSolWrapper¶ SUNDIALS KLU sparse direct solver.
Public Types
Public Functions
-
SUNLinSolKLU
(N_Vector x, SUNMatrix A)¶ Create KLU solver with given matrix.
- Parameters
x
: A template for cloning vectors needed within the solver.A
: sparse matrix
-
SUNLinSolKLU
(AmiVector const &x, int nnz, int sparsetype, StateOrdering ordering)¶ Create KLU solver and matrix to operate on.
- Parameters
x
: A template for cloning vectors needed within the solver.nnz
: Number of non-zeros in matrix Asparsetype
: Sparse matrix type (CSC_MAT, CSR_MAT)ordering
:
-
SUNMatrix
getMatrix
() const override¶ Get the matrix A (matrix solvers only).
- Return
A
-
void
reInit
(int nnz, int reinit_type)¶ Reinitializes memory and flags for a new factorization (symbolic and numeric) to be conducted at the next solver setup call.
For more details see sunlinsol/sunlinsol_klu.h
- Parameters
nnz
: Number of non-zerosreinit_type
: SUNKLU_REINIT_FULL or SUNKLU_REINIT_PARTIAL
-
void
setOrdering
(StateOrdering ordering)¶ Sets the ordering used by KLU for reducing fill in the linear solve.
- Parameters
ordering
:
-