SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager > Class Template Reference

#include <WarpPreconditioner.h>

Linear system solver wrapping another (precomputed) linear solver by a per-node rotation matrix. More...

Inheritance diagram for sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >:

Detailed Description

template<class TMatrix, class TVector, class ThreadManager = NoThreadManager>
class sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >

Linear system solver wrapping another (precomputed) linear solver by a per-node rotation matrix.

Public Attributes

SingleLink< WarpPreconditioner, sofa::core::behavior::LinearSolver, BaseLink::FLAG_STOREPATH|BaseLink::FLAG_STRONGLINKl_linearSolver
 Link towards the linear solver used to build the warp conditioner. More...
 
Data< unsigned > f_useRotationFinder
 Which rotation Finder to use. More...
 
Data< unsigned > d_updateStep
 Number of steps before the next refresh of the system matrix in the main solver. More...
 

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE3(WarpPreconditioner, TMatrix, TVector, ThreadManager), SOFA_TEMPLATE3(sofa::component::linearsolver::MatrixLinearSolver, TMatrix, TVector, ThreadManager))
 
 ~WarpPreconditioner ()
 
void init () override
 
void bwdInit () override
 
void setSystemMBKMatrix (const core::MechanicalParams *mparams) override
 
void invert (Matrix &M) override
 
void solve (Matrix &M, Vector &solution, Vector &rh) override
 Solve the system as constructed using the previous methods. More...
 
bool addJMInvJt (linearalgebra::BaseMatrix *result, linearalgebra::BaseMatrix *J, SReal fact) override
 Solve the system as constructed using the previous methods. More...
 
bool addMInvJt (linearalgebra::BaseMatrix *result, linearalgebra::BaseMatrix *J, SReal fact) override
 
Index getSystemDimention (const sofa::core::MechanicalParams *mparams)
 
void computeResidual (const core::ExecParams *params, linearalgebra::BaseVector *) override
 
void updateSystemMatrix () override
 
- Public Member Functions inherited from sofa::component::linearsolver::MatrixLinearSolver< TMatrix, TVector, NoThreadManager >
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

 WarpPreconditioner ()
 
void checkLinearSystem () override
 

Attribute details

◆ d_updateStep

template<class TMatrix , class TVector , class ThreadManager = NoThreadManager>
Data<unsigned> sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::d_updateStep

Number of steps before the next refresh of the system matrix in the main solver.

◆ f_useRotationFinder

template<class TMatrix , class TVector , class ThreadManager = NoThreadManager>
Data<unsigned> sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::f_useRotationFinder

Which rotation Finder to use.

◆ l_linearSolver

template<class TMatrix , class TVector , class ThreadManager = NoThreadManager>
SingleLink<WarpPreconditioner, sofa::core::behavior::LinearSolver, BaseLink::FLAG_STOREPATH | BaseLink::FLAG_STRONGLINK> sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::l_linearSolver

Link towards the linear solver used to build the warp conditioner.

Constructor details

◆ WarpPreconditioner()

template<class TMatrix , class TVector , class ThreadManager >
sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::WarpPreconditioner
protected

◆ ~WarpPreconditioner()

template<class TMatrix , class TVector , class ThreadManager >
sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::~WarpPreconditioner

Function details

◆ addJMInvJt()

template<class TMatrix , class TVector , class ThreadManager >
bool sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::addJMInvJt ( linearalgebra::BaseMatrix result,
linearalgebra::BaseMatrix J,
SReal  fact 
)
override

Solve the system as constructed using the previous methods.

◆ addMInvJt()

template<class TMatrix , class TVector , class ThreadManager >
bool sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::addMInvJt ( linearalgebra::BaseMatrix result,
linearalgebra::BaseMatrix J,
SReal  fact 
)
override

◆ bwdInit()

template<class TMatrix , class TVector , class ThreadManager >
void sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::bwdInit
override

◆ checkLinearSystem()

template<class TMatrix , class TVector , class ThreadManager >
void sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::checkLinearSystem
overrideprotected

◆ computeResidual()

template<class TMatrix , class TVector , class ThreadManager >
void sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::computeResidual ( const core::ExecParams params,
linearalgebra::BaseVector f 
)
override

◆ getSystemDimention()

template<class TMatrix , class TVector , class ThreadManager >
WarpPreconditioner< TMatrix, TVector, ThreadManager >::Index sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::getSystemDimention ( const sofa::core::MechanicalParams mparams)

◆ init()

template<class TMatrix , class TVector , class ThreadManager >
void sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::init ( void  )
override

◆ invert()

template<class TMatrix , class TVector , class ThreadManager >
void sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::invert ( Matrix M)
override

◆ setSystemMBKMatrix()

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

◆ SOFA_CLASS()

template<class TMatrix , class TVector , class ThreadManager = NoThreadManager>
sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::SOFA_CLASS ( SOFA_TEMPLATE3(WarpPreconditioner< TMatrix, TVector, ThreadManager >, TMatrix, TVector, ThreadManager)  ,
SOFA_TEMPLATE3(sofa::component::linearsolver::MatrixLinearSolver, TMatrix, TVector, ThreadManager)   
)

◆ solve()

template<class TMatrix , class TVector , class ThreadManager >
void sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::solve ( Matrix M,
Vector solution,
Vector rh 
)
override

Solve the system as constructed using the previous methods.

◆ updateSystemMatrix()

template<class TMatrix , class TVector , class ThreadManager >
void sofa::component::linearsolver::preconditioner::WarpPreconditioner< TMatrix, TVector, ThreadManager >::updateSystemMatrix
override