SOFA API  6a688117
Open source framework for multi-physics simuation
sofa::component::forcefield::FastTriangularBendingSprings< _DataTypes >::EdgeSpring Class Reference

#include <FastTriangularBendingSprings.h>

Public Attributes

sofa::defaulttype::Vec< 4, unsigned > vid
 vertex indices, in circular order More...
 
sofa::defaulttype::Vec< 4, Realalpha
 weight of each vertex in the bending vector More...
 
Real lambda
 bending stiffness More...
 
bool is_activated
 
bool is_initialized
 

Public Member Functions

void setEdgeSpring (const VecCoord &p, unsigned iA, unsigned iB, unsigned iC, unsigned iD, Real materialBendingStiffness)
 Store the vertex indices and perform all the precomputations. More...
 
Real addForce (VecDeriv &f, const VecCoord &p, const VecDeriv &) const
 Accumulates force and return potential energy. More...
 
void addDForce (VecDeriv &df, const VecDeriv &dp, Real kfactor) const
 
void addStiffness (sofa::defaulttype::BaseMatrix *bm, unsigned int offset, SReal scale, core::behavior::ForceField< _DataTypes > *ff) const
 Stiffness matrix assembly. More...
 
void getStiffness (StiffnessMatrix &K) const
 Compliant stiffness matrix assembly. More...
 
void replaceIndex (index_type oldIndex, index_type newIndex)
 replace a vertex index with another one More...
 
void replaceIndices (const helper::vector< index_type > &newIndices)
 replace all the vertex indices with the given ones More...
 

Friends

std::ostream & operator<< (std::ostream &os, const EdgeSpring &)
 Output stream. More...
 
std::istream & operator>> (std::istream &in, EdgeSpring &)
 Input stream. More...
 

Attribute details

template<class _DataTypes>
sofa::defaulttype::Vec<4,Real> sofa::component::forcefield::FastTriangularBendingSprings< _DataTypes >::EdgeSpring::alpha

weight of each vertex in the bending vector

template<class _DataTypes>
bool sofa::component::forcefield::FastTriangularBendingSprings< _DataTypes >::EdgeSpring::is_activated
template<class _DataTypes>
bool sofa::component::forcefield::FastTriangularBendingSprings< _DataTypes >::EdgeSpring::is_initialized
template<class _DataTypes>
Real sofa::component::forcefield::FastTriangularBendingSprings< _DataTypes >::EdgeSpring::lambda

bending stiffness

template<class _DataTypes>
sofa::defaulttype::Vec<4,unsigned> sofa::component::forcefield::FastTriangularBendingSprings< _DataTypes >::EdgeSpring::vid

vertex indices, in circular order

Function details

template<class _DataTypes>
void sofa::component::forcefield::FastTriangularBendingSprings< _DataTypes >::EdgeSpring::addDForce ( VecDeriv df,
const VecDeriv dp,
Real  kfactor 
) const
inline
template<class _DataTypes >
FastTriangularBendingSprings< _DataTypes >::Real sofa::component::forcefield::FastTriangularBendingSprings< _DataTypes >::EdgeSpring::addForce ( VecDeriv f,
const VecCoord p,
const VecDeriv  
) const

Accumulates force and return potential energy.

template<class _DataTypes>
void sofa::component::forcefield::FastTriangularBendingSprings< _DataTypes >::EdgeSpring::addStiffness ( sofa::defaulttype::BaseMatrix bm,
unsigned int  offset,
SReal  scale,
core::behavior::ForceField< _DataTypes > *  ff 
) const

Stiffness matrix assembly.

template<class _DataTypes >
void sofa::component::forcefield::FastTriangularBendingSprings< _DataTypes >::EdgeSpring::getStiffness ( StiffnessMatrix K) const

Compliant stiffness matrix assembly.

template<class _DataTypes >
void sofa::component::forcefield::FastTriangularBendingSprings< _DataTypes >::EdgeSpring::replaceIndex ( index_type  oldIndex,
index_type  newIndex 
)

replace a vertex index with another one

template<class _DataTypes >
void sofa::component::forcefield::FastTriangularBendingSprings< _DataTypes >::EdgeSpring::replaceIndices ( const helper::vector< index_type > &  newIndices)

replace all the vertex indices with the given ones

template<class _DataTypes >
void sofa::component::forcefield::FastTriangularBendingSprings< _DataTypes >::EdgeSpring::setEdgeSpring ( const VecCoord p,
unsigned  iA,
unsigned  iB,
unsigned  iC,
unsigned  iD,
Real  materialBendingStiffness 
)

Store the vertex indices and perform all the precomputations.

Enum details

template<class _DataTypes>
anonymous enum
Enumerator

Related details

template<class _DataTypes>
std::ostream& operator<< ( std::ostream &  os,
const EdgeSpring  
)
friend

Output stream.

template<class _DataTypes>
std::istream& operator>> ( std::istream &  in,
EdgeSpring  
)
friend

Input stream.