|
A solver for mixed LCP problems using the Gauss-Seidel iterative method. More...
#include <SurgSim/Math/MlcpGaussSeidelSolver.h>
Public Member Functions | |
| MlcpGaussSeidelSolver () | |
| Constructor. More... | |
| MlcpGaussSeidelSolver (double epsilonConvergence, double contactTolerance, size_t maxIterations) | |
| Constructor. More... | |
| virtual | ~MlcpGaussSeidelSolver () |
| Destructor. More... | |
| bool | solve (const MlcpProblem &problem, MlcpSolution *solution) |
| Resolution of a given MLCP (Gauss Seidel iterative solver) More... | |
| double | getEpsilonConvergence () const |
| void | setEpsilonConvergence (double precision) |
| Set the precision. More... | |
| double | getContactTolerance () const |
| void | setContactTolerance (double tolerance) |
| Set the contact tolerance. More... | |
| size_t | getMaxIterations () const |
| void | setMaxIterations (size_t maxIterations) |
| Set the max number of iterations. More... | |
Public Member Functions inherited from SurgSim::Math::MlcpSolver | |
| MlcpSolver () | |
| Constructor. More... | |
| virtual | ~MlcpSolver () |
Private Member Functions | |
| void | computeEnforcementSystem (size_t problemSize, const MlcpProblem::Matrix &A, const MlcpProblem::Vector &b, const MlcpSolution::Vector &initialGuessAndSolution, const std::vector< MlcpConstraintType > &constraintsType, size_t constraintID, size_t matrixEntryForConstraintID) |
| void | calculateConvergenceCriteria (size_t problemSize, const MlcpProblem::Matrix &A, const MlcpProblem::Vector &b, const MlcpSolution::Vector &initialGuessAndSolution, const std::vector< MlcpConstraintType > &constraintsType, double constraintConvergenceCriteria[MLCP_NUM_CONSTRAINT_TYPES], double *convergenceCriteria, bool *validSignorini) |
| void | doOneIteration (size_t problemSize, const MlcpProblem::Matrix &A, const MlcpProblem::Vector &b, MlcpSolution::Vector *initialGuessAndSolution, const MlcpProblem::Vector &frictionCoefs, const std::vector< MlcpConstraintType > &constraintsType, double constraintConvergenceCriteria[MLCP_NUM_CONSTRAINT_TYPES], double *convergenceCriteria, bool *validSignorini) |
| void | printViolationsAndConvergence (size_t problemSize, const MlcpProblem::Matrix &A, const MlcpProblem::Vector &b, const MlcpSolution::Vector &initialGuessAndSolution, const std::vector< MlcpConstraintType > &constraintsType, double convergenceCriteria, bool validSignorini, size_t iterations) |
Private Attributes | |
| double | m_epsilonConvergence |
| The precision. More... | |
| double | m_contactTolerance |
| The contact tolerance. More... | |
| size_t | m_maxIterations |
| The maximum number of iterations. More... | |
| size_t | m_numEnforcedAtomicConstraints |
| The number of atomic constraints, aka the system size. More... | |
| Matrix | m_lhsEnforcedLocalSystem |
| The left-hand side matrix. More... | |
| Vector | m_rhsEnforcedLocalSystem |
| The right-hand side vector. More... | |
| std::shared_ptr< SurgSim::Framework::Logger > | m_logger |
| The logger. More... | |
A solver for mixed LCP problems using the Gauss-Seidel iterative method.
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.
| SurgSim::Math::MlcpGaussSeidelSolver::MlcpGaussSeidelSolver | ( | ) |
Constructor.
| SurgSim::Math::MlcpGaussSeidelSolver::MlcpGaussSeidelSolver | ( | double | epsilonConvergence, |
| double | contactTolerance, | ||
| size_t | maxIterations | ||
| ) |
Constructor.
| epsilonConvergence | The precision. |
| contactTolerance | The contact tolerance. |
| maxIterations | The max iterations. |
|
virtual |
Destructor.
|
private |
|
private |
|
private |
| double SurgSim::Math::MlcpGaussSeidelSolver::getContactTolerance | ( | ) | const |
| double SurgSim::Math::MlcpGaussSeidelSolver::getEpsilonConvergence | ( | ) | const |
| size_t SurgSim::Math::MlcpGaussSeidelSolver::getMaxIterations | ( | ) | const |
|
private |
| void SurgSim::Math::MlcpGaussSeidelSolver::setContactTolerance | ( | double | tolerance | ) |
Set the contact tolerance.
| tolerance | The contact tolerance. |
| void SurgSim::Math::MlcpGaussSeidelSolver::setEpsilonConvergence | ( | double | precision | ) |
Set the precision.
| precision | The precision. |
| void SurgSim::Math::MlcpGaussSeidelSolver::setMaxIterations | ( | size_t | maxIterations | ) |
Set the max number of iterations.
| maxIterations | The max number of iterations. |
|
virtual |
Resolution of a given MLCP (Gauss Seidel iterative solver)
| problem | The mlcp problem | |
| [out] | solution | The mlcp solution |
Implements SurgSim::Math::MlcpSolver.
|
private |
The contact tolerance.
|
private |
The precision.
|
private |
The left-hand side matrix.
|
private |
The logger.
|
private |
The maximum number of iterations.
|
private |
The number of atomic constraints, aka the system size.
|
private |
The right-hand side vector.
1.8.13