#include <TetrahedralTensorMassForceField.h>


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 | |
| TetrahedralTensorMassForceField () | |
| second Lame coefficient | |
| virtual | ~TetrahedralTensorMassForceField () |
| 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 |
| virtual void | handleTopologyChange () |
| Handle topological Changes. | |
| void | setYoungModulus (const double modulus) |
| void | setPoissonRatio (const double ratio) |
| 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 | TetrahedralTMEdgeCreationFunction (int edgeIndex, void *param, EdgeRestInformation &ei, const Edge &, const helper::vector< unsigned int > &, const helper::vector< double > &) |
| static void | TetrahedralTMTetrahedronCreationFunction (const helper::vector< unsigned int > &triangleAdded, void *param, helper::vector< EdgeRestInformation > &edgeData) |
| static void | TetrahedralTMTetrahedronDestructionFunction (const helper::vector< unsigned int > &triangleAdded, void *param, helper::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 | |
Definition at line 57 of file TetrahedralTensorMassForceField.h.
| typedef DataTypes::Coord sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::Coord |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 63 of file TetrahedralTensorMassForceField.h.
| typedef DataTypes::Deriv sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::Deriv |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 64 of file TetrahedralTensorMassForceField.h.
| typedef core::componentmodel::behavior::ForceField<DataTypes> sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::Inherited |
Definition at line 60 of file TetrahedralTensorMassForceField.h.
| typedef Coord::value_type sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::Real |
Definition at line 65 of file TetrahedralTensorMassForceField.h.
| typedef DataTypes::VecCoord sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::VecCoord |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 61 of file TetrahedralTensorMassForceField.h.
| typedef DataTypes::VecDeriv sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::VecDeriv |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 62 of file TetrahedralTensorMassForceField.h.
| sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTensorMassForceField | ( | ) | [inline] |
| sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::~TetrahedralTensorMassForceField | ( | ) | [inline, virtual] |
Definition at line 252 of file TetrahedralTensorMassForceField.inl.
| void sofa::component::forcefield::TetrahedralTensorMassForceField< 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.
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 340 of file TetrahedralTensorMassForceField.inl.
References sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::_topology, sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::EdgeRestInformation::DfDx, sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::edgeInfo, force, sofa::core::componentmodel::topology::BaseMeshTopology::getEdge(), sofa::core::componentmodel::topology::BaseMeshTopology::getNbEdges(), and sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::Mat3::transposeMultiply().
| void sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::addForce | ( | VecDeriv & | f, | |
| const VecCoord & | x, | |||
| const VecDeriv & | v | |||
| ) | [inline, virtual] |
Given the current position and velocity states, update the current force vector by computing and adding the forces associated with this ForceField.
If the ForceField can be represented as a matrix, this method computes $ f += B v + K x $
This method must be implemented by the component, and is usually called by the generic ForceField::addForce() method.
Implements sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 312 of file TetrahedralTensorMassForceField.inl.
References sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::_initialPoints, sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::_topology, sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::EdgeRestInformation::DfDx, sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::edgeInfo, force, sofa::core::componentmodel::topology::BaseMeshTopology::getEdge(), sofa::core::componentmodel::topology::BaseMeshTopology::getNbEdges(), and sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::Mat3::transposeMultiply().
| void sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::draw | ( | ) | [inline, virtual] |
Render internal data of this object, for debugging purposes.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 377 of file TetrahedralTensorMassForceField.inl.
References sofa::core::objectmodel::BaseObject::getContext(), and sofa::core::componentmodel::behavior::ForceField< DataTypes >::mstate.
| EdgeData<EdgeRestInformation>& sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::getEdgeInfo | ( | ) | [inline, protected] |
Definition at line 139 of file TetrahedralTensorMassForceField.h.
References sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::edgeInfo.
| virtual Real sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::getLambda | ( | ) | const [inline, virtual] |
Definition at line 119 of file TetrahedralTensorMassForceField.h.
References sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::lambda.
Referenced by sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMTetrahedronCreationFunction(), and sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMTetrahedronDestructionFunction().
| virtual Real sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::getMu | ( | void | ) | const [inline, virtual] |
Definition at line 120 of file TetrahedralTensorMassForceField.h.
References sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::mu.
Referenced by sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMTetrahedronCreationFunction(), and sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMTetrahedronDestructionFunction().
| double sofa::component::forcefield::TetrahedralTensorMassForceField< 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 306 of file TetrahedralTensorMassForceField.inl.
| void sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::handleTopologyChange | ( | ) | [inline, virtual] |
Handle topological Changes.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 244 of file TetrahedralTensorMassForceField.inl.
References sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::_topology, sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::edgeInfo, sofa::core::componentmodel::topology::BaseMeshTopology::firstChange(), and sofa::core::componentmodel::topology::BaseMeshTopology::lastChange().
| void sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::init | ( | void | ) | [inline, virtual] |
Initialization method called at graph modification, during bottom-up traversal.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 257 of file TetrahedralTensorMassForceField.inl.
References sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::_initialPoints, sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::_topology, sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::edgeInfo, sofa::core::objectmodel::BaseObject::getContext(), sofa::core::componentmodel::topology::BaseMeshTopology::getEdge(), sofa::core::objectmodel::BaseContext::getMeshTopology(), sofa::core::componentmodel::topology::BaseMeshTopology::getNbEdges(), sofa::core::componentmodel::topology::BaseMeshTopology::getNbTetras(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getX0(), sofa::core::componentmodel::behavior::ForceField< DataTypes >::init(), sofa::core::componentmodel::behavior::ForceField< DataTypes >::mstate, sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMEdgeCreationFunction(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMTetrahedronCreationFunction(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMTetrahedronDestructionFunction(), and sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::updateLameCoefficients().
| void sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::setPoissonRatio | ( | const double | ratio | ) | [inline] |
Definition at line 128 of file TetrahedralTensorMassForceField.h.
References sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::f_poissonRatio, and sofa::core::objectmodel::Data< T >::setValue().
| void sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::setYoungModulus | ( | const double | modulus | ) | [inline] |
Definition at line 125 of file TetrahedralTensorMassForceField.h.
References sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::f_youngModulus, and sofa::core::objectmodel::Data< T >::setValue().
| void sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMEdgeCreationFunction | ( | int | edgeIndex, | |
| void * | param, | |||
| EdgeRestInformation & | ei, | |||
| const Edge & | , | |||
| const helper::vector< unsigned int > & | , | |||
| const helper::vector< double > & | ||||
| ) | [inline, static, protected] |
set to zero the stiffness matrix
Definition at line 60 of file TetrahedralTensorMassForceField.inl.
References sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::EdgeRestInformation::DfDx.
Referenced by sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::init().
| void sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMTetrahedronCreationFunction | ( | const helper::vector< unsigned int > & | triangleAdded, | |
| void * | param, | |||
| helper::vector< EdgeRestInformation > & | edgeData | |||
| ) | [inline, static, protected] |
get a reference on the edge set of the ith added tetrahedron
get a reference on the vertex set of the ith added tetrahedron
compute 6 times the rest volume
local indices of the edge
Definition at line 79 of file TetrahedralTensorMassForceField.inl.
References sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::_topology, cross(), dot(), sofa::core::objectmodel::BaseObject::f_printLog, sofa::core::componentmodel::topology::BaseMeshTopology::getEdge(), sofa::core::componentmodel::topology::BaseMeshTopology::getEdgeTetraShell(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::getLambda(), sofa::core::componentmodel::topology::BaseMeshTopology::getLocalTetrahedronEdges(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::getMu(), sofa::core::componentmodel::topology::BaseMeshTopology::getTetra(), sofa::core::objectmodel::Data< T >::getValue(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getX0(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::lambda, sofa::core::componentmodel::behavior::ForceField< DataTypes >::mstate, and sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::mu.
Referenced by sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::init().
| void sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMTetrahedronDestructionFunction | ( | const helper::vector< unsigned int > & | triangleAdded, | |
| void * | param, | |||
| helper::vector< EdgeRestInformation > & | edgeData | |||
| ) | [inline, static, protected] |
get a reference on the edge set of the ith added tetrahedron
get a reference on the vertex set of the ith added tetrahedron
compute 6 times the rest volume
local indices of the edge
Definition at line 156 of file TetrahedralTensorMassForceField.inl.
References sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::_topology, cross(), dot(), sofa::core::objectmodel::BaseObject::f_printLog, sofa::core::componentmodel::topology::BaseMeshTopology::getEdge(), sofa::core::componentmodel::topology::BaseMeshTopology::getEdgeTetraShell(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::getLambda(), sofa::core::componentmodel::topology::BaseMeshTopology::getLocalTetrahedronEdges(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::getMu(), sofa::core::componentmodel::topology::BaseMeshTopology::getTetra(), sofa::core::objectmodel::Data< T >::getValue(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getX0(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::lambda, sofa::core::componentmodel::behavior::ForceField< DataTypes >::mstate, and sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::mu.
Referenced by sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::init().
| void sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::updateLameCoefficients | ( | ) | [inline] |
compute lambda and mu based on the Young modulus and Poisson ratio
Definition at line 368 of file TetrahedralTensorMassForceField.inl.
References sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::f_poissonRatio, sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::f_youngModulus, sofa::core::objectmodel::Data< T >::getValue(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::lambda, and sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::mu.
Referenced by sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::init().
VecCoord sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::_initialPoints [protected] |
the intial positions of the points
Definition at line 98 of file TetrahedralTensorMassForceField.h.
Referenced by sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::addForce(), and sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::init().
sofa::core::componentmodel::topology::BaseMeshTopology* sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::_topology [protected] |
Definition at line 97 of file TetrahedralTensorMassForceField.h.
Referenced by sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::addDForce(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::addForce(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::handleTopologyChange(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::init(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMTetrahedronCreationFunction(), and sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMTetrahedronDestructionFunction().
EdgeData<EdgeRestInformation> sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::edgeInfo [protected] |
Definition at line 95 of file TetrahedralTensorMassForceField.h.
Referenced by sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::addDForce(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::addForce(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::getEdgeInfo(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::handleTopologyChange(), and sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::init().
Data<Real> sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::f_poissonRatio [protected] |
Data<Real> sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::f_youngModulus [protected] |
Real sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::lambda [protected] |
Definition at line 105 of file TetrahedralTensorMassForceField.h.
Referenced by sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::getLambda(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMTetrahedronCreationFunction(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMTetrahedronDestructionFunction(), and sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::updateLameCoefficients().
Real sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::mu [protected] |
first Lame coefficient
Definition at line 106 of file TetrahedralTensorMassForceField.h.
Referenced by sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::getMu(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMTetrahedronCreationFunction(), sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::TetrahedralTMTetrahedronDestructionFunction(), and sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::updateLameCoefficients().
bool sofa::component::forcefield::TetrahedralTensorMassForceField< DataTypes >::updateMatrix [protected] |
Definition at line 100 of file TetrahedralTensorMassForceField.h.
1.5.7.1