SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::component::constraint::lagrangian::solver::GenericConstraintProblem Class Reference

#include <GenericConstraintProblem.h>

Inheritance diagram for sofa::component::constraint::lagrangian::solver::GenericConstraintProblem:

Public Attributes

sofa::linearalgebra::FullVector< SReal > _d
 
std::vector< core::behavior::ConstraintResolution * > constraintsResolutions
 
bool scaleTolerance
 
bool allVerified
 
SReal sor
 
SReal sceneTime
 
SReal currentError
 
int currentIterations
 
linearalgebra::SparseMatrix< SReal > Wdiag
 
std::list< unsigned int > constraints_sequence
 
bool change_sequence
 
std::vector< ConstraintCorrectionscclist_elems
 
- Public Attributes inherited from sofa::component::constraint::lagrangian::solver::ConstraintProblem
sofa::linearalgebra::LPtrFullMatrix< SReal > W
 
sofa::linearalgebra::FullVector< SReal > dFree
 
sofa::linearalgebra::FullVector< SReal > f
 
SReal tolerance
 
int maxIterations
 

Protected Attributes

sofa::linearalgebra::FullVector< SReal > m_lam
 
sofa::linearalgebra::FullVector< SReal > m_deltaF
 
sofa::linearalgebra::FullVector< SReal > m_deltaF_new
 
sofa::linearalgebra::FullVector< SReal > m_p
 
- Protected Attributes inherited from sofa::component::constraint::lagrangian::solver::ConstraintProblem
int dimension
 
unsigned int problemId
 

Public Member Functions

 GenericConstraintProblem ()
 
 ~GenericConstraintProblem () override
 
void clear (int nbConstraints) override
 
void freeConstraintResolutions ()
 
void solveTimed (SReal tol, int maxIt, SReal timeout) override
 
void gaussSeidel (SReal timeout=0, GenericConstraintSolver *solver=nullptr)
 Projective Gauss Seidel method building the compliance matrix. More...
 
void unbuiltGaussSeidel (SReal timeout=0, GenericConstraintSolver *solver=nullptr)
 Projective Gauss Seidel unbuilt method. More...
 
void NNCG (GenericConstraintSolver *solver=nullptr, int iterationNewton=1)
 
void gaussSeidel_increment (bool measureError, SReal *dfree, SReal *force, SReal **w, SReal tol, SReal *d, int dim, bool &constraintsAreVerified, SReal &error, sofa::type::vector< SReal > &tabErrors) const
 
void result_output (GenericConstraintSolver *solver, SReal *force, SReal error, int iterCount, bool convergence)
 
int getNumConstraints ()
 
int getNumConstraintGroups ()
 
- Public Member Functions inherited from sofa::component::constraint::lagrangian::solver::ConstraintProblem
 ConstraintProblem ()
 
virtual ~ConstraintProblem ()
 
int getDimension ()
 
SReal ** getW ()
 
SReal * getDfree ()
 
SReal * getF ()
 
unsigned int getProblemId ()
 

Attribute details

◆ _d

sofa::linearalgebra::FullVector<SReal> sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::_d

◆ allVerified

bool sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::allVerified

◆ cclist_elems

std::vector< ConstraintCorrections > sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::cclist_elems

◆ change_sequence

bool sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::change_sequence

◆ constraints_sequence

std::list<unsigned int> sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::constraints_sequence

◆ constraintsResolutions

std::vector<core::behavior::ConstraintResolution*> sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::constraintsResolutions

◆ currentError

SReal sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::currentError

◆ currentIterations

int sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::currentIterations

◆ m_deltaF

sofa::linearalgebra::FullVector<SReal> sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::m_deltaF
protected

◆ m_deltaF_new

sofa::linearalgebra::FullVector<SReal> sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::m_deltaF_new
protected

◆ m_lam

sofa::linearalgebra::FullVector<SReal> sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::m_lam
protected

◆ m_p

sofa::linearalgebra::FullVector<SReal> sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::m_p
protected

◆ scaleTolerance

bool sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::scaleTolerance

◆ sceneTime

SReal sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::sceneTime

◆ sor

SReal sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::sor

◆ Wdiag

linearalgebra::SparseMatrix<SReal> sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::Wdiag

Constructor details

◆ GenericConstraintProblem()

sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::GenericConstraintProblem ( )
inline

◆ ~GenericConstraintProblem()

sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::~GenericConstraintProblem ( )
inlineoverride

Function details

◆ clear()

void sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::clear ( int  nbConstraints)
overridevirtual

◆ freeConstraintResolutions()

void sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::freeConstraintResolutions ( )

◆ gaussSeidel()

void sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::gaussSeidel ( SReal  timeout = 0,
GenericConstraintSolver solver = nullptr 
)

Projective Gauss Seidel method building the compliance matrix.

◆ gaussSeidel_increment()

void sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::gaussSeidel_increment ( bool  measureError,
SReal *  dfree,
SReal *  force,
SReal **  w,
SReal  tol,
SReal *  d,
int  dim,
bool constraintsAreVerified,
SReal &  error,
sofa::type::vector< SReal > &  tabErrors 
) const

◆ getNumConstraintGroups()

int sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::getNumConstraintGroups ( )

◆ getNumConstraints()

int sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::getNumConstraints ( )

◆ NNCG()

void sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::NNCG ( GenericConstraintSolver solver = nullptr,
int  iterationNewton = 1 
)

Method from: A nonsmooth nonlinear conjugate gradient method for interactive contact force problems

  • 2010, Silcowitz, Morten and Niebe, Sarah and Erleben, Kenny

◆ result_output()

void sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::result_output ( GenericConstraintSolver solver,
SReal *  force,
SReal  error,
int  iterCount,
bool  convergence 
)

◆ solveTimed()

void sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::solveTimed ( SReal  tol,
int  maxIt,
SReal  timeout 
)
overridevirtual

◆ unbuiltGaussSeidel()

void sofa::component::constraint::lagrangian::solver::GenericConstraintProblem::unbuiltGaussSeidel ( SReal  timeout = 0,
GenericConstraintSolver solver = nullptr 
)

Projective Gauss Seidel unbuilt method.