![]() |
NDEVR
API Documentation
|
linear solver which uses the sparse Cholesky solver from Eigen More...
Classes | |
| class | CholeskyDecomposition |
| Sub-classing Eigen's SimplicialLDLT to perform ordering with a given ordering. More... | |
Public Types | |
| typedef Eigen::PermutationMatrix< Eigen::Dynamic, Eigen::Dynamic, int > | PermutationMatrix |
| Permutation matrix type. | |
| typedef Eigen::SparseMatrix< g_type, Eigen::ColMajor > | SparseMatrix |
| Column-major Eigen sparse matrix type. | |
| typedef Eigen::Triplet< g_type > | Triplet |
| Triplet type for sparse matrix construction. | |
Public Member Functions | |
| LinearSolverEigen () | |
| Default constructor. | |
| bool | blockOrdering () const |
| do the AMD ordering on the blocks or on the scalar matrix | |
| virtual bool | init () |
| Resets the solver for a new factorization. | |
| bool | solve (const SparseBlockMatrix< MatrixType > &A, g_type *x, g_type *b) |
| Solves the linear system Ax = b using sparse Cholesky decomposition. | |
Public Attributes | |
| SparseOptimizer | optimizer |
| The sparse optimizer instance. | |
Protected Member Functions | |
| void | computeSymbolicDecomposition (const SparseBlockMatrix< MatrixType > &A) |
| compute the symbolic decompostion of the matrix only once. | |
Protected Attributes | |
| bool | _blockOrdering |
| Whether to use block-level AMD ordering. | |
| CholeskyDecomposition | _cholesky |
| The Cholesky decomposition. | |
| bool | _init |
| Whether the symbolic decomposition needs to be (re)computed. | |
| SparseMatrix | _sparseMatrix |
| The Eigen sparse matrix representation. | |
linear solver which uses the sparse Cholesky solver from Eigen
Has no dependencies except Eigen. Hence, should compile almost everywhere without to much issues. Performance should be similar to CSparse, I guess.
Definition at line 46 of file linear_solver_eigen.h.
|
inlineprotected |
compute the symbolic decompostion of the matrix only once.
Since A has the same pattern in all the iterations, we only compute the fill-in reducing ordering once and re-use for all the following iterations.
Definition at line 141 of file linear_solver_eigen.h.
References _blockOrdering, _cholesky, and _sparseMatrix.
Referenced by solve().
|
inlinevirtual |
Resets the solver for a new factorization.
Definition at line 91 of file linear_solver_eigen.h.
References _init.
|
inline |
Solves the linear system Ax = b using sparse Cholesky decomposition.
| [in] | A | The sparse block matrix (symmetric, positive definite). |
| [out] | x | The solution vector. |
| [in] | b | The right-hand side vector. |
Definition at line 102 of file linear_solver_eigen.h.
References _cholesky, _init, _sparseMatrix, and computeSymbolicDecomposition().