Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
SofaCaribou::forcefield::FictitiousGridElasticForce Class Reference
Inheritance diagram for SofaCaribou::forcefield::FictitiousGridElasticForce:


struct  GaussNode

Public Types

enum  IntegrationMethod : unsigned int { IntegrationMethod::Regular = 0, IntegrationMethod::SubdividedVolume = 1, IntegrationMethod::SubdividedGauss = 2 }
 Integration method used to integrate the stiffness matrix. More...
using DataTypes = Vec3Types
using Inherit = ForceField< DataTypes >
using VecCoord = typename DataTypes::VecCoord
using VecDeriv = typename DataTypes::VecDeriv
using Coord = typename DataTypes::Coord
using Deriv = typename DataTypes::Deriv
using Real = typename Coord::value_type
using FictitiousGrid = SofaCaribou::topology::FictitiousGrid< DataTypes >
using Hexahedron = caribou::geometry::Hexahedron< caribou::Linear >
using RectangularHexahedron = caribou::geometry::RectangularHexahedron< caribou::Linear >
template<int nRows, int nColumns, int Options = Eigen::RowMajor>
using Matrix = Eigen::Matrix< Real, nRows, nColumns, Options >
template<int nRows, int nColumns>
using Map = Eigen::Map< const Matrix< nRows, nColumns, Eigen::RowMajor > >
template<int nRows, int Options = 0>
using Vector = Eigen::Matrix< Real, nRows, 1, Options >
template<int nRows>
using MapVector = Eigen::Map< const Vector< nRows, Eigen::ColMajor > >
using Mat33 = Matrix< 3, 3, Eigen::RowMajor >
using Vec3 = Vector< 3 >
using Mat2424 = Matrix< 24, 24, Eigen::RowMajor >
using Vec24 = Vector< 24 >
template<typename ObjectType >
using Link = SingleLink< FictitiousGridElasticForce, ObjectType, BaseLink::FLAG_STRONGLINK >

Public Member Functions

 SOFA_CLASS (FictitiousGridElasticForce, SOFA_TEMPLATE(ForceField, Vec3Types))
void init () override
void reinit () override
void addForce (const MechanicalParams *mparams, Data< VecDeriv > &d_f, const Data< VecCoord > &d_x, const Data< VecDeriv > &d_v) override
void addDForce (const MechanicalParams *, Data< VecDeriv > &, const Data< VecDeriv > &) override
void draw (const sofa::core::visual::VisualParams *vparams) override
SReal getPotentialEnergy (const MechanicalParams *, const Data< VecCoord > &) const override
void addKToMatrix (sofa::defaulttype::BaseMatrix *, SReal, unsigned int &) override
void computeBBox (const sofa::core::ExecParams *params, bool onlyVisible) override
template<typename T >
Hexahedron hexahedron (std::size_t hexa_id, const T &x) const
IntegrationMethod integration_method () const
std::string integration_method_as_string () const
void set_integration_method (const IntegrationMethod &m)
const std::vector< GaussNode > & gauss_nodes_of (std::size_t hexahedron_id) const
const Matrix< 24, 24 > & stiffness_matrix_of (std::size_t hexahedron_id) const
const Eigen::SparseMatrix< Real > & K ()
 Get the complete tangent stiffness matrix. More...
const Vector< Eigen::Dynamic > & eigenvalues ()
 Get the eigen values of the tangent stiffness matrix.
Real cond ()
 Get the condition number of the tangent stiffness matrix.

Static Public Attributes

static constexpr INTEGER_TYPE NumberOfNodes = caribou::geometry::traits<Hexahedron>::NumberOfNodesAtCompileTime

Protected Attributes

Data< Real > d_youngModulus
Data< Real > d_poissonRatio
Data< bool > d_linear_strain
Data< bool > d_corotated
Data< sofa::helper::OptionsGroup > d_integration_method
Link< FictitiousGridd_grid_container

Class Documentation

◆ SofaCaribou::forcefield::FictitiousGridElasticForce::GaussNode

struct SofaCaribou::forcefield::FictitiousGridElasticForce::GaussNode
Class Members
Matrix< NumberOfNodes, 3 > dN_dx
Mat33 F
Real weight

Member Enumeration Documentation

◆ IntegrationMethod

Integration method used to integrate the stiffness matrix.


Regular 8 points gauss integration.


Hexas are recursively subdivided into cuboid subcells and the later are used to compute the inside volume of the regular hexa's gauss points.

** Requires a sparse grid topology **


Hexas are recursively subdivided into cuboid subcells and the later are used to add new gauss points.

Gauss points outside of the boundary are ignored. ** Requires a sparse grid topology **

Member Function Documentation

◆ K()

const Eigen::SparseMatrix< FictitiousGridElasticForce::Real > & SofaCaribou::forcefield::FictitiousGridElasticForce::K ( )

Get the complete tangent stiffness matrix.

< Triplets are used to store matrix entries before the call to 'compress'. Duplicates entries are summed up.

The documentation for this class was generated from the following files: