sofa::component::forcefield::TriangularTensorMassForceField< DataTypes > Class Template Reference

#include <TriangularTensorMassForceField.h>

Inheritance diagram for sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >:

Inheritance graph
[legend]
Collaboration diagram for sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >:

Collaboration graph
[legend]

Data Structures

class  EdgeRestInformation
class  Mat3

Public Types

typedef
core::componentmodel::behavior::ForceField
< DataTypes > 
Inherited
typedef DataTypes::VecCoord VecCoord
typedef DataTypes::VecDeriv VecDeriv
typedef DataTypes::Coord Coord
typedef DataTypes::Deriv Deriv
typedef Coord::value_type Real

Public Member Functions

 TriangularTensorMassForceField ()
 second Lame coefficient
virtual ~TriangularTensorMassForceField ()
virtual double getPotentialEnergy (const VecCoord &x)
 Get the potential energy associated to this ForceField.
virtual void init ()
 Initialization method called at graph modification, during bottom-up traversal.
virtual void addForce (VecDeriv &f, const VecCoord &x, const VecDeriv &v)
 Given the current position and velocity states, update the current force vector by computing and adding the forces associated with this ForceField.
virtual void addDForce (VecDeriv &df, const VecDeriv &dx)
 Compute the force derivative given a small displacement from the position and velocity used in the previous call to addForce().
virtual Real getLambda () const
virtual Real getMu () const
void setYoungModulus (const double modulus)
void setPoissonRatio (const double ratio)
virtual void handleTopologyChange ()
 Handle topological Changes.
void draw ()
 Render internal data of this object, for debugging purposes.
void updateLameCoefficients ()
 compute lambda and mu based on the Young modulus and Poisson ratio

Protected Member Functions

EdgeData< EdgeRestInformation > & getEdgeInfo ()

Static Protected Member Functions

static void TriangularTMEdgeCreationFunction (int edgeIndex, void *param, EdgeRestInformation &ei, const Edge &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &)
static void TriangularTMTriangleCreationFunction (const sofa::helper::vector< unsigned int > &triangleAdded, void *param, vector< EdgeRestInformation > &edgeData)
static void TriangularTMTriangleDestructionFunction (const sofa::helper::vector< unsigned int > &triangleAdded, void *param, vector< EdgeRestInformation > &edgeData)

Protected Attributes

EdgeData< EdgeRestInformation > edgeInfo
sofa::core::componentmodel::topology::BaseMeshTopology * _topology
VecCoord _initialPoints
 the intial positions of the points
bool updateMatrix
Data< Real > f_poissonRatio
Data< Real > f_youngModulus
Real lambda
Real mu
 first Lame coefficient

Detailed Description

template<class DataTypes>
class sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >

Definition at line 55 of file TriangularTensorMassForceField.h.


Member Typedef Documentation

template<class DataTypes >
typedef DataTypes::Coord sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::Coord

template<class DataTypes >
typedef DataTypes::Deriv sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::Deriv

Definition at line 58 of file TriangularTensorMassForceField.h.

template<class DataTypes >
typedef Coord::value_type sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::Real

Definition at line 63 of file TriangularTensorMassForceField.h.

template<class DataTypes >
typedef DataTypes::VecCoord sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::VecCoord

template<class DataTypes >
typedef DataTypes::VecDeriv sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::VecDeriv


Constructor & Destructor Documentation

second Lame coefficient

Definition at line 225 of file TriangularTensorMassForceField.inl.

Definition at line 243 of file TriangularTensorMassForceField.inl.


Member Function Documentation

template<class DataTypes >
void sofa::component::forcefield::TriangularTensorMassForceField< 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 331 of file TriangularTensorMassForceField.inl.

References sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::_topology, sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::EdgeRestInformation::DfDx, sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::edgeInfo, force, sofa::core::componentmodel::topology::BaseMeshTopology::getEdge(), sofa::core::componentmodel::topology::BaseMeshTopology::getNbEdges(), and sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::Mat3::transposeMultiply().

template<class DataTypes >
void sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::addForce ( VecDeriv &  f,
const VecCoord &  x,
const VecDeriv &  v 
) [inline, virtual]

template<class DataTypes >
void sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::draw (  )  [inline, virtual]

template<class DataTypes >
EdgeData<EdgeRestInformation>& sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::getEdgeInfo (  )  [inline, protected]

template<class DataTypes >
virtual Real sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::getLambda (  )  const [inline, virtual]

template<class DataTypes >
virtual Real sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::getMu ( void   )  const [inline, virtual]

template<class DataTypes >
double sofa::component::forcefield::TriangularTensorMassForceField< 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 297 of file TriangularTensorMassForceField.inl.

template<class DataTypes >
void sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::handleTopologyChange (  )  [inline, virtual]

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

template<class DataTypes >
void sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::setPoissonRatio ( const double  ratio  )  [inline]

template<class DataTypes >
void sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::setYoungModulus ( const double  modulus  )  [inline]

template<class DataTypes >
void sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::TriangularTMEdgeCreationFunction ( int  edgeIndex,
void *  param,
EdgeRestInformation &  ei,
const Edge &  ,
const sofa::helper::vector< unsigned int > &  ,
const sofa::helper::vector< double > &   
) [inline, static, protected]

template<class DataTypes >
void sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::TriangularTMTriangleCreationFunction ( const sofa::helper::vector< unsigned int > &  triangleAdded,
void *  param,
vector< EdgeRestInformation > &  edgeData 
) [inline, static, protected]

template<class DataTypes >
void sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::TriangularTMTriangleDestructionFunction ( const sofa::helper::vector< unsigned int > &  triangleAdded,
void *  param,
vector< EdgeRestInformation > &  edgeData 
) [inline, static, protected]

template<class DataTypes >
void sofa::component::forcefield::TriangularTensorMassForceField< DataTypes >::updateLameCoefficients (  )  [inline]


Field Documentation

Definition at line 98 of file TriangularTensorMassForceField.h.


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

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