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

Tensors based internal force field class. More...

#include <TensorForceField.h>

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

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

Collaboration graph
[legend]

Data Structures

class  Edge
class  EdgeTensor
class  Tetrahedron
class  Triangle
class  VertexTensor

Public Types

typedef DataTypes::VecCoord VecCoord
typedef DataTypes::VecDeriv VecDeriv
typedef DataTypes::Coord Coord
typedef DataTypes::Deriv Deriv
typedef Coord::value_type Real

Public Member Functions

 TensorForceField (const char *filename)
 TensorForceField (component::MechanicalObject< DataTypes > *object, const char *filename)
virtual void addForce ()
 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 ()
virtual double getPotentialEnergy ()
 Get the potential energy associated to this ForceField.
void draw ()
 Render internal data of this object, for debugging purposes.

Private Member Functions

void load (const char *filename)
void initialize ()
int getEdge (const int v0, const int v1)
int getTriangle (const int v0, const int v1, const int v2)
void addElasticTensors (Tetrahedron &tetra)

Private Attributes

component::MechanicalObject
< DataTypes > * 
object_
Real alpha_
Real lambda_
Real mu_
sofa::helper::vector< Coord > vertex_
sofa::helper::vector< Edge > edge_
sofa::helper::vector< Triangle > triangle_
sofa::helper::vector< Tetrahedron > tetrahedron_
sofa::helper::vector
< VertexTensor > 
vertexTensor_
sofa::helper::vector< EdgeTensor > edgeTensor_

Detailed Description

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

Tensors based internal force field class.

Internal Force field (ie it has only one parent object) based on a Finite Element Model modelisation, using strain and stiffness tensors on vertices and edges.

Definition at line 51 of file TensorForceField.h.


Member Typedef Documentation

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

Definition at line 75 of file TensorForceField.h.

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

Definition at line 76 of file TensorForceField.h.

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

Definition at line 77 of file TensorForceField.h.

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

Definition at line 73 of file TensorForceField.h.

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

Definition at line 74 of file TensorForceField.h.


Constructor & Destructor Documentation

template<class DataTypes >
sofa::component::forcefield::TensorForceField< DataTypes >::TensorForceField ( const char *  filename  )  [inline]

template<class DataTypes >
sofa::component::forcefield::TensorForceField< DataTypes >::TensorForceField ( component::MechanicalObject< DataTypes > *  object,
const char *  filename 
) [inline]


Member Function Documentation

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

template<class DataTypes >
void sofa::component::forcefield::TensorForceField< DataTypes >::addElasticTensors ( Tetrahedron &  tetra  )  [inline, private]

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

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

template<class DataTypes >
int sofa::component::forcefield::TensorForceField< DataTypes >::getEdge ( const int  v0,
const int  v1 
) [inline, private]

template<class DataTypes >
double sofa::component::forcefield::TensorForceField< DataTypes >::getPotentialEnergy (  )  [inline, virtual]

Get the potential energy associated to this ForceField.

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

Implements sofa::core::componentmodel::behavior::BaseForceField.

Definition at line 394 of file TensorForceField.cpp.

template<class DataTypes >
int sofa::component::forcefield::TensorForceField< DataTypes >::getTriangle ( const int  v0,
const int  v1,
const int  v2 
) [inline, private]

template<class DataTypes >
void sofa::component::forcefield::TensorForceField< DataTypes >::initialize (  )  [inline, private]

template<class DataTypes >
void sofa::component::forcefield::TensorForceField< DataTypes >::load ( const char *  filename  )  [inline, private]


Field Documentation

template<class DataTypes >
Real sofa::component::forcefield::TensorForceField< DataTypes >::alpha_ [private]

template<class DataTypes >
sofa::helper::vector< Edge > sofa::component::forcefield::TensorForceField< DataTypes >::edge_ [private]

template<class DataTypes >
sofa::helper::vector< EdgeTensor > sofa::component::forcefield::TensorForceField< DataTypes >::edgeTensor_ [private]

template<class DataTypes >
Real sofa::component::forcefield::TensorForceField< DataTypes >::lambda_ [private]

template<class DataTypes >
Real sofa::component::forcefield::TensorForceField< DataTypes >::mu_ [private]

template<class DataTypes >
component::MechanicalObject<DataTypes>* sofa::component::forcefield::TensorForceField< DataTypes >::object_ [private]

template<class DataTypes >
sofa::helper::vector< Tetrahedron > sofa::component::forcefield::TensorForceField< DataTypes >::tetrahedron_ [private]

template<class DataTypes >
sofa::helper::vector< Triangle > sofa::component::forcefield::TensorForceField< DataTypes >::triangle_ [private]

template<class DataTypes >
sofa::helper::vector< Coord > sofa::component::forcefield::TensorForceField< DataTypes >::vertex_ [private]


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

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