template<class EigenSolver_t>
class SofaCaribou::solver::EigenSparseSolver< EigenSolver_t >
Base class for sparse direct solvers using Eigen as a backend solver.
Note that the complete system matrix has to be assemble for any of the derivated solvers. This means that the mass, damping and forcefield components in the scene graph need to implement the addMtoMatrix, addBtoMatrix and addMtoMatrix methods respectively.
- Template Parameters
-
EigenSolver_t | Eigen solver type (eg.: SimplicialLLT, SparseLU, PardisoLLT, etc.) |
|
| SOFA_CLASS (SOFA_TEMPLATE(EigenSparseSolver, EigenSolver_t), sofa::core::behavior::LinearSolver) |
|
virtual void | assemble (const sofa::core::MechanicalParams *mparams) |
| Assemble the system matrix A = (mM + bB + kK) inside the SparseMatrix p_A. More...
|
|
void | resetSystem () final |
| Reset the complete system (A, x and b are cleared). More...
|
|
void | setSystemMBKMatrix (const sofa::core::MechanicalParams *mparams) final |
| Set the linear system matrix A = (mM + bB + kK), storing the coefficients m, b and k of the mechanical M,B,K matrices. More...
|
|
void | setSystemRHVector (sofa::core::MultiVecDerivId b_id) final |
| Gives the identifier of the right-hand side vector b. More...
|
|
void | setSystemLHVector (sofa::core::MultiVecDerivId x_id) final |
| Gives the identifier of the left-hand side vector x. More...
|
|
void | solveSystem () override |
| Solves the system using the Eigen solver.
|
|
virtual auto | symmetric () const -> bool |
| States if the system matrix is symmetric. More...
|
|
virtual void | set_symmetric (bool is_symmetric) |
| Explicitly states if this matrix is symmetric.
|
|
auto | solver () const -> const EigenSolver & |
| Get a readonly reference to the backend solver.
|
|
auto | solver () -> EigenSolver & |
| Get a reference to the backend solver.
|
|
auto | mechanical_params () const -> const sofa::core::MechanicalParams & |
| Get a readonly reference to the mechanical parameters.
|
|
auto | matrix_accessor () const -> const sofa::component::linearsolver::DefaultMultiMatrixAccessor & |
| Get a readonly reference to the multi-matrix accessor. More...
|
|
auto | A () const -> const SparseMatrix & |
| Get a readonly reference to the global assembled system matrix.
|
|
auto | b_id () const -> const sofa::core::MultiVecDerivId & |
| Get a readonly reference to the right-hand side vector identifier.
|
|
auto | x_id () const -> const sofa::core::MultiVecDerivId & |
| Get a readonly reference to the left-hand side unknown vector identifier.
|
|
auto | A_is_factorized () const -> bool |
| True if the solver has successfully factorize the system matrix.
|
|
virtual sofa::defaulttype::BaseMatrix * | create_new_matrix (unsigned int rows, unsigned int cols) const =0 |
| Creates a new BaseMatrix of size rows x cols. More...
|
|
virtual sofa::defaulttype::BaseVector * | create_new_vector (unsigned int n) const =0 |
| Creates a new BaseVector of size n. More...
|
|
template<class EigenSolver_t >
Get a readonly reference to the multi-matrix accessor.
This accessor doesn't actually hold the system matrix, but will be the one responsible for accumulating it. It can also be use to compute the stiffness or the mass matrix of a given mechanical node or mapped node.
Use the EigenSparseSolver::matrix() method to get a reference to the global system matrix.
template<class EigenSolver >
Reset the complete system (A, x and b are cleared).
When using no preconditioner (None), this does absolutely nothing here since the complete system is never built.
This method is called by the MultiMatrix::clear() and MultiMatrix::reset() methods.