SOFA API  7352f41a
Open source framework for multi-physics simuation
sofa::component::linearsolver::direct::CholeskySolver< TMatrix, TVector > Class Template Reference

#include <CholeskySolver.h>

Direct linear solver based on Cholesky factorization, for dense matrices. More...

Inheritance diagram for sofa::component::linearsolver::direct::CholeskySolver< TMatrix, TVector >:

Detailed Description

template<class TMatrix, class TVector>
class sofa::component::linearsolver::direct::CholeskySolver< TMatrix, TVector >

Direct linear solver based on Cholesky factorization, for dense matrices.

Public Attributes

sofa::core::objectmodel::lifecycle::RemovedData f_verbose {this, "v23.12", "v24.06", "verbose", "This Data is no longer used"}
 

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE2(CholeskySolver, TMatrix, TVector), SOFA_TEMPLATE2(sofa::component::linearsolver::MatrixLinearSolver, TMatrix, TVector))
 
 CholeskySolver ()
 
void solve (Matrix &M, Vector &x, Vector &b) override
 Compute x such as Mx=b. M is not used, it must have been factored before using method invert(Matrix& M) More...
 
void invert (Matrix &M) override
 Factors the matrix. Must be done before solving. More...
 
- Public Member Functions inherited from sofa::component::linearsolver::MatrixLinearSolver< TMatrix, TVector >
void resetSystem ()
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void resetSystem ()
 
void resizeSystem (Size n)
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void resizeSystem (Size)
 
void setSystemMBKMatrix (const core::MechanicalParams *mparams)
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void setSystemMBKMatrix (const core::MechanicalParams *mparams)
 
void rebuildSystem (SReal, SReal)
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void rebuildSystem (SReal massFactor, SReal forceFactor)
 
void setSystemLHVector (core::MultiVecDerivId v)
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void setSystemLHVector (core::MultiVecDerivId v)
 
void applySystemSolution ()
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void applySystemSolution ()
 
void applyConstraintForce (const sofa::core::ConstraintParams *, sofa::core::MultiVecDerivId, const linearalgebra::BaseVector *)
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void applyConstraintForce (const sofa::core::ConstraintParams *, sofa::core::MultiVecDerivId, const linearalgebra::BaseVector *)
 
void computeResidual (const core::ExecParams *, linearalgebra::BaseVector *)
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void computeResidual (const core::ExecParams *params, linearalgebra::BaseVector *f)
 
GraphScatteredVectorcreatePersistentVector ()
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API GraphScatteredVectorcreatePersistentVector ()
 
linearalgebra::BaseMatrixgetSystemBaseMatrix ()
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API linearalgebra::BaseMatrixgetSystemBaseMatrix ()
 
linearalgebra::BaseVectorgetSystemRHBaseVector ()
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API linearalgebra::BaseVectorgetSystemRHBaseVector ()
 
linearalgebra::BaseVectorgetSystemLHBaseVector ()
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API linearalgebra::BaseVectorgetSystemLHBaseVector ()
 
void checkLinearSystem ()
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void checkLinearSystem ()
 
bool addJMInvJtLocal (GraphScatteredMatrix *M, MatrixLinearSolver< GraphScatteredMatrix, GraphScatteredVector, NoThreadManager >::ResMatrixType *result, const MatrixLinearSolver< GraphScatteredMatrix, GraphScatteredVector, NoThreadManager >::JMatrixType *J, const SReal fact)
 

Attribute details

◆ f_verbose

template<class TMatrix , class TVector >
sofa::core::objectmodel::lifecycle::RemovedData sofa::component::linearsolver::direct::CholeskySolver< TMatrix, TVector >::f_verbose {this, "v23.12", "v24.06", "verbose", "This Data is no longer used"}

Constructor details

◆ CholeskySolver()

template<class TMatrix , class TVector >
sofa::component::linearsolver::direct::CholeskySolver< TMatrix, TVector >::CholeskySolver

Function details

◆ invert()

template<class TMatrix , class TVector >
void sofa::component::linearsolver::direct::CholeskySolver< TMatrix, TVector >::invert ( Matrix M)
override

Factors the matrix. Must be done before solving.

◆ SOFA_CLASS()

template<class TMatrix , class TVector >
sofa::component::linearsolver::direct::CholeskySolver< TMatrix, TVector >::SOFA_CLASS ( SOFA_TEMPLATE2(CholeskySolver< TMatrix, TVector >, TMatrix, TVector)  ,
SOFA_TEMPLATE2(sofa::component::linearsolver::MatrixLinearSolver, TMatrix, TVector)   
)

◆ solve()

template<class TMatrix , class TVector >
void sofa::component::linearsolver::direct::CholeskySolver< TMatrix, TVector >::solve ( Matrix M,
Vector z,
Vector r 
)
override

Compute x such as Mx=b. M is not used, it must have been factored before using method invert(Matrix& M)

Factorisation : A = LL^t A x = b <=> LL^t x = b <=> L u = b , L^t x = u