SOFA API  d5b6f761
Open source framework for multi-physics simuation
sofa::component::linearsolver::iterative::MinResLinearSolver< TMatrix, TVector > Class Template Reference

#include <MinResLinearSolver.h>

Inheritance diagram for sofa::component::linearsolver::iterative::MinResLinearSolver< TMatrix, TVector >:

Detailed Description

template<class TMatrix, class TVector>
class sofa::component::linearsolver::iterative::MinResLinearSolver< TMatrix, TVector >

Linear system solver using the MINRES iterative algorithm

Author
Matthieu Nesme
Date
2013

Public Attributes

Data< unsigned > f_maxIter
 maximum number of iterations of the Conjugate Gradient solution More...
 
Data< double > f_tolerance
 desired precision of the Conjugate Gradient Solution (ratio of current residual norm over initial residual norm) More...
 
sofa::core::objectmodel::lifecycle::RemovedData f_verbose {this, "v23.12", "v24.06", "verbose", "This Data is no longer used"}
 
Data< std::map< std::string, sofa::type::vector< SReal > > > f_graph
 Graph of residuals at each iteration. More...
 

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE2(MinResLinearSolver, TMatrix, TVector), SOFA_TEMPLATE2(sofa::component::linearsolver::MatrixLinearSolver, TMatrix, TVector))
 
void resetSystem () override
 
void setSystemMBKMatrix (const sofa::core::MechanicalParams *mparams) override
 
void solve (Matrix &M, Vector &x, Vector &b) override
 Solve Mx=b. More...
 
void parse (core::objectmodel::BaseObjectDescription *arg) override
 
- 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)
 

Protected Member Functions

 MinResLinearSolver ()
 Linear system solver using the conjugate gradient iterative algorithm. More...
 

Attribute details

◆ f_graph

template<class TMatrix , class TVector >
Data<std::map < std::string, sofa::type::vector<SReal> > > sofa::component::linearsolver::iterative::MinResLinearSolver< TMatrix, TVector >::f_graph

Graph of residuals at each iteration.

◆ f_maxIter

template<class TMatrix , class TVector >
Data<unsigned> sofa::component::linearsolver::iterative::MinResLinearSolver< TMatrix, TVector >::f_maxIter

maximum number of iterations of the Conjugate Gradient solution

◆ f_tolerance

template<class TMatrix , class TVector >
Data<double> sofa::component::linearsolver::iterative::MinResLinearSolver< TMatrix, TVector >::f_tolerance

desired precision of the Conjugate Gradient Solution (ratio of current residual norm over initial residual norm)

◆ f_verbose

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

Constructor details

◆ MinResLinearSolver()

template<class TMatrix , class TVector >
sofa::component::linearsolver::iterative::MinResLinearSolver< TMatrix, TVector >::MinResLinearSolver
protected

Linear system solver using the conjugate gradient iterative algorithm.

Function details

◆ parse()

template<class TMatrix , class TVector >
void sofa::component::linearsolver::iterative::MinResLinearSolver< TMatrix, TVector >::parse ( core::objectmodel::BaseObjectDescription arg)
override

◆ resetSystem()

template<class TMatrix , class TVector >
void sofa::component::linearsolver::iterative::MinResLinearSolver< TMatrix, TVector >::resetSystem
override

◆ setSystemMBKMatrix()

template<class TMatrix , class TVector >
void sofa::component::linearsolver::iterative::MinResLinearSolver< TMatrix, TVector >::setSystemMBKMatrix ( const sofa::core::MechanicalParams mparams)
override

◆ SOFA_CLASS()

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

◆ solve()

template<class TMatrix , class TVector >
void sofa::component::linearsolver::iterative::MinResLinearSolver< TMatrix, TVector >::solve ( Matrix A,
Vector x,
Vector b 
)
override

Solve Mx=b.

Solve Ax=b code issued (and modified) from tminres (https://code.google.com/p/tminres/)