All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
SurgSim::Math::MlcpGaussSeidelSolver Class Reference

A solver for mixed LCP problems using the Gauss-Seidel iterative method. More...

#include <SurgSim/Math/MlcpGaussSeidelSolver.h>

Inheritance diagram for SurgSim::Math::MlcpGaussSeidelSolver:
Inheritance graph
[legend]
Collaboration diagram for SurgSim::Math::MlcpGaussSeidelSolver:
Collaboration graph
[legend]

Public Member Functions

 MlcpGaussSeidelSolver ()
 
 MlcpGaussSeidelSolver (double epsilonConvergence, double contactTolerance, unsigned int maxIterations)
 
virtual ~MlcpGaussSeidelSolver ()
 
bool solve (const MlcpProblem &problem, MlcpSolution *solution)
 MLCP_GaussSeidel::solve Resolution of a given MLCP (Gauss Seidel iterative solver) More...
 
double getEpsilonConvergence () const
 
void setEpsilonConvergence (double val)
 
double getContactTolerance () const
 
void setContactTolerance (double val)
 
double getSubstepRatio () const
 
void setSubstepRatio (double val)
 
unsigned int getMaxIterations () const
 
void setMaxIterations (unsigned int val)
 
bool isCatchingExplodingConvergenceCriteria () const
 
void setCatchingExplodingConvergenceCriteria (bool val)
 
bool isVerbose () const
 
void setVerbose (bool val)
 
- Public Member Functions inherited from SurgSim::Math::MlcpSolver
 MlcpSolver ()
 Constructor. More...
 
virtual ~MlcpSolver ()
 

Static Public Member Functions

static double defaultEpsilonConvergence ()
 
static double defaultContactTolerance ()
 
static int defaultMaxIterations ()
 

Private Types

typedef Eigen::Matrix< double,
Eigen::Dynamic, Eigen::Dynamic > 
Matrix
 
typedef Eigen::Matrix< double,
Eigen::Dynamic, 1 > 
Vector
 

Private Member Functions

void computeEnforcementSystem (int n, const MlcpProblem::Matrix &A, int nbColumnInA, const MlcpProblem::Vector &b, const MlcpSolution::Vector &initialGuess_and_solution, const MlcpProblem::Vector &frictionCoefs, const std::vector< MlcpConstraintType > &constraintsType, double subStep, int constraintID, int matrixEntryForConstraintID)
 
void calculateConvergenceCriteria (int n, const MlcpProblem::Matrix &A, int nbColumnInA, const MlcpProblem::Vector &b, const MlcpSolution::Vector &initialGuess_and_solution, const std::vector< MlcpConstraintType > &constraintsType, double subStep, double constraint_convergence_criteria[MLCP_NUM_CONSTRAINT_TYPES], double &convergence_criteria, bool &signoriniVerified, bool &signoriniValid)
 
void doOneIteration (int n, const MlcpProblem::Matrix &A, int nbColumnInA, const MlcpProblem::Vector &b, MlcpSolution::Vector *initialGuess_and_solution, const MlcpProblem::Vector &frictionCoefs, const std::vector< MlcpConstraintType > &constraintsType, double subStep, double constraint_convergence_criteria[MLCP_NUM_CONSTRAINT_TYPES], double &convergence_criteria, bool &signoriniVerified)
 
void printViolationsAndConvergence (int n, const MlcpProblem::Matrix &A, int nbColumnInA, const MlcpProblem::Vector &b, const MlcpSolution::Vector &initialGuess_and_solution, const std::vector< MlcpConstraintType > &constraintsType, double subStep, double convergence_criteria, bool signorini_verified, int nbLoop)
 

Private Attributes

double m_epsilonConvergence
 
double m_contactTolerance
 
double m_substepRatio
 
unsigned int m_maxIterations
 
bool m_catchExplodingConvergenceCriteria
 
bool m_verbose
 
int m_numEnforcedAtomicConstraints
 
Matrix m_lhsEnforcedLocalSystem
 
Vector m_rhsEnforcedLocalSystem
 

Detailed Description

A solver for mixed LCP problems using the Gauss-Seidel iterative method.

Todo:
Clean this up more...

The problem can contain:

See e.g.: Duriez, Christian; Dubois, F.; Kheddar, A.; Andriot, C., "Realistic haptic rendering of interacting deformable objects in virtual environments," IEEE Transactions on Visualization and Computer Graphics, vol.12, no.1, pp.36,47, Jan.-Feb. 2006.

Member Typedef Documentation

typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> SurgSim::Math::MlcpGaussSeidelSolver::Matrix
private
typedef Eigen::Matrix<double, Eigen::Dynamic, 1> SurgSim::Math::MlcpGaussSeidelSolver::Vector
private

Constructor & Destructor Documentation

SurgSim::Math::MlcpGaussSeidelSolver::MlcpGaussSeidelSolver ( )
inline
SurgSim::Math::MlcpGaussSeidelSolver::MlcpGaussSeidelSolver ( double  epsilonConvergence,
double  contactTolerance,
unsigned int  maxIterations 
)
inline
virtual SurgSim::Math::MlcpGaussSeidelSolver::~MlcpGaussSeidelSolver ( )
inlinevirtual

