#include <EdgePressureForceField.h>


Data Structures | |
| class | EdgePressureInformation |
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 | |
| EdgePressureForceField () | |
| virtual | ~EdgePressureForceField () |
| 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 &, 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 &x) |
| Get the potential energy associated to this ForceField. | |
| virtual void | handleTopologyChange () |
| Handle topological Changes. | |
| void | draw () |
| Render internal data of this object, for debugging purposes. | |
| void | setDminAndDmax (const double _dmin, const double _dmax) |
| void | setNormal (const Coord n) |
| void | setPressure (Deriv _pressure) |
Protected Member Functions | |
| void | selectEdgesAlongPlane () |
| void | selectEdgesFromString () |
| void | updateEdgeInformation () |
| void | initEdgeInformation () |
| bool | isPointInPlane (Coord p) |
Protected Attributes | |
| EdgeSubsetData < EdgePressureInformation > | edgePressureMap |
| sofa::core::componentmodel::topology::BaseMeshTopology * | _topology |
| sofa::component::topology::EdgeSetGeometryAlgorithms < DataTypes > * | edgeGeo |
| Data< Deriv > | pressure |
| Data< std::string > | edgeList |
| Data< Deriv > | normal |
| the normal used to define the edge subjected to the pressure force. | |
| Data< Real > | dmin |
| Data< Real > | dmax |
Definition at line 47 of file EdgePressureForceField.h.
| typedef DataTypes::Coord sofa::component::forcefield::EdgePressureForceField< DataTypes >::Coord |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 52 of file EdgePressureForceField.h.
| typedef DataTypes::Deriv sofa::component::forcefield::EdgePressureForceField< DataTypes >::Deriv |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 53 of file EdgePressureForceField.h.
| typedef Coord::value_type sofa::component::forcefield::EdgePressureForceField< DataTypes >::Real |
Definition at line 54 of file EdgePressureForceField.h.
| typedef DataTypes::VecCoord sofa::component::forcefield::EdgePressureForceField< DataTypes >::VecCoord |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 50 of file EdgePressureForceField.h.
| typedef DataTypes::VecDeriv sofa::component::forcefield::EdgePressureForceField< DataTypes >::VecDeriv |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 51 of file EdgePressureForceField.h.
| sofa::component::forcefield::EdgePressureForceField< DataTypes >::EdgePressureForceField | ( | ) | [inline] |
Definition at line 87 of file EdgePressureForceField.h.
| sofa::component::forcefield::EdgePressureForceField< DataTypes >::~EdgePressureForceField | ( | ) | [inline, virtual] |
Definition at line 53 of file EdgePressureForceField.inl.
| virtual void sofa::component::forcefield::EdgePressureForceField< 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 101 of file EdgePressureForceField.h.
| void sofa::component::forcefield::EdgePressureForceField< 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 95 of file EdgePressureForceField.inl.
References sofa::component::forcefield::EdgePressureForceField< DataTypes >::_topology, sofa::component::forcefield::EdgePressureForceField< DataTypes >::edgePressureMap, force, and sofa::core::componentmodel::topology::BaseMeshTopology::getEdge().
| void sofa::component::forcefield::EdgePressureForceField< DataTypes >::draw | ( | ) | [inline, virtual] |
Render internal data of this object, for debugging purposes.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 189 of file EdgePressureForceField.inl.
References sofa::component::forcefield::EdgePressureForceField< DataTypes >::_topology, sofa::component::forcefield::EdgePressureForceField< DataTypes >::edgePressureMap, sofa::core::objectmodel::BaseObject::getContext(), sofa::core::componentmodel::topology::BaseMeshTopology::getEdge(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getX(), sofa::helper::gl::glVertexT(), and sofa::core::componentmodel::behavior::ForceField< DataTypes >::mstate.
| double sofa::component::forcefield::EdgePressureForceField< 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 111 of file EdgePressureForceField.inl.
| void sofa::component::forcefield::EdgePressureForceField< DataTypes >::handleTopologyChange | ( | ) | [inline, virtual] |
Handle topological Changes.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 57 of file EdgePressureForceField.inl.
References sofa::component::forcefield::EdgePressureForceField< DataTypes >::_topology, sofa::component::forcefield::EdgePressureForceField< DataTypes >::edgePressureMap, sofa::core::componentmodel::topology::BaseMeshTopology::firstChange(), sofa::core::componentmodel::topology::BaseMeshTopology::getNbEdges(), and sofa::core::componentmodel::topology::BaseMeshTopology::lastChange().
| void sofa::component::forcefield::EdgePressureForceField< DataTypes >::init | ( | void | ) | [inline, virtual] |
Initialization method called at graph modification, during bottom-up traversal.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 66 of file EdgePressureForceField.inl.
References sofa::component::forcefield::EdgePressureForceField< DataTypes >::_topology, sofa::component::forcefield::EdgePressureForceField< DataTypes >::dmax, sofa::component::forcefield::EdgePressureForceField< DataTypes >::dmin, sofa::component::forcefield::EdgePressureForceField< DataTypes >::edgeGeo, sofa::component::forcefield::EdgePressureForceField< DataTypes >::edgeList, sofa::core::objectmodel::BaseContext::get(), sofa::core::objectmodel::BaseObject::getContext(), sofa::core::objectmodel::BaseContext::getMeshTopology(), sofa::core::objectmodel::Data< T >::getValue(), sofa::component::forcefield::EdgePressureForceField< DataTypes >::initEdgeInformation(), sofa::component::forcefield::EdgePressureForceField< DataTypes >::selectEdgesAlongPlane(), and sofa::component::forcefield::EdgePressureForceField< DataTypes >::selectEdgesFromString().
| void sofa::component::forcefield::EdgePressureForceField< DataTypes >::initEdgeInformation | ( | ) | [inline, protected] |
Definition at line 118 of file EdgePressureForceField.inl.
References sofa::component::forcefield::EdgePressureForceField< DataTypes >::edgeGeo, sofa::component::forcefield::EdgePressureForceField< DataTypes >::edgePressureMap, and sofa::component::forcefield::EdgePressureForceField< DataTypes >::pressure.
Referenced by sofa::component::forcefield::EdgePressureForceField< DataTypes >::init().
| bool sofa::component::forcefield::EdgePressureForceField< DataTypes >::isPointInPlane | ( | Coord | p | ) | [inline, protected] |
Definition at line 119 of file EdgePressureForceField.h.
References sofa::component::forcefield::EdgePressureForceField< DataTypes >::dmax, sofa::component::forcefield::EdgePressureForceField< DataTypes >::dmin, dot(), sofa::core::objectmodel::Data< T >::getValue(), and sofa::component::forcefield::EdgePressureForceField< DataTypes >::normal.
Referenced by sofa::component::forcefield::EdgePressureForceField< DataTypes >::selectEdgesAlongPlane().
| void sofa::component::forcefield::EdgePressureForceField< DataTypes >::selectEdgesAlongPlane | ( | ) | [inline, protected] |
Definition at line 143 of file EdgePressureForceField.inl.
References sofa::component::forcefield::EdgePressureForceField< DataTypes >::_topology, sofa::component::forcefield::EdgePressureForceField< DataTypes >::edgePressureMap, sofa::core::componentmodel::topology::BaseMeshTopology::getEdge(), sofa::core::componentmodel::topology::BaseMeshTopology::getNbEdges(), sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >::getX0(), sofa::component::forcefield::EdgePressureForceField< DataTypes >::isPointInPlane(), and sofa::core::componentmodel::behavior::ForceField< DataTypes >::mstate.
Referenced by sofa::component::forcefield::EdgePressureForceField< DataTypes >::init().
| void sofa::component::forcefield::EdgePressureForceField< DataTypes >::selectEdgesFromString | ( | ) | [inline, protected] |
Definition at line 168 of file EdgePressureForceField.inl.
References sofa::component::forcefield::EdgePressureForceField< DataTypes >::edgeList, sofa::component::forcefield::EdgePressureForceField< DataTypes >::edgePressureMap, and sofa::core::objectmodel::Data< T >::getValue().
Referenced by sofa::component::forcefield::EdgePressureForceField< DataTypes >::init().
| void sofa::component::forcefield::EdgePressureForceField< DataTypes >::setDminAndDmax | ( | const double | _dmin, | |
| const double | _dmax | |||
| ) | [inline] |
| void sofa::component::forcefield::EdgePressureForceField< DataTypes >::setNormal | ( | const Coord | n | ) | [inline] |
Definition at line 111 of file EdgePressureForceField.h.
References sofa::component::forcefield::EdgePressureForceField< DataTypes >::normal.
| void sofa::component::forcefield::EdgePressureForceField< DataTypes >::setPressure | ( | Deriv | _pressure | ) | [inline] |
Definition at line 112 of file EdgePressureForceField.h.
References sofa::component::forcefield::EdgePressureForceField< DataTypes >::pressure, and sofa::component::forcefield::EdgePressureForceField< DataTypes >::updateEdgeInformation().
| void sofa::component::forcefield::EdgePressureForceField< DataTypes >::updateEdgeInformation | ( | ) | [inline, protected] |
Definition at line 131 of file EdgePressureForceField.inl.
References sofa::component::forcefield::EdgePressureForceField< DataTypes >::edgePressureMap, and sofa::component::forcefield::EdgePressureForceField< DataTypes >::pressure.
Referenced by sofa::component::forcefield::EdgePressureForceField< DataTypes >::setPressure().
sofa::core::componentmodel::topology::BaseMeshTopology* sofa::component::forcefield::EdgePressureForceField< DataTypes >::_topology [protected] |
Definition at line 72 of file EdgePressureForceField.h.
Referenced by sofa::component::forcefield::EdgePressureForceField< DataTypes >::addForce(), sofa::component::forcefield::EdgePressureForceField< DataTypes >::draw(), sofa::component::forcefield::EdgePressureForceField< DataTypes >::handleTopologyChange(), sofa::component::forcefield::EdgePressureForceField< DataTypes >::init(), and sofa::component::forcefield::EdgePressureForceField< DataTypes >::selectEdgesAlongPlane().
Data<Real> sofa::component::forcefield::EdgePressureForceField< DataTypes >::dmax [protected] |
Definition at line 83 of file EdgePressureForceField.h.
Referenced by sofa::component::forcefield::EdgePressureForceField< DataTypes >::init(), sofa::component::forcefield::EdgePressureForceField< DataTypes >::isPointInPlane(), and sofa::component::forcefield::EdgePressureForceField< DataTypes >::setDminAndDmax().
Data<Real> sofa::component::forcefield::EdgePressureForceField< DataTypes >::dmin [protected] |
Definition at line 82 of file EdgePressureForceField.h.
Referenced by sofa::component::forcefield::EdgePressureForceField< DataTypes >::init(), sofa::component::forcefield::EdgePressureForceField< DataTypes >::isPointInPlane(), and sofa::component::forcefield::EdgePressureForceField< DataTypes >::setDminAndDmax().
sofa::component::topology::EdgeSetGeometryAlgorithms<DataTypes>* sofa::component::forcefield::EdgePressureForceField< DataTypes >::edgeGeo [protected] |
Definition at line 73 of file EdgePressureForceField.h.
Referenced by sofa::component::forcefield::EdgePressureForceField< DataTypes >::init(), and sofa::component::forcefield::EdgePressureForceField< DataTypes >::initEdgeInformation().
Data<std::string> sofa::component::forcefield::EdgePressureForceField< DataTypes >::edgeList [protected] |
Definition at line 77 of file EdgePressureForceField.h.
Referenced by sofa::component::forcefield::EdgePressureForceField< DataTypes >::init(), and sofa::component::forcefield::EdgePressureForceField< DataTypes >::selectEdgesFromString().
EdgeSubsetData<EdgePressureInformation> sofa::component::forcefield::EdgePressureForceField< DataTypes >::edgePressureMap [protected] |
Definition at line 70 of file EdgePressureForceField.h.
Referenced by sofa::component::forcefield::EdgePressureForceField< DataTypes >::addForce(), sofa::component::forcefield::EdgePressureForceField< DataTypes >::draw(), sofa::component::forcefield::EdgePressureForceField< DataTypes >::handleTopologyChange(), sofa::component::forcefield::EdgePressureForceField< DataTypes >::initEdgeInformation(), sofa::component::forcefield::EdgePressureForceField< DataTypes >::selectEdgesAlongPlane(), sofa::component::forcefield::EdgePressureForceField< DataTypes >::selectEdgesFromString(), and sofa::component::forcefield::EdgePressureForceField< DataTypes >::updateEdgeInformation().
Data<Deriv> sofa::component::forcefield::EdgePressureForceField< DataTypes >::normal [protected] |
the normal used to define the edge subjected to the pressure force.
Definition at line 80 of file EdgePressureForceField.h.
Referenced by sofa::component::forcefield::EdgePressureForceField< DataTypes >::isPointInPlane(), and sofa::component::forcefield::EdgePressureForceField< DataTypes >::setNormal().
Data<Deriv> sofa::component::forcefield::EdgePressureForceField< DataTypes >::pressure [protected] |
Definition at line 75 of file EdgePressureForceField.h.
Referenced by sofa::component::forcefield::EdgePressureForceField< DataTypes >::initEdgeInformation(), sofa::component::forcefield::EdgePressureForceField< DataTypes >::setPressure(), and sofa::component::forcefield::EdgePressureForceField< DataTypes >::updateEdgeInformation().
1.5.7.1