SOFA plugin: SofaPardisoSolver  master
Open source framework for multi-physics simuation
sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector > Class Template Reference

#include <SparsePARDISOSolver.h>

Direct linear solvers implemented with the PARDISO library. More...

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

Detailed Description

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

Direct linear solvers implemented with the PARDISO library.

Classes

class  SparsePARDISOSolverInvertData
 

Public Attributes

Data< int > f_symmetric
 0 = nonsymmetric arbitrary matrix, 1 = symmetric matrix, 2 = symmetric positive definite, -1 = structurally symmetric matrix More...
 
Data< bool > f_verbose
 Dump system state at each iteration. More...
 
Data< std::string > f_exportDataToDir
 export data (matrix, RHS, solution) to files in given directory More...
 
Data< bool > f_iterativeSolverNumbering
 if true, the naming convention is incN_itM where N is the time step and M is the iteration inside the step More...
 
Data< bool > f_saveDataToFile
 if true, export the data to the current directory (if exportDataToDir not set) More...
 

Protected Attributes

bool doExportData
 
std::string suffix
 
int numStep
 
long int timeStep
 
int numPrevNZ
 
int numActNZ
 

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE2(SparsePARDISOSolver, TMatrix, TVector), SOFA_TEMPLATE2(sofa::component::linearsolver::MatrixLinearSolver, TMatrix, TVector))
 
 SparsePARDISOSolver ()
 
 ~SparsePARDISOSolver ()
 
virtual void init ()
 
void solve (Matrix &M, Vector &x, Vector &b)
 
void invert (Matrix &M)
 
MatrixInvertDatacreateInvertData ()
 
- Public Member Functions inherited from sofa::component::linearsolver::MatrixLinearSolver< class, class, class >
void resetSystem ()
 
void resizeSystem (Size n)
 
void setSystemMBKMatrix (const core::MechanicalParams *mparams)
 
void rebuildSystem (SReal, SReal)
 
void setSystemLHVector (core::MultiVecDerivId v)
 
void applySystemSolution ()
 
void applyConstraintForce (const sofa::core::ConstraintParams *, sofa::core::MultiVecDerivId, const linearalgebra::BaseVector *)
 
void computeResidual (const core::ExecParams *, linearalgebra::BaseVector *)
 
GraphScatteredVectorcreatePersistentVector ()
 
linearalgebra::BaseMatrixgetSystemBaseMatrix ()
 
linearalgebra::BaseVectorgetSystemRHBaseVector ()
 
linearalgebra::BaseVectorgetSystemLHBaseVector ()
 
void checkLinearSystem ()
 
bool addJMInvJtLocal (GraphScatteredMatrix *M, MatrixLinearSolver< GraphScatteredMatrix, GraphScatteredVector, NoThreadManager >::ResMatrixType *result, const MatrixLinearSolver< GraphScatteredMatrix, GraphScatteredVector, NoThreadManager >::JMatrixType *J, const SReal fact)
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void resetSystem ()
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void resizeSystem (Size)
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void setSystemMBKMatrix (const core::MechanicalParams *mparams)
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void rebuildSystem (SReal massFactor, SReal forceFactor)
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void setSystemLHVector (core::MultiVecDerivId v)
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void applySystemSolution ()
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API GraphScatteredVectorcreatePersistentVector ()
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API linearalgebra::BaseMatrixgetSystemBaseMatrix ()
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API linearalgebra::BaseVectorgetSystemRHBaseVector ()
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API linearalgebra::BaseVectorgetSystemLHBaseVector ()
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void applyConstraintForce (const sofa::core::ConstraintParams *, sofa::core::MultiVecDerivId, const linearalgebra::BaseVector *)
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void computeResidual (const core::ExecParams *params, linearalgebra::BaseVector *f)
 
SOFA_COMPONENT_LINEARSOLVER_ITERATIVE_API void checkLinearSystem ()
 

Protected Member Functions

int callPardiso (SparsePARDISOSolverInvertData *data, int phase, Vector *vx=NULL, Vector *vb=NULL)
 

Attribute details

◆ doExportData

template<class TMatrix , class TVector >
bool sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector >::doExportData
protected

◆ f_exportDataToDir

template<class TMatrix , class TVector >
Data<std::string> sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector >::f_exportDataToDir

export data (matrix, RHS, solution) to files in given directory

◆ f_iterativeSolverNumbering

template<class TMatrix , class TVector >
Data<bool> sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector >::f_iterativeSolverNumbering

if true, the naming convention is incN_itM where N is the time step and M is the iteration inside the step

◆ f_saveDataToFile

template<class TMatrix , class TVector >
Data<bool> sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector >::f_saveDataToFile

if true, export the data to the current directory (if exportDataToDir not set)

◆ f_symmetric

template<class TMatrix , class TVector >
Data<int> sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector >::f_symmetric

0 = nonsymmetric arbitrary matrix, 1 = symmetric matrix, 2 = symmetric positive definite, -1 = structurally symmetric matrix

◆ f_verbose

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

Dump system state at each iteration.

◆ numActNZ

template<class TMatrix , class TVector >
int sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector >::numActNZ
protected

◆ numPrevNZ

template<class TMatrix , class TVector >
int sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector >::numPrevNZ
protected

◆ numStep

template<class TMatrix , class TVector >
int sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector >::numStep
protected

◆ suffix

template<class TMatrix , class TVector >
std::string sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector >::suffix
protected

◆ timeStep

template<class TMatrix , class TVector >
long int sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector >::timeStep
protected

Constructor details

◆ SparsePARDISOSolver()

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

◆ ~SparsePARDISOSolver()

template<class TMatrix , class TVector >
sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector >::~SparsePARDISOSolver

Function details

◆ callPardiso()

template<class TMatrix , class TVector >
int sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector >::callPardiso ( SparsePARDISOSolverInvertData data,
int  phase,
Vector vx = NULL,
Vector vb = NULL 
)
protected

◆ createInvertData()

template<class TMatrix , class TVector >
MatrixInvertData* sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector >::createInvertData ( )
inline

◆ init()

template<class TMatrix , class TVector >
void sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector >::init
virtual

◆ invert()

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

◆ SOFA_CLASS()

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

◆ solve()

template<class TMatrix , class TVector >
void sofa::component::linearsolver::SparsePARDISOSolver< TMatrix, TVector >::solve ( Matrix M,
Vector x,
Vector b 
)