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

Classes

struct  GaussNode
 

Public Types

enum  IntegrationMethod : unsigned int { IntegrationMethod::Regular = 0, IntegrationMethod::OnePointGauss = 1 }
 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 Hexahedron = caribou::geometry::Hexahedron< 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 Rotation = Hexahedron::Matrix< 3, 3 >
 
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< HexahedronElasticForce, ObjectType, BaseLink::FLAG_STRONGLINK >
 

Public Member Functions

 SOFA_CLASS (HexahedronElasticForce, 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 = Hexahedron::NumberOfNodesAtCompileTime
 

Protected Attributes

Data< Real > d_youngModulus
 
Data< Real > d_poissonRatio
 
Data< bool > d_corotated
 
Data< sofa::helper::OptionsGroup > d_integration_method
 
Link< BaseMeshTopology > d_topology_container
 

Class Documentation

◆ SofaCaribou::forcefield::HexahedronElasticForce::GaussNode

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

Member Enumeration Documentation

◆ IntegrationMethod

Integration method used to integrate the stiffness matrix.

Enumerator
Regular 

Regular 8 points gauss integration.

OnePointGauss 

One gauss point integration at the center of the hexahedron.

Member Function Documentation

◆ K()

const Eigen::SparseMatrix< HexahedronElasticForce::Real > & SofaCaribou::forcefield::HexahedronElasticForce::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: