SOFA API  6a688117
Open source framework for multi-physics simuation
sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector > Class Template Reference

#include <PrecomputedLinearSolver.h>

Linear system solver based on a precomputed inverse matrix. More...

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

Detailed Description

template<class TMatrix, class TVector>
class sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >

Linear system solver based on a precomputed inverse matrix.

Public Attributes

Data< booljmjt_twostep
 Use two step algorithm to compute JMinvJt. More...
 
Data< boolf_verbose
 Dump system state at each iteration. More...
 
Data< booluse_file
 Dump system matrix in a file. More...
 
Data< intinit_MaxIter
 
Data< doubleinit_Tolerance
 
Data< doubleinit_Threshold
 

Protected Attributes

PrecomputedLinearSolverInternalData< TMatrix, TVector > internalData
 

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE2(PrecomputedLinearSolver, TMatrix, TVector), SOFA_TEMPLATE2(sofa::component::linearsolver::MatrixLinearSolver, TMatrix, TVector))
 
 PrecomputedLinearSolver ()
 
void solve (TMatrix &M, TVector &x, TVector &b) override
 
void invert (TMatrix &M) override
 
void setSystemMBKMatrix (const core::MechanicalParams *mparams) override
 
void loadMatrix (TMatrix &M)
 
bool addJMInvJt (defaulttype::BaseMatrix *result, defaulttype::BaseMatrix *J, double fact) override
 
TBaseMatrixgetSystemMatrixInv ()
 

Static Public Member Functions

static const std::string GetCustomTemplateName ()
 

Protected Member Functions

template<class JMatrix >
void ComputeResult (defaulttype::BaseMatrix *result, JMatrix &J, float fact)
 
template<class JMatrix >
void computeActiveDofs (JMatrix &J)
 

Attribute details

template<class TMatrix , class TVector >
Data<bool> sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::f_verbose

Dump system state at each iteration.

template<class TMatrix , class TVector >
Data<int> sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::init_MaxIter
template<class TMatrix , class TVector >
Data<double> sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::init_Threshold
template<class TMatrix , class TVector >
Data<double> sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::init_Tolerance
template<class TMatrix , class TVector >
PrecomputedLinearSolverInternalData<TMatrix,TVector> sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::internalData
protected
template<class TMatrix , class TVector >
Data<bool> sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::jmjt_twostep

Use two step algorithm to compute JMinvJt.

template<class TMatrix , class TVector >
Data<bool> sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::use_file

Dump system matrix in a file.

Constructor details

template<class TMatrix , class TVector >
sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::PrecomputedLinearSolver ( )

Function details

template<class TMatrix , class TVector >
bool sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::addJMInvJt ( defaulttype::BaseMatrix result,
defaulttype::BaseMatrix J,
double  fact 
)
override
template<class TMatrix , class TVector >
template<class JMatrix >
void sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::computeActiveDofs ( JMatrix &  J)
protected
template<class TMatrix , class TVector >
template<class JMatrix >
void sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::ComputeResult ( defaulttype::BaseMatrix result,
JMatrix &  J,
float  fact 
)
protected
template<class TMatrix , class TVector >
static const std::string sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::GetCustomTemplateName ( )
inlinestatic

Returns the sofa template name. By default the name of the c++ class signature is exposed... so we need to override that by implementing GetCustomTemplateName() function More details on the name customization infrastructure is in NameDecoder.h

template<class TMatrix , class TVector >
TBaseMatrix* sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::getSystemMatrixInv ( )
inline
template<class TMatrix , class TVector >
void sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::invert ( TMatrix &  M)
override
template<class TMatrix , class TVector >
void sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::loadMatrix ( TMatrix &  M)
template<class TMatrix , class TVector >
void sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::setSystemMBKMatrix ( const core::MechanicalParams mparams)
override
template<class TMatrix , class TVector >
sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::SOFA_CLASS ( SOFA_TEMPLATE2(PrecomputedLinearSolver< TMatrix, TVector >, TMatrix, TVector)  ,
SOFA_TEMPLATE2(sofa::component::linearsolver::MatrixLinearSolver, TMatrix, TVector)   
)
template<class TMatrix , class TVector >
void sofa::component::linearsolver::PrecomputedLinearSolver< TMatrix, TVector >::solve ( TMatrix &  M,
TVector &  x,
TVector &  b 
)
override