SOFA API  9fc4753c
Open source framework for multi-physics simuation
sofa::component::solidmechanics::fem::elastic::HexahedronRotation< DataTypes > Class Template Reference

#include <HexahedronRotation.h>

Computes the orientation matrix for 8-node hexahedral elements. More...

Detailed Description

template<class DataTypes>
class sofa::component::solidmechanics::fem::elastic::HexahedronRotation< DataTypes >

Computes the orientation matrix for 8-node hexahedral elements.

This rotation method calculates the element's orientation relative to its rest configuration by computing an orthonormal basis from two average edges of the hexahedron. The resulting rotation matrix is then used to transform the initial rotation matrix.

Template Parameters
DataTypesThe data type used throughout the simulation (e.g., sofa::defaulttype::Vec3Types for 3D)

Public Member Functions

template<std::size_t NumberOfNodesInElement>
void computeRotation (RotationMatrix &rotationMatrix, const RotationMatrix &initialRotationMatrix, const std::array< sofa::Coord_t< DataTypes >, NumberOfNodesInElement > &nodesPosition, const std::array< sofa::Coord_t< DataTypes >, NumberOfNodesInElement > &nodesRestPosition)
 

Static Public Member Functions

static constexpr sofa::helper::Item getItem ()
 

Function details

◆ computeRotation()

template<class DataTypes >
template<std::size_t NumberOfNodesInElement>
void sofa::component::solidmechanics::fem::elastic::HexahedronRotation< DataTypes >::computeRotation ( RotationMatrix rotationMatrix,
const RotationMatrix initialRotationMatrix,
const std::array< sofa::Coord_t< DataTypes >, NumberOfNodesInElement > &  nodesPosition,
const std::array< sofa::Coord_t< DataTypes >, NumberOfNodesInElement > &  nodesRestPosition 
)
inline

Computes the rotation matrix for the hexahedral element

Parameters
rotationMatrixOutput: Current rotation matrix (relative to initial configuration)
initialRotationMatrixThe initial rotation matrix (from rest configuration)
nodesPositionCurrent positions of all nodes
nodesRestPositionRest positions of all nodes (initial configuration)

◆ getItem()

template<class DataTypes >
static constexpr sofa::helper::Item sofa::component::solidmechanics::fem::elastic::HexahedronRotation< DataTypes >::getItem ( )
inlinestaticconstexpr