Member Function Documentation

void SurgSim::Math::MlcpGaussSeidelSolver::calculateConvergenceCriteria ( int  n,
const MlcpProblem::Matrix A,
int  nbColumnInA,
const MlcpProblem::Vector b,
const MlcpSolution::Vector initialGuess_and_solution,
const std::vector< MlcpConstraintType > &  constraintsType,
double  subStep,
double  constraint_convergence_criteria[MLCP_NUM_CONSTRAINT_TYPES],
double &  convergence_criteria,
bool &  signoriniVerified,
bool &  signoriniValid 
)
private
void SurgSim::Math::MlcpGaussSeidelSolver::computeEnforcementSystem ( int  n,
const MlcpProblem::Matrix A,
int  nbColumnInA,
const MlcpProblem::Vector b,
const MlcpSolution::Vector initialGuess_and_solution,
const MlcpProblem::Vector frictionCoefs,
const std::vector< MlcpConstraintType > &  constraintsType,
double  subStep,
int  constraintID,
int  matrixEntryForConstraintID 
)
private
static double SurgSim::Math::MlcpGaussSeidelSolver::defaultContactTolerance ( )
inlinestatic
static double SurgSim::Math::MlcpGaussSeidelSolver::defaultEpsilonConvergence ( )
inlinestatic
static int SurgSim::Math::MlcpGaussSeidelSolver::defaultMaxIterations ( )
inlinestatic
void SurgSim::Math::MlcpGaussSeidelSolver::doOneIteration ( int  n,
const MlcpProblem::Matrix A,
int  nbColumnInA,
const MlcpProblem::Vector b,
MlcpSolution::Vector initialGuess_and_solution,
const MlcpProblem::Vector frictionCoefs,
const std::vector< MlcpConstraintType > &  constraintsType,
double  subStep,
double  constraint_convergence_criteria[MLCP_NUM_CONSTRAINT_TYPES],
double &  convergence_criteria,
bool &  signoriniVerified 
)
private
double SurgSim::Math::MlcpGaussSeidelSolver::getContactTolerance ( ) const
inline
double SurgSim::Math::MlcpGaussSeidelSolver::getEpsilonConvergence ( ) const
inline
unsigned int SurgSim::Math::MlcpGaussSeidelSolver::getMaxIterations ( ) const
inline
double SurgSim::Math::MlcpGaussSeidelSolver::getSubstepRatio ( ) const
inline
bool SurgSim::Math::MlcpGaussSeidelSolver::isCatchingExplodingConvergenceCriteria ( ) const
inline
bool SurgSim::Math::MlcpGaussSeidelSolver::isVerbose ( ) const
inline
void SurgSim::Math::MlcpGaussSeidelSolver::printViolationsAndConvergence ( int  n,
const MlcpProblem::Matrix A,
int  nbColumnInA,
const MlcpProblem::Vector b,
const MlcpSolution::Vector initialGuess_and_solution,
const std::vector< MlcpConstraintType > &  constraintsType,
double  subStep,
double  convergence_criteria,
bool  signorini_verified,
int  nbLoop 
)
private
void SurgSim::Math::MlcpGaussSeidelSolver::setCatchingExplodingConvergenceCriteria ( bool  val)
inline
void SurgSim::Math::MlcpGaussSeidelSolver::setContactTolerance ( double  val)
inline
void SurgSim::Math::MlcpGaussSeidelSolver::setEpsilonConvergence ( double  val)
inline
void SurgSim::Math::MlcpGaussSeidelSolver::setMaxIterations ( unsigned int  val)
inline
void SurgSim::Math::MlcpGaussSeidelSolver::setSubstepRatio ( double  val)
inline
void SurgSim::Math::MlcpGaussSeidelSolver::setVerbose ( bool  val)
inline
bool SurgSim::Math::MlcpGaussSeidelSolver::solve ( const MlcpProblem problem,
MlcpSolution solution 
)
virtual

MLCP_GaussSeidel::solve Resolution of a given MLCP (Gauss Seidel iterative solver)

Parameters
problemThe mlcp problem
solutionThe mlcp solution

Implements SurgSim::Math::MlcpSolver.

Member Data Documentation

bool SurgSim::Math::MlcpGaussSeidelSolver::m_catchExplodingConvergenceCriteria
private
double SurgSim::Math::MlcpGaussSeidelSolver::m_contactTolerance
private
double SurgSim::Math::MlcpGaussSeidelSolver::m_epsilonConvergence
private
Matrix SurgSim::Math::MlcpGaussSeidelSolver::m_lhsEnforcedLocalSystem
private
unsigned int SurgSim::Math::MlcpGaussSeidelSolver::m_maxIterations
private
int SurgSim::Math::MlcpGaussSeidelSolver::m_numEnforcedAtomicConstraints
private
Vector SurgSim::Math::MlcpGaussSeidelSolver::m_rhsEnforcedLocalSystem
private
double SurgSim::Math::MlcpGaussSeidelSolver::m_substepRatio
private
bool SurgSim::Math::MlcpGaussSeidelSolver::m_verbose
private

The documentation for this class was generated from the following files: