#include <EllipsoidForceField.h>


Data Structures | |
| class | Contact |
Public Types | |
| enum | { N = Coord::static_size } |
| typedef core::componentmodel::behavior::ForceField < DataTypes > | Inherit |
| typedef DataTypes::VecCoord | VecCoord |
| typedef DataTypes::VecDeriv | VecDeriv |
| typedef DataTypes::Coord | Coord |
| typedef DataTypes::Deriv | Deriv |
| typedef Coord::value_type | Real |
| typedef defaulttype::Mat< N, N, Real > | Mat |
Public Member Functions | |
| EllipsoidForceField () | |
| void | setStiffness (Real stiff) |
| void | setDamping (Real damp) |
| 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, double kFactor, double bFactor) |
| 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. | |
| void | draw () |
| Render internal data of this object, for debugging purposes. | |
| template<> | |
| 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. | |
| template<> | |
| void | addDForce (VecDeriv &df, const VecDeriv &dx, double kFactor, double bFactor) |
| Compute the force derivative given a small displacement from the position and velocity used in the previous call to addForce(). | |
| template<> | |
| 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. | |
| template<> | |
| void | addDForce (VecDeriv &df, const VecDeriv &dx, double kFactor, double bFactor) |
| Compute the force derivative given a small displacement from the position and velocity used in the previous call to addForce(). | |
| template<> | |
| 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. | |
| template<> | |
| void | addDForce (VecDeriv &df, const VecCoord &dx, double kFactor, double) |
| template<> | |
| 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. | |
| template<> | |
| void | addDForce (VecDeriv &df, const VecCoord &dx, double kFactor, double) |
Data Fields | |
| Data< Coord > | center |
| Data< Coord > | vradius |
| Data< Real > | stiffness |
| Data< Real > | damping |
| Data< defaulttype::Vec3f > | color |
| Data< bool > | bDraw |
Protected Attributes | |
| Data< sofa::helper::vector < Contact > > | contacts |
| EllipsoidForceFieldInternalData < DataTypes > | data |
Definition at line 49 of file EllipsoidForceField.h.
| typedef DataTypes::Coord sofa::component::forcefield::EllipsoidForceField< DataTypes >::Coord |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 55 of file EllipsoidForceField.h.
| typedef DataTypes::Deriv sofa::component::forcefield::EllipsoidForceField< DataTypes >::Deriv |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 56 of file EllipsoidForceField.h.
| typedef core::componentmodel::behavior::ForceField<DataTypes> sofa::component::forcefield::EllipsoidForceField< DataTypes >::Inherit |
Definition at line 52 of file EllipsoidForceField.h.
| typedef defaulttype::Mat<N,N,Real> sofa::component::forcefield::EllipsoidForceField< DataTypes >::Mat |
Definition at line 59 of file EllipsoidForceField.h.
| typedef Coord::value_type sofa::component::forcefield::EllipsoidForceField< DataTypes >::Real |
Definition at line 57 of file EllipsoidForceField.h.
| typedef DataTypes::VecCoord sofa::component::forcefield::EllipsoidForceField< DataTypes >::VecCoord |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 53 of file EllipsoidForceField.h.
| typedef DataTypes::VecDeriv sofa::component::forcefield::EllipsoidForceField< DataTypes >::VecDeriv |
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 54 of file EllipsoidForceField.h.
| anonymous enum |
| sofa::component::forcefield::EllipsoidForceField< DataTypes >::EllipsoidForceField | ( | ) | [inline] |
Definition at line 97 of file EllipsoidForceField.h.
| void sofa::component::forcefield::EllipsoidForceField< gpu::cuda::CudaVec3f1Types >::addDForce | ( | VecDeriv & | df, | |
| const VecCoord & | dx, | |||
| double | kFactor, | |||
| double | ||||
| ) | [inline] |
Definition at line 107 of file CudaEllipsoidForceField.inl.
References sofa::component::forcefield::EllipsoidForceField< DataTypes >::data, and sofa::gpu::cuda::EllipsoidForceFieldCuda3f1_addDForce().
| void sofa::component::forcefield::EllipsoidForceField< gpu::cuda::CudaVec3fTypes >::addDForce | ( | VecDeriv & | df, | |
| const VecCoord & | dx, | |||
| double | kFactor, | |||
| double | ||||
| ) | [inline] |
Definition at line 82 of file CudaEllipsoidForceField.inl.
References sofa::component::forcefield::EllipsoidForceField< DataTypes >::data, and sofa::gpu::cuda::EllipsoidForceFieldCuda3f_addDForce().
| void sofa::component::forcefield::EllipsoidForceField< gpu::cuda::CudaVec3f1Types >::addDForce | ( | VecDeriv & | df, | |
| const VecDeriv & | dx, | |||
| double | kFactor, | |||
| double | bFactor | |||
| ) | [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 += kFactor K dx + bFactor B dx $
This method must be implemented by the component, and is usually called by the generic ForceField::addDForce() method.
To support old components that implement the deprecated addForce method without scalar coefficients, it defaults to using a temporaty vector to compute $ K dx $ and then manually scaling all values by kFactor.
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
| void sofa::component::forcefield::EllipsoidForceField< gpu::cuda::CudaVec3fTypes >::addDForce | ( | VecDeriv & | df, | |
| const VecDeriv & | dx, | |||
| double | kFactor, | |||
| double | bFactor | |||
| ) | [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 += kFactor K dx + bFactor B dx $
This method must be implemented by the component, and is usually called by the generic ForceField::addDForce() method.
To support old components that implement the deprecated addForce method without scalar coefficients, it defaults to using a temporaty vector to compute $ K dx $ and then manually scaling all values by kFactor.
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
| void sofa::component::forcefield::EllipsoidForceField< DataTypes >::addDForce | ( | VecDeriv & | df, | |
| const VecDeriv & | dx, | |||
| double | kFactor, | |||
| double | bFactor | |||
| ) | [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 += kFactor K dx + bFactor B dx $
This method must be implemented by the component, and is usually called by the generic ForceField::addDForce() method.
To support old components that implement the deprecated addForce method without scalar coefficients, it defaults to using a temporaty vector to compute $ K dx $ and then manually scaling all values by kFactor.
Reimplemented from sofa::core::componentmodel::behavior::ForceField< DataTypes >.
Definition at line 118 of file EllipsoidForceField.inl.
References sofa::component::forcefield::EllipsoidForceField< DataTypes >::contacts, sofa::component::forcefield::EllipsoidForceField< DataTypes >::Contact::index, and sofa::component::forcefield::EllipsoidForceField< DataTypes >::Contact::m.
| void sofa::component::forcefield::EllipsoidForceField< gpu::cuda::CudaVec3f1Types >::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 90 of file CudaEllipsoidForceField.inl.
References BSIZE, sofa::component::forcefield::EllipsoidForceField< DataTypes >::center, sofa::component::forcefield::EllipsoidForceField< DataTypes >::damping, sofa::component::forcefield::EllipsoidForceField< DataTypes >::data, sofa::gpu::cuda::EllipsoidForceFieldCuda3f1_addForce(), sofa::gpu::cuda::EllipsoidForceFieldCuda3f_getNTmp(), sofa::core::objectmodel::Data< T >::getValue(), sofa::component::forcefield::EllipsoidForceField< DataTypes >::stiffness, and sofa::component::forcefield::EllipsoidForceField< DataTypes >::vradius.
| void sofa::component::forcefield::EllipsoidForceField< gpu::cuda::CudaVec3fTypes >::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 65 of file CudaEllipsoidForceField.inl.
References BSIZE, sofa::component::forcefield::EllipsoidForceField< DataTypes >::center, sofa::component::forcefield::EllipsoidForceField< DataTypes >::damping, sofa::component::forcefield::EllipsoidForceField< DataTypes >::data, sofa::gpu::cuda::EllipsoidForceFieldCuda3f_addForce(), sofa::gpu::cuda::EllipsoidForceFieldCuda3f_getNTmp(), sofa::core::objectmodel::Data< T >::getValue(), sofa::component::forcefield::EllipsoidForceField< DataTypes >::stiffness, and sofa::component::forcefield::EllipsoidForceField< DataTypes >::vradius.
| void sofa::component::forcefield::EllipsoidForceField< gpu::cuda::CudaVec3f1Types >::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 >.
| void sofa::component::forcefield::EllipsoidForceField< gpu::cuda::CudaVec3fTypes >::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 >.
| void sofa::component::forcefield::EllipsoidForceField< 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 69 of file EllipsoidForceField.inl.
References sofa::component::forcefield::EllipsoidForceField< DataTypes >::center, sofa::component::forcefield::EllipsoidForceField< DataTypes >::contacts, sofa::component::forcefield::EllipsoidForceField< DataTypes >::damping, force, sofa::core::objectmodel::Data< T >::getValue(), sofa::component::forcefield::EllipsoidForceField< DataTypes >::Contact::index, sofa::component::forcefield::EllipsoidForceField< DataTypes >::Contact::m, sofa::component::forcefield::EllipsoidForceField< DataTypes >::N, norm(), norm2(), sofa::helper::rabs(), sofa::helper::rsqrt(), sofa::component::forcefield::EllipsoidForceField< DataTypes >::stiffness, and sofa::component::forcefield::EllipsoidForceField< DataTypes >::vradius.
| void sofa::component::forcefield::EllipsoidForceField< DataTypes >::draw | ( | ) | [inline, virtual] |
Render internal data of this object, for debugging purposes.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 141 of file EllipsoidForceField.inl.
References sofa::component::forcefield::EllipsoidForceField< DataTypes >::bDraw, sofa::component::forcefield::EllipsoidForceField< DataTypes >::center, sofa::component::forcefield::EllipsoidForceField< DataTypes >::color, ftl::Type::get(), sofa::core::objectmodel::BaseObject::getContext(), sofa::core::objectmodel::Data< T >::getValue(), sofa::component::forcefield::EllipsoidForceField< DataTypes >::stiffness, and sofa::component::forcefield::EllipsoidForceField< DataTypes >::vradius.
| double sofa::component::forcefield::EllipsoidForceField< 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 134 of file EllipsoidForceField.inl.
| void sofa::component::forcefield::EllipsoidForceField< DataTypes >::setDamping | ( | Real | damp | ) | [inline] |
Definition at line 113 of file EllipsoidForceField.h.
References sofa::component::forcefield::EllipsoidForceField< DataTypes >::damping, and sofa::core::objectmodel::Data< T >::setValue().
| void sofa::component::forcefield::EllipsoidForceField< DataTypes >::setStiffness | ( | Real | stiff | ) | [inline] |
Definition at line 108 of file EllipsoidForceField.h.
References sofa::core::objectmodel::Data< T >::setValue(), and sofa::component::forcefield::EllipsoidForceField< DataTypes >::stiffness.
| Data<bool> sofa::component::forcefield::EllipsoidForceField< DataTypes >::bDraw |
Definition at line 95 of file EllipsoidForceField.h.
Referenced by sofa::component::forcefield::EllipsoidForceField< DataTypes >::draw().
| Data<Coord> sofa::component::forcefield::EllipsoidForceField< DataTypes >::center |
Definition at line 90 of file EllipsoidForceField.h.
Referenced by sofa::component::forcefield::EllipsoidForceField< DataTypes >::addForce(), and sofa::component::forcefield::EllipsoidForceField< DataTypes >::draw().
| Data<defaulttype::Vec3f> sofa::component::forcefield::EllipsoidForceField< DataTypes >::color |
Definition at line 94 of file EllipsoidForceField.h.
Referenced by sofa::component::forcefield::EllipsoidForceField< DataTypes >::draw().
Data<sofa::helper::vector<Contact> > sofa::component::forcefield::EllipsoidForceField< DataTypes >::contacts [protected] |
Definition at line 84 of file EllipsoidForceField.h.
Referenced by sofa::component::forcefield::EllipsoidForceField< DataTypes >::addDForce(), and sofa::component::forcefield::EllipsoidForceField< DataTypes >::addForce().
| Data<Real> sofa::component::forcefield::EllipsoidForceField< DataTypes >::damping |
Definition at line 93 of file EllipsoidForceField.h.
Referenced by sofa::component::forcefield::EllipsoidForceField< DataTypes >::addForce(), and sofa::component::forcefield::EllipsoidForceField< DataTypes >::setDamping().
EllipsoidForceFieldInternalData<DataTypes> sofa::component::forcefield::EllipsoidForceField< DataTypes >::data [protected] |
Definition at line 86 of file EllipsoidForceField.h.
Referenced by sofa::component::forcefield::EllipsoidForceField< DataTypes >::addDForce(), and sofa::component::forcefield::EllipsoidForceField< DataTypes >::addForce().
| Data<Real> sofa::component::forcefield::EllipsoidForceField< DataTypes >::stiffness |
| Data<Coord> sofa::component::forcefield::EllipsoidForceField< DataTypes >::vradius |
Definition at line 91 of file EllipsoidForceField.h.
Referenced by sofa::component::forcefield::EllipsoidForceField< DataTypes >::addForce(), and sofa::component::forcefield::EllipsoidForceField< DataTypes >::draw().
1.5.7.1