#include <MasterContactSolver.h>


Data Structures | |
| struct | contactBuf |
Public Member Functions | |
| MasterContactSolver () | |
| void | step (double dt) |
| Main computation method. | |
| virtual void | init () |
| Initialization method called at graph modification, during bottom-up traversal. | |
| LCP * | getLCP (void) |
Data Fields | |
| Data< bool > | initial_guess |
| Data< double > | tol |
| Data< int > | maxIt |
| Data< double > | mu |
Private Member Functions | |
| void | computeInitialGuess () |
| void | keepContactForcesValue () |
| void | build_LCP () |
Private Attributes | |
| std::vector < core::componentmodel::behavior::BaseConstraintCorrection * > | constraintCorrections |
| unsigned int | _numConstraints |
| double | _mu |
| simulation::tree::GNode * | context |
| LCP | lcp1 |
| LCP | lcp2 |
| LPtrFullMatrix< double > * | _A |
| LPtrFullMatrix< double > * | _W |
| FullVector< double > * | _dFree |
| FullVector< double > * | _result |
| LCP * | lcp |
| contactBuf * | _PreviousContactList |
| unsigned int | _numPreviousContact |
| long * | _cont_id_list |
Definition at line 181 of file MasterContactSolver.h.
| sofa::component::odesolver::MasterContactSolver::MasterContactSolver | ( | ) |
Definition at line 84 of file MasterContactSolver.cpp.
References _cont_id_list, _mu, _numConstraints, _numPreviousContact, _PreviousContactList, and MAX_NUM_CONSTRAINTS.
| void sofa::component::odesolver::MasterContactSolver::build_LCP | ( | ) | [private] |
Definition at line 111 of file MasterContactSolver.cpp.
References _cont_id_list, _dFree, _mu, _numConstraints, _W, computeInitialGuess(), constraintCorrections, context, sofa::core::objectmodel::BaseObject::f_printLog, sofa::core::componentmodel::behavior::BaseConstraintCorrection::getCompliance(), sofa::helper::LCP::getMu(), sofa::core::objectmodel::Data< T >::getValue(), initial_guess, lcp, MAX_NUM_CONSTRAINTS, mu, sofa::component::linearsolver::FullVector< T >::ptr(), sofa::component::linearsolver::LPtrFullMatrix< T >::resize(), and sofa::component::linearsolver::FullVector< T >::resize().
Referenced by step().
| void sofa::component::odesolver::MasterContactSolver::computeInitialGuess | ( | ) | [private] |
Definition at line 157 of file MasterContactSolver.cpp.
References _cont_id_list, _mu, _numConstraints, _numPreviousContact, _PreviousContactList, and sofa::component::odesolver::MasterContactSolver::contactBuf::F.
Referenced by build_LCP().
| LCP* sofa::component::odesolver::MasterContactSolver::getLCP | ( | void | ) | [inline] |
Definition at line 197 of file MasterContactSolver.h.
References lcp, lcp1, and lcp2.
Referenced by sofa::component::controller::LCPForceFeedback::computeForce().
| void sofa::component::odesolver::MasterContactSolver::init | ( | void | ) | [virtual] |
Initialization method called at graph modification, during bottom-up traversal.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 106 of file MasterContactSolver.cpp.
References constraintCorrections, sofa::core::objectmodel::BaseContext::get(), sofa::core::objectmodel::BaseObject::getContext(), and sofa::core::objectmodel::BaseContext::SearchDown.
| void sofa::component::odesolver::MasterContactSolver::keepContactForcesValue | ( | ) | [private] |
Definition at line 196 of file MasterContactSolver.cpp.
References _cont_id_list, _mu, _numConstraints, _numPreviousContact, _PreviousContactList, _result, sofa::component::odesolver::MasterContactSolver::contactBuf::F, and sofa::component::odesolver::MasterContactSolver::contactBuf::id.
Referenced by step().
| void sofa::component::odesolver::MasterContactSolver::step | ( | double | dt | ) | [virtual] |
Main computation method.
Specify and execute all computations for computing a timestep, such as one or more collisions and integrations stages.
Implements sofa::core::componentmodel::behavior::MasterSolver.
Definition at line 228 of file MasterContactSolver.cpp.
References _A, _dFree, _mu, _numConstraints, _result, _W, sofa::helper::afficheLCP(), sofa::core::componentmodel::behavior::BaseConstraintCorrection::applyContactForce(), build_LCP(), sofa::simulation::MasterSolverImpl::computeCollision(), constraintCorrections, context, sofa::core::componentmodel::behavior::BaseMechanicalState::VecId::dx(), sofa::simulation::Node::execute(), sofa::core::objectmodel::BaseObject::f_printLog, sofa::helper::gaussSeidelLCP1(), sofa::core::objectmodel::BaseObject::getContext(), sofa::helper::system::thread::CTime::getTime(), sofa::core::objectmodel::Data< T >::getValue(), initial_guess, keepContactForcesValue(), lcp, lcp1, lcp2, sofa::component::linearsolver::LPtrFullMatrix< T >::lptr(), maxIt, sofa::helper::nlcp_gaussseidel(), sofa::component::linearsolver::FullVector< T >::ptr(), sofa::core::componentmodel::behavior::BaseConstraintCorrection::resetContactForce(), sofa::helper::LCP::setNbConst(), and tol.
LPtrFullMatrix<double>* sofa::component::odesolver::MasterContactSolver::_A [private] |
long* sofa::component::odesolver::MasterContactSolver::_cont_id_list [private] |
Definition at line 225 of file MasterContactSolver.h.
Referenced by build_LCP(), computeInitialGuess(), keepContactForcesValue(), and MasterContactSolver().
FullVector<double>* sofa::component::odesolver::MasterContactSolver::_dFree [private] |
double sofa::component::odesolver::MasterContactSolver::_mu [private] |
Definition at line 207 of file MasterContactSolver.h.
Referenced by build_LCP(), computeInitialGuess(), keepContactForcesValue(), MasterContactSolver(), and step().
unsigned int sofa::component::odesolver::MasterContactSolver::_numConstraints [private] |
Definition at line 206 of file MasterContactSolver.h.
Referenced by build_LCP(), computeInitialGuess(), keepContactForcesValue(), MasterContactSolver(), and step().
unsigned int sofa::component::odesolver::MasterContactSolver::_numPreviousContact [private] |
Definition at line 224 of file MasterContactSolver.h.
Referenced by computeInitialGuess(), keepContactForcesValue(), and MasterContactSolver().
Definition at line 223 of file MasterContactSolver.h.
Referenced by computeInitialGuess(), keepContactForcesValue(), and MasterContactSolver().
FullVector<double> * sofa::component::odesolver::MasterContactSolver::_result [private] |
Definition at line 211 of file MasterContactSolver.h.
Referenced by keepContactForcesValue(), and step().
LPtrFullMatrix<double> * sofa::component::odesolver::MasterContactSolver::_W [private] |
std::vector<core::componentmodel::behavior::BaseConstraintCorrection*> sofa::component::odesolver::MasterContactSolver::constraintCorrections [private] |
Definition at line 197 of file MasterContactSolver.h.
Referenced by build_LCP(), init(), and step().
Definition at line 212 of file MasterContactSolver.h.
Referenced by build_LCP(), getLCP(), and step().
1.5.7.1