sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes > Class Template Reference

Component computing contact forces within a simulated body using the compliance method. More...

#include <PrecomputedConstraintCorrection.h>

Inheritance diagram for sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >:

Inheritance graph
[legend]
Collaboration diagram for sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >:

Collaboration graph
[legend]

Public Types

typedef TDataTypes DataTypes
typedef
componentmodel::behavior::BaseConstraintCorrection 
Inherit
typedef DataTypes::VecCoord VecCoord
typedef DataTypes::VecDeriv VecDeriv
typedef DataTypes::VecConst VecConst
typedef DataTypes::Coord Coord
typedef DataTypes::Deriv Deriv
typedef DataTypes::SparseVecDeriv Const
typedef Coord::value_type Real
 element rotation matrix
typedef MatNoInit< 3, 3, Real > Transformation

Public Member Functions

 PrecomputedConstraintCorrection (behavior::MechanicalState< DataTypes > *mm=NULL)
virtual ~PrecomputedConstraintCorrection ()
virtual void init ()
 Initialization method called at graph modification, during bottom-up traversal.
behavior::MechanicalState
< DataTypes > * 
getMState ()
 Retrieve the associated MechanicalState.
virtual void getCompliance (defaulttype::BaseMatrix *W)
virtual void applyContactForce (const defaulttype::BaseVector *f)
virtual void rotateConstraints ()
virtual void rotateResponse ()
virtual void resetContactForce ()
virtual std::string getTemplateName () const
 Get the template type names (if any) used to instantiate this object.
virtual void parse (core::objectmodel::BaseObjectDescription *arg)
 Parse the given description to assign values to this object's fields and potentially other parameters.
template<>
 ~PrecomputedConstraintCorrection ()
template<>
void rotateConstraints ()
template<>
void rotateConstraints ()
template<>
void rotateConstraints ()
template<>
void rotateResponse ()
template<>
void rotateResponse ()
template<>
void rotateResponse ()
template<>
void rotateConstraints ()
template<>
void rotateConstraints ()
template<>
void rotateConstraints ()
template<>
void rotateResponse ()
template<>
void rotateResponse ()
template<>
void rotateResponse ()

Static Public Member Functions

template<class T >
static bool canCreate (T *&obj, objectmodel::BaseContext *context, objectmodel::BaseObjectDescription *arg)
 Pre-construction check method called by ObjectFactory.
static std::string templateName (const PrecomputedConstraintCorrection< DataTypes > *=NULL)

Data Fields

bool _rotations
DataPtr< bool > f_rotations
bool _restRotations
DataPtr< bool > f_restRotations

Protected Attributes

behavior::MechanicalState
< DataTypes > * 
mstate
Real * appCompliance
unsigned int nbRows
unsigned int nbCols
unsigned int dof_on_node
unsigned int nbNodes
int * _indexNodeSparseCompliance
std::vector< Deriv > _sparseCompliance
Real Fbuf [6]
Real DXbuf

Detailed Description

template<class TDataTypes>
class sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >

Component computing contact forces within a simulated body using the compliance method.

Definition at line 51 of file PrecomputedConstraintCorrection.h.


Member Typedef Documentation

template<class TDataTypes >
typedef DataTypes::SparseVecDeriv sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::Const

Definition at line 61 of file PrecomputedConstraintCorrection.h.

template<class TDataTypes >
typedef DataTypes::Coord sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::Coord

Definition at line 59 of file PrecomputedConstraintCorrection.h.

template<class TDataTypes >
typedef TDataTypes sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::DataTypes

Definition at line 54 of file PrecomputedConstraintCorrection.h.

template<class TDataTypes >
typedef DataTypes::Deriv sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::Deriv

Definition at line 60 of file PrecomputedConstraintCorrection.h.

Definition at line 55 of file PrecomputedConstraintCorrection.h.

template<class TDataTypes >
typedef Coord::value_type sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::Real

element rotation matrix

Definition at line 64 of file PrecomputedConstraintCorrection.h.

template<class TDataTypes >
typedef MatNoInit<3, 3, Real> sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::Transformation

Definition at line 65 of file PrecomputedConstraintCorrection.h.

template<class TDataTypes >
typedef DataTypes::VecConst sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::VecConst

Definition at line 58 of file PrecomputedConstraintCorrection.h.

template<class TDataTypes >
typedef DataTypes::VecCoord sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::VecCoord

Definition at line 56 of file PrecomputedConstraintCorrection.h.

template<class TDataTypes >
typedef DataTypes::VecDeriv sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::VecDeriv

Definition at line 57 of file PrecomputedConstraintCorrection.h.


Constructor & Destructor Documentation

Definition at line 54 of file PrecomputedConstraintCorrection.inl.


Member Function Documentation

template<class DataTypes >
void sofa::component::constraint::PrecomputedConstraintCorrection< DataTypes >::applyContactForce ( const defaulttype::BaseVector *  f  )  [inline, virtual]

Implements sofa::core::componentmodel::behavior::BaseConstraintCorrection.

Definition at line 377 of file PrecomputedConstraintCorrection.inl.

References sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::_rotations, sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::appCompliance, sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::dof_on_node, sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::DXbuf, sofa::defaulttype::BaseVector::element(), sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::Fbuf, force, sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getC(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getConstraintId(), sofa::core::objectmodel::BaseObject::getContext(), sofa::core::objectmodel::BaseContext::getDt(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getDx(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getExternalForces(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getV(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getVfree(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getX(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getXfree(), sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::mstate, sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::nbCols, and sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::rotateResponse().

template<class TDataTypes >
template<class T >
static bool sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::canCreate ( T *&  obj,
objectmodel::BaseContext *  context,
objectmodel::BaseObjectDescription *  arg 
) [inline, static]

Pre-construction check method called by ObjectFactory.

Check that DataTypes matches the MechanicalState.

Reimplemented from sofa::core::objectmodel::BaseObject.

Definition at line 94 of file PrecomputedConstraintCorrection.h.

References sofa::core::objectmodel::BaseContext::getMechanicalState().

template<class DataTypes >
void sofa::component::constraint::PrecomputedConstraintCorrection< DataTypes >::getCompliance ( defaulttype::BaseMatrix *  W  )  [inline, virtual]

template<class TDataTypes >
behavior::MechanicalState<DataTypes>* sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::getMState (  )  [inline]

Retrieve the associated MechanicalState.

Definition at line 79 of file PrecomputedConstraintCorrection.h.

References sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::mstate.

template<class TDataTypes >
virtual std::string sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::getTemplateName (  )  const [inline, virtual]

Get the template type names (if any) used to instantiate this object.

Reimplemented from sofa::core::objectmodel::Base.

Definition at line 101 of file PrecomputedConstraintCorrection.h.

References sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::templateName().

template<class DataTypes >
void sofa::component::constraint::PrecomputedConstraintCorrection< DataTypes >::init ( void   )  [inline, virtual]

Initialization method called at graph modification, during bottom-up traversal.

Reimplemented from sofa::core::objectmodel::BaseObject.

Definition at line 81 of file PrecomputedConstraintCorrection.inl.

References sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::_indexNodeSparseCompliance, sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::_sparseCompliance, sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::appCompliance, sofa::core::objectmodel::DataPtr< T >::beginEdit(), sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::dof_on_node, sofa::component::odesolver::CGImplicitSolver::f_maxIter, sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::f_restRotations, sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::f_rotations, sofa::component::odesolver::CGImplicitSolver::f_smallDenominatorThreshold, sofa::component::odesolver::CGImplicitSolver::f_tolerance, force, sofa::core::objectmodel::BaseObject::getContext(), sofa::core::objectmodel::BaseContext::getDt(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getExternalForces(), sofa::core::objectmodel::BaseContext::getGravityInWorld(), sofa::core::objectmodel::BaseContext::getMechanicalState(), sofa::core::objectmodel::Base::getName(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getV(), sofa::core::objectmodel::Data< T >::getValue(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getX(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getX0(), sofa::helper::Quater< Real >::inverse(), MAX_NUM_CONSTRAINT_PER_NODE, sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::mstate, sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::nbCols, sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::nbNodes, sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::nbRows, sofa::helper::Quater< Real >::normalize(), sofa::helper::Quater< Real >::rotate(), sofa::core::objectmodel::BaseContext::setGravityInWorld(), sofa::core::objectmodel::Data< T >::setValue(), sofa::component::odesolver::CGImplicitSolver::solve(), and sofa::helper::Quater< Real >::toEulerVector().

template<class DataTypes >
void sofa::component::constraint::PrecomputedConstraintCorrection< DataTypes >::parse ( core::objectmodel::BaseObjectDescription *  arg  )  [inline, virtual]

Parse the given description to assign values to this object's fields and potentially other parameters.

Reimplemented from sofa::core::objectmodel::Base.

Definition at line 607 of file PrecomputedConstraintCorrection.inl.

References sofa::core::objectmodel::Base::parse().

template<class DataTypes >
void sofa::component::constraint::PrecomputedConstraintCorrection< DataTypes >::resetContactForce ( void   )  [inline, virtual]

template<>
void sofa::component::constraint::PrecomputedConstraintCorrection< defaulttype::Vec1fTypes >::rotateConstraints (  )  [inline]

Definition at line 857 of file PrecomputedConstraintCorrection.inl.

template<>
void sofa::component::constraint::PrecomputedConstraintCorrection< defaulttype::Rigid3fTypes >::rotateConstraints (  )  [inline]

template<>
void sofa::component::constraint::PrecomputedConstraintCorrection< defaulttype::Vec3fTypes >::rotateConstraints (  )  [inline]

template<>
void sofa::component::constraint::PrecomputedConstraintCorrection< defaulttype::Vec1dTypes >::rotateConstraints (  )  [inline]

Definition at line 706 of file PrecomputedConstraintCorrection.inl.

template<>
void sofa::component::constraint::PrecomputedConstraintCorrection< defaulttype::Rigid3dTypes >::rotateConstraints (  )  [inline]

template<>
void sofa::component::constraint::PrecomputedConstraintCorrection< defaulttype::Vec3dTypes >::rotateConstraints (  )  [inline]

template<class TDataTypes >
virtual void sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::rotateConstraints (  )  [virtual]

Definition at line 912 of file PrecomputedConstraintCorrection.inl.

Definition at line 762 of file PrecomputedConstraintCorrection.inl.

template<class TDataTypes >
virtual void sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::rotateResponse (  )  [virtual]

template<class TDataTypes >
static std::string sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::templateName ( const PrecomputedConstraintCorrection< DataTypes > *  = NULL  )  [inline, static]


Field Documentation

template<class TDataTypes >
int* sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::_indexNodeSparseCompliance [protected]

template<class TDataTypes >
std::vector<Deriv> sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::_sparseCompliance [protected]

template<class TDataTypes >
Real* sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::appCompliance [protected]

template<class TDataTypes >
unsigned int sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::dof_on_node [protected]

template<class TDataTypes >
Real sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::DXbuf [protected]

template<class TDataTypes >
Real sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::Fbuf[6] [protected]

template<class TDataTypes >
unsigned int sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::nbCols [protected]

template<class TDataTypes >
unsigned int sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::nbNodes [protected]

template<class TDataTypes >
unsigned int sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::nbRows [protected]


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

Generated on Sun Nov 23 04:17:46 2008 for Sofa by  doxygen 1.5.7.1