#include <TetrahedronFEMForceField.h>
Compute Finite Element forces based on tetrahedral elements. Corotational methods are based on a rotation from world-space to material-space.
Public Attributes | |
type::vector< Mat33 > | m_rotations |
Data< VecCoord > | _initialPoints |
the initial positions of the points More... | |
int | method |
Data< std::string > | f_method |
the computation method of the displacements More... | |
Data< Real > | _poissonRatio |
FEM Poisson Ratio [0,0.5[. More... | |
Data< VecReal > | _youngModulus |
FEM Young Modulus. More... | |
Data< VecReal > | _localStiffnessFactor |
Allow specification of different stiffness per element. If there are N element and M values are specified, the youngModulus factor for element i would be localStiffnessFactor[i*M/N]. More... | |
Data< bool > | _updateStiffnessMatrix |
Data< bool > | _assembling |
Data< sofa::helper::OptionsGroup > | _gatherPt |
use in GPU version More... | |
Data< sofa::helper::OptionsGroup > | _gatherBsize |
use in GPU version More... | |
Data< bool > | drawHeterogeneousTetra |
Draw Heterogeneous Tetra in different color. More... | |
Real | minYoung |
Real | maxYoung |
type::vector< Real > | elemLambda |
type::vector< Real > | elemMu |
type::vector< Mat44 > | elemShapeFun |
Real | prevMaxStress |
Data< int > | _computeVonMisesStress |
compute and display von Mises stress: 0: no computations, 1: using corotational strain, 2: using full Green strain More... | |
Data< type::vector< Real > > | _vonMisesPerElement |
von Mises Stress per element More... | |
Data< type::vector< Real > > | _vonMisesPerNode |
von Mises Stress per node More... | |
Data< type::vector< type::RGBAColor > > | _vonMisesStressColors |
Vector of colors describing the VonMises stress. More... | |
Real | m_minVonMisesPerNode |
Real | m_maxVonMisesPerNode |
Data< std::string > | _showStressColorMap |
Color map used to show stress values. More... | |
Data< float > | _showStressAlpha |
Alpha for vonMises visualisation. More... | |
Data< bool > | _showVonMisesStressPerNode |
draw points showing vonMises stress interpolated in nodes More... | |
Data< bool > | d_showVonMisesStressPerNodeColorMap |
draw triangles showing vonMises stress interpolated in nodes More... | |
Data< bool > | _showVonMisesStressPerElement |
draw triangles showing vonMises stress interpolated in elements More... | |
Data< Real > | d_showElementGapScale |
draw gap between elements (when showWireFrame is disabled) More... | |
Data< bool > | _updateStiffness |
udpate structures (precomputed in init) using stiffness parameters in each iteration (set listening=1) More... | |
SingleLink< TetrahedronFEMForceField< DataTypes >, sofa::core::topology::BaseMeshTopology, BaseLink::FLAG_STOREPATH|BaseLink::FLAG_STRONGLINK > | l_topology |
Link to be set to the topology container in the component graph. More... | |
type::vector< type::Vec< 6, Real > > | elemDisplacements |
bool | updateVonMisesStress |
Plasticity such as "Interactive Virtual Materials", Muller & Gross, GI 2004 | |
Data< Real > | _plasticMaxThreshold |
Data< Real > | _plasticYieldThreshold |
Plastic Yield Threshold (2-norm of the strain) More... | |
Data< Real > | _plasticCreep |
this parameters is different from the article, here it includes the multiplication by dt More... | |
Protected Member Functions | |
TetrahedronFEMForceField () | |
~TetrahedronFEMForceField () override | |
void | computeStrainDisplacement (StrainDisplacement &J, Coord a, Coord b, Coord c, Coord d) |
Real | peudo_determinant_for_coef (const type::Mat< 2, 3, Real > &M) |
void | computeStiffnessMatrix (StiffnessMatrix &S, StiffnessMatrix &SR, const MaterialStiffness &K, const StrainDisplacement &J, const Transformation &Rot) |
virtual void | computeMaterialStiffness (Index i, Index &a, Index &b, Index &c, Index &d) |
void | computeForce (Displacement &F, const Displacement &Depl, VoigtTensor &plasticStrain, const MaterialStiffness &K, const StrainDisplacement &J) |
void | computeForce (Displacement &F, const Displacement &Depl, const MaterialStiffness &K, const StrainDisplacement &J, SReal fact) |
void | initSmall (Index i, Index &a, Index &b, Index &c, Index &d) |
void | accumulateForceSmall (Vector &f, const Vector &p, typename VecElement::const_iterator elementIt, Index elementIndex) |
void | applyStiffnessSmall (Vector &f, const Vector &x, Index i=0, Index a=0, Index b=1, Index c=2, Index d=3, SReal fact=1.0) |
void | initLarge (Index i, Index &a, Index &b, Index &c, Index &d) |
void | computeRotationLarge (Transformation &r, const Vector &p, const Index &a, const Index &b, const Index &c) |
void | accumulateForceLarge (Vector &f, const Vector &p, typename VecElement::const_iterator elementIt, Index elementIndex) |
void | initPolar (Index i, Index &a, Index &b, Index &c, Index &d) |
void | accumulateForcePolar (Vector &f, const Vector &p, typename VecElement::const_iterator elementIt, Index elementIndex) |
void | initSVD (Index i, Index &a, Index &b, Index &c, Index &d) |
void | accumulateForceSVD (Vector &f, const Vector &p, typename VecElement::const_iterator elementIt, Index elementIndex) |
void | applyStiffnessCorotational (Vector &f, const Vector &x, Index i=0, Index a=0, Index b=1, Index c=2, Index d=3, SReal fact=1.0) |
void | handleTopologyChange () override |
void | computeVonMisesStress () |
bool | isComputeVonMisesStressMethodSet () |
void | computeMinMaxFromYoungsModulus () |
virtual void | drawTrianglesFromTetrahedra (const core::visual::VisualParams *vparams, bool showVonMisesStressPerElement, bool drawVonMisesStress, const VecCoord &x, const VecReal &youngModulus, bool heterogeneous, Real minVM, Real maxVM, helper::ReadAccessor< Data< type::vector< Real >>> vM) |
virtual void | drawTrianglesFromRangeOfTetrahedra (const simulation::Range< VecElement::const_iterator > &range, const core::visual::VisualParams *vparams, bool showVonMisesStressPerElement, bool drawVonMisesStress, bool showWireFrame, const VecCoord &x, const VecReal &youngModulus, bool heterogeneous, Real minVM, Real maxVM, helper::ReadAccessor< Data< type::vector< Real >>> vM) |
void | handleEvent (core::objectmodel::Event *event) override |
Friends | |
class | TetrahedronFEMForceFieldInternalData< DataTypes > |
Per element (tetrahedron) data | |
typedef type::VecNoInit< 12, Real > | Displacement |
Displacement vector (deformation of the 4 corners of a tetrahedron. More... | |
typedef type::Mat< 6, 6, Real > | MaterialStiffness |
Material stiffness matrix of a tetrahedron. More... | |
typedef type::Mat< 12, 6, Real > | StrainDisplacement |
Strain-displacement matrix. More... | |
typedef type::MatNoInit< 3, 3, Real > | Transformation |
Rigid transformation (rotation) matrix. More... | |
typedef type::Mat< 12, 12, Real > | StiffnessMatrix |
Stiffness matrix ( = RJKJtRt with K the Material stiffness matrix, J the strain-displacement matrix, and R the transformation matrix if any ) More... | |
typedef type::VecNoInit< 6, Real > | VoigtTensor |
Symmetrical tensor written as a vector following the Voigt notation. More... | |
type::MatNoInit< 3, 3, Real > | R0 |
Full system matrix assembly support | |
typedef std::pair< Index, Real > | Col_Value |
typedef type::vector< Col_Value > | CompressedValue |
typedef type::vector< CompressedValue > | CompressedMatrix |
CompressedMatrix | _stiffnesses |
Data<bool> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_assembling |
Data<int> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_computeVonMisesStress |
compute and display von Mises stress: 0: no computations, 1: using corotational strain, 2: using full Green strain
Data< sofa::helper::OptionsGroup > sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_gatherBsize |
use in GPU version
Data< sofa::helper::OptionsGroup > sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_gatherPt |
use in GPU version
|
protected |
Data< VecCoord > sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_initialPoints |
the initial positions of the points
|
protected |
|
protected |
Data<VecReal> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_localStiffnessFactor |
Allow specification of different stiffness per element. If there are N element and M values are specified, the youngModulus factor for element i would be localStiffnessFactor[i*M/N].
Data<Real> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_plasticCreep |
this parameters is different from the article, here it includes the multiplication by dt
Data<Real> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_plasticMaxThreshold |
|
protected |
one plastic strain per element
Data<Real> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_plasticYieldThreshold |
Plastic Yield Threshold (2-norm of the strain)
Data<Real> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_poissonRatio |
FEM Poisson Ratio [0,0.5[.
|
protected |
The initials positions in its frame.
|
protected |
Data<float> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_showStressAlpha |
Alpha for vonMises visualisation.
Data<std::string> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_showStressColorMap |
Color map used to show stress values.
Data<bool> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_showVonMisesStressPerElement |
draw triangles showing vonMises stress interpolated in elements
Data<bool> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_showVonMisesStressPerNode |
draw points showing vonMises stress interpolated in nodes
|
protected |
Data<bool> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_updateStiffness |
udpate structures (precomputed in init) using stiffness parameters in each iteration (set listening=1)
Data<bool> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_updateStiffnessMatrix |
Data<type::vector<Real> > sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_vonMisesPerElement |
von Mises Stress per element
Data<type::vector<Real> > sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_vonMisesPerNode |
von Mises Stress per node
Data<type::vector<type::RGBAColor> > sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_vonMisesStressColors |
Vector of colors describing the VonMises stress.
Data<VecReal > sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::_youngModulus |
FEM Young Modulus.
Data<Real> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::d_showElementGapScale |
draw gap between elements (when showWireFrame is disabled)
Data<bool> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::d_showVonMisesStressPerNodeColorMap |
draw triangles showing vonMises stress interpolated in nodes
|
protected |
Data< bool > sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::drawHeterogeneousTetra |
Draw Heterogeneous Tetra in different color.
type::vector<type::Vec<6,Real> > sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::elemDisplacements |
type::vector<Real> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::elemLambda |
to compute vonMises stress for visualization two options: either using corotational strain (TODO) or full Green strain tensor (which must be therefore computed for each element and requires some pre-calculations in reinit)
type::vector<Real> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::elemMu |
type::vector<Mat44> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::elemShapeFun |
Data<std::string> sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::f_method |
the computation method of the displacements
|
protected |
|
protected |
|
protected |
|
protected |
Link to be set to the topology container in the component graph.
Real sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::m_maxVonMisesPerNode |
Real sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::m_minVonMisesPerNode |
|
protected |
|
protected |
|
protected |
|
protected |
type::vector< Mat33 > sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::m_rotations |
|
protected |
|
protected |
|
protected |
Vector of material stiffness matrices of each tetrahedron.
Real sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::maxYoung |
int sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::method |
Real sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::minYoung |
|
protected |
Real sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::prevMaxStress |
|
protected |
|
protected |
|
protected |
the strain-displacement matrices vector
bool sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::updateVonMisesStress |
|
protected |
|
overrideprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineoverride |
|
inlineoverride |
|
override |
|
override |
|
inlineprotected |
|
inlineprotected |
|
final |
|
override |
|
override |
|
inlineprotected |
|
inlineprotected |
|
protectedvirtual |
|
virtual |
|
protected |
|
inlineprotected |
|
protected |
|
inlineprotected |
|
protected |
|
override |
|
protectedvirtual |
|
protectedvirtual |
const TetrahedronFEMForceField< DataTypes >::Transformation & sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::getActualTetraRotation | ( | Index | index | ) |
void sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::getElementStiffnessMatrix | ( | Real * | stiffness, |
Index | nodeIdx | ||
) |
|
inline |
const TetrahedronFEMForceField< DataTypes >::Transformation & sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::getInitialTetraRotation | ( | Index | index | ) |
const TetrahedronFEMForceField< DataTypes >::MaterialStiffness & sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::getMaterialStiffness | ( | TetrahedronID | tetraId | ) |
|
inlineoverride |
|
inline |
const type::fixed_array< typename TetrahedronFEMForceField< DataTypes >::Coord, 4 > & sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::getRotatedInitialElements | ( | TetrahedronID | tetraId | ) |
|
inline |
|
override |
|
override |
void sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::getRotations | ( | VecReal & | vecR | ) |
const TetrahedronFEMForceField< DataTypes >::StrainDisplacement & sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::getStrainDisplacement | ( | TetrahedronID | tetraId | ) |
|
overrideprotected |
|
inlineoverrideprotected |
|
override |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inlineoverride |
|
override |
|
inline |
void sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::setMethod | ( | int | val | ) |
void sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::setMethod | ( | std::string | methodName | ) |
|
inline |
|
inline |
void sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::setYoungModulus | ( | Real | val | ) |
sofa::component::solidmechanics::fem::elastic::TetrahedronFEMForceField< DataTypes >::SOFA_CLASS2 | ( | SOFA_TEMPLATE(TetrahedronFEMForceField< DataTypes >, DataTypes) | , |
SOFA_TEMPLATE(core::behavior::ForceField, DataTypes) | , | ||
SOFA_TEMPLATE(core::behavior::RotationFinder, DataTypes) | |||
) |
anonymous enum |
|
friend |