sofa::filemanager::pml::LMLForce< DataTypes > Class Template Reference

#include <LMLForce.h>

Inheritance diagram for sofa::filemanager::pml::LMLForce< DataTypes >:

Inheritance graph
[legend]
Collaboration diagram for sofa::filemanager::pml::LMLForce< DataTypes >:

Collaboration graph
[legend]

Public Types

typedef DataTypes::VecCoord VecCoord
 template types
typedef DataTypes::VecDeriv VecDeriv
typedef
DataTypes::VecCoord::iterator 
VecCoordIterator
typedef
DataTypes::VecDeriv::iterator 
VecDerivIterator
typedef DataTypes::Coord Coord
typedef DataTypes::Deriv Deriv

Public Member Functions

 LMLForce (MechanicalState< DataTypes > *mm=NULL)
 constructors
 LMLForce (Loads *loadsList, const map< unsigned int, unsigned int > &atomIndexToDOFIndex, MechanicalState< DataTypes > *mm)
 ~LMLForce ()
std::vector< unsigned int > getTargets ()
 return targets list
void addTarget (unsigned int i)
 add a new target (dof index)
virtual void addForce (VecDeriv &f, const VecCoord &x, const VecDeriv &v)
 -- ForceField Inherits
virtual void addDForce (VecDeriv &, const VecDeriv &)
 Compute the force derivative given a small displacement from the position and velocity used in the previous call to addForce().
virtual double getPotentialEnergy (const VecCoord &)
 Get the potential energy associated to this ForceField.
void draw ()
 -- VisualModel interface
void initTextures ()
 Initialize the textures, or other graphical resources.
void update ()
 used to update the model if necessary.

Protected Attributes

MechanicalState< DataTypes > * mmodel
std::vector< unsigned int > targets
 list of forces targets
VecDeriv forces
 list of force directions
Loads * loads
 LML loads.
map< unsigned int, unsigned int > atomToDOFIndexes
 link between PML object indexes and sofa dofs indexs

Detailed Description

template<class DataTypes>
class sofa::filemanager::pml::LMLForce< DataTypes >

Definition at line 68 of file LMLForce.h.


Member Typedef Documentation

template<class DataTypes >
typedef DataTypes::Coord sofa::filemanager::pml::LMLForce< DataTypes >::Coord

Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.

Definition at line 76 of file LMLForce.h.

template<class DataTypes >
typedef DataTypes::Deriv sofa::filemanager::pml::LMLForce< DataTypes >::Deriv

Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.

Definition at line 77 of file LMLForce.h.

template<class DataTypes >
typedef DataTypes::VecCoord sofa::filemanager::pml::LMLForce< DataTypes >::VecCoord

template types

Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.

Definition at line 72 of file LMLForce.h.

template<class DataTypes >
typedef DataTypes::VecCoord::iterator sofa::filemanager::pml::LMLForce< DataTypes >::VecCoordIterator

Definition at line 74 of file LMLForce.h.

template<class DataTypes >
typedef DataTypes::VecDeriv sofa::filemanager::pml::LMLForce< DataTypes >::VecDeriv

Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.

Definition at line 73 of file LMLForce.h.

template<class DataTypes >
typedef DataTypes::VecDeriv::iterator sofa::filemanager::pml::LMLForce< DataTypes >::VecDerivIterator

Definition at line 75 of file LMLForce.h.


Constructor & Destructor Documentation

template<class DataTypes >
sofa::filemanager::pml::LMLForce< DataTypes >::LMLForce ( MechanicalState< DataTypes > *  mm = NULL  )  [inline]

constructors

Definition at line 80 of file LMLForce.h.

template<class DataTypes >
sofa::filemanager::pml::LMLForce< DataTypes >::LMLForce ( Loads *  loadsList,
const map< unsigned int, unsigned int > &  atomIndexToDOFIndex,
MechanicalState< DataTypes > *  mm 
) [inline]

template<class DataTypes >
sofa::filemanager::pml::LMLForce< DataTypes >::~LMLForce (  )  [inline]

Definition at line 85 of file LMLForce.h.


Member Function Documentation

template<class DataTypes >
virtual void sofa::filemanager::pml::LMLForce< DataTypes >::addDForce ( VecDeriv &  df,
const VecDeriv &  dx 
) [inline, virtual]

Compute the force derivative given a small displacement from the position and velocity used in the previous call to addForce().

The derivative should be directly derived from the computations done by addForce. Any forces neglected in addDForce will be integrated explicitly (i.e. using its value at the beginning of the timestep).

If the ForceField can be represented as a matrix, this method computes $ df += K dx $

This method must be implemented by the component, and is usually called by the generic ForceField::addDForce() method.

Deprecated:
to more efficiently accumulate contributions from all terms of the system equation, a new addDForce method allowing to pass two coefficients for the stiffness and damping terms should now be used.

Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.

Definition at line 95 of file LMLForce.h.

template<class DataTypes >
void sofa::filemanager::pml::LMLForce< DataTypes >::addForce ( VecDeriv &  f,
const VecCoord &  x,
const VecDeriv &  v 
) [inline, virtual]

template<class DataTypes >
void sofa::filemanager::pml::LMLForce< DataTypes >::addTarget ( unsigned int  i  )  [inline]

template<class DataTypes >
void sofa::filemanager::pml::LMLForce< DataTypes >::draw (  )  [inline, virtual]

template<class DataTypes >
virtual double sofa::filemanager::pml::LMLForce< DataTypes >::getPotentialEnergy ( const VecCoord &  x  )  [inline, virtual]

Get the potential energy associated to this ForceField.

Used to extimate the total energy of the system by some post-stabilization techniques.

This method must be implemented by the component, and is usually called by the generic ForceField::getPotentialEnergy() method.

Implements sofa::core::componentmodel::behavior::ForceField< DataTypes >.

Definition at line 96 of file LMLForce.h.

template<class DataTypes >
std::vector<unsigned int> sofa::filemanager::pml::LMLForce< DataTypes >::getTargets (  )  [inline]

template<class DataTypes >
void sofa::filemanager::pml::LMLForce< DataTypes >::initTextures (  )  [inline, virtual]

Initialize the textures, or other graphical resources.

Deprecated:
Use initVisual() instead.

Reimplemented from sofa::core::VisualModel.

Definition at line 100 of file LMLForce.h.

template<class DataTypes >
void sofa::filemanager::pml::LMLForce< DataTypes >::update (  )  [inline, virtual]

used to update the model if necessary.

Deprecated:
Use updateVisual() instead.

Reimplemented from sofa::core::VisualModel.

Definition at line 101 of file LMLForce.h.


Field Documentation

template<class DataTypes >
map<unsigned int, unsigned int> sofa::filemanager::pml::LMLForce< DataTypes >::atomToDOFIndexes [protected]

link between PML object indexes and sofa dofs indexs

Definition at line 113 of file LMLForce.h.

Referenced by sofa::filemanager::pml::LMLForce< DataTypes >::addForce().

template<class DataTypes >
VecDeriv sofa::filemanager::pml::LMLForce< DataTypes >::forces [protected]

template<class DataTypes >
Loads* sofa::filemanager::pml::LMLForce< DataTypes >::loads [protected]

template<class DataTypes >
MechanicalState<DataTypes>* sofa::filemanager::pml::LMLForce< DataTypes >::mmodel [protected]

template<class DataTypes >
std::vector<unsigned int> sofa::filemanager::pml::LMLForce< DataTypes >::targets [protected]


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

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