SurgSim::Physics::SolveMlcp Class Reference

Solve the system Mixed Linear Complementarity Problem (Mlcp) More...

`#include <SurgSim/Physics/SolveMlcp.h>`

Inheritance diagram for SurgSim::Physics::SolveMlcp:

## Public Member Functions

| SolveMlcp (bool doCopyState=false)
| Constructor. More...
| SURGSIM_CLASSNAME (SurgSim::Physics::SolveMlcp)
virtual | ~SolveMlcp ()
| Destructor. More...
void | setMaxIterations (size_t maxIterations)
| Set the maximum number of iterations for the MLCP solver. More...
size_t | getMaxIterations () const
| Get the maximum number of iterations for the MLCP solver. More...
void | setPrecision (double epsilon)
| Set the precision of the MLCP solver. More...
double | getPrecision () const
| Get the precision of the MLCP solver. More...
void | setContactTolerance (double epsilon)
| Set the contact tolerance for the MLCP solver. More...
double | getContactTolerance () const
| Get the contact tolerance for the MLCP solver. More...
Public Member Functions inherited from SurgSim::Physics::Computation
| Computation (bool doCopyState)
| Constructor. More...
virtual | ~Computation ()
| Destructor. More...
std::shared_ptr< PhysicsManagerState > | update (double dt, const std::shared_ptr< PhysicsManagerState > &state)
| Public Interface execute this objects computations, dt is the time from the last update call in seconds. More...
void | setDoCopyState (bool val)
| Sets up whether the computation will copy the state of PhysicsManagerState before executing. More...
bool | isCopyingState ()
| Query if this object is copying the PhysicsManagerState. More...
virtual std::string | getClassName () const =0
| The class name for this class. More...
Framework::Timer & | getTimer ()
| Provides access to the update timer. More...

## Protected Member Functions

std::shared_ptr< PhysicsManagerState > | doUpdate (const double &dt, const std::shared_ptr< PhysicsManagerState > &state) override
| Override doUpdate from superclass. More...

## Private Attributes

SurgSim::Math::MlcpGaussSeidelSolver | m_gaussSeidelSolver
| The Gauss-Seidel Mlcp solver. More...

## Detailed Description

Solve the system Mixed Linear Complementarity Problem (Mlcp)

## Constructor & Destructor Documentation

## SolveMlcp()

SurgSim::Physics::SolveMlcp::SolveMlcp | ( | bool | doCopyState = `false` | ) |

explicit

Constructor.

Parameters

  doCopyState | Specify if the ouput state is a copy or not of the input state in Computation::Update()

## ~SolveMlcp()

SurgSim::Physics::SolveMlcp::~SolveMlcp | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## doUpdate()

std::shared_ptr< PhysicsManagerState > SurgSim::Physics::SolveMlcp::doUpdate | ( | const double & | dt,
|  | const std::shared_ptr< PhysicsManagerState > & | state
| ) |  |

override protected virtual

Override doUpdate from superclass.

Parameters

  dt | The time step
  state | The Physics manager state

Returns
  The updated physics manager state (input updated or copied updated)

Implements SurgSim::Physics::Computation.

## getContactTolerance()

double SurgSim::Physics::SolveMlcp::getContactTolerance | ( |  | ) | const

Get the contact tolerance for the MLCP solver.

Returns
  The contact tolerance.

## getMaxIterations()

size_t SurgSim::Physics::SolveMlcp::getMaxIterations | ( |  | ) | const

Get the maximum number of iterations for the MLCP solver.

Returns
  The maximum number of iterations.

## getPrecision()

double SurgSim::Physics::SolveMlcp::getPrecision | ( |  | ) | const

Get the precision of the MLCP solver.

Returns
  The precision.

## setContactTolerance()

void SurgSim::Physics::SolveMlcp::setContactTolerance | ( | double | epsilon | ) |

Set the contact tolerance for the MLCP solver.

Parameters

  epsilon | The contact tolerance.

## setMaxIterations()

void SurgSim::Physics::SolveMlcp::setMaxIterations | ( | size_t | maxIterations | ) |

Set the maximum number of iterations for the MLCP solver.

Parameters

  maxIterations | The maximum number of iterations.

## setPrecision()

void SurgSim::Physics::SolveMlcp::setPrecision | ( | double | epsilon | ) |

Set the precision of the MLCP solver.

Parameters

  epsilon | The precision.

## SURGSIM_CLASSNAME()

SurgSim::Physics::SolveMlcp::SURGSIM_CLASSNAME | ( | SurgSim::Physics::SolveMlcp |  | ) |

## Member Data Documentation

## m_gaussSeidelSolver

SurgSim::Math::MlcpGaussSeidelSolver SurgSim::Physics::SolveMlcp::m_gaussSeidelSolver

private

The Gauss-Seidel Mlcp solver.

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

- SurgSim/Physics/SolveMlcp.h
- SurgSim/Physics/SolveMlcp.cpp