#include <Strain.h>
Class to compute and manage strain measures in elasticity simulations. More...
Class to compute and manage strain measures in elasticity simulations.
This class handles the computation of strain measures (deformation gradient, right Cauchy-Green tensor, Green-Lagrange tensor, and strain invariants) using an optional pattern for lazy computation. It supports initialization from either the deformation gradient (F) or the right Cauchy-Green tensor (C).
| DataTypes | The data type of the simulation. Must provide:
|
std::optional to avoid unnecessary computationsStatic Public Attributes | |
| static constexpr sofa::Size | spatial_dimensions = DataTypes::spatial_dimensions |
| Spatial dimension of the problem (2 or 3) More... | |
| static constexpr sofa::type::IdentityMatrix | identity {} |
Protected Attributes | |
| std::optional< DeformationGradient > | m_deformationGradient |
| std::optional< RightCauchyGreenTensor > | m_rightCauchyGreenTensor |
| std::optional< Real > | m_determinantF |
| std::optional< GreenLagrangeTensor > | m_greenLagrangeTensor |
| std::optional< Real > | m_invariant1 |
| std::optional< Real > | m_invariant2 |
| std::optional< Real > | m_invariant3 |
Public Member Functions | |
| constexpr | Strain (DeformationGradientTag, const DeformationGradient &F) |
| Constructor initializing from deformation gradient. More... | |
| constexpr | Strain (RightCauchyGreenTensorTag, const RightCauchyGreenTensor &C) |
| Constructor initializing from right Cauchy-Green tensor. More... | |
| const DeformationGradient & | deformationGradient () const |
| void | setDeformationGradient (const DeformationGradient &F) |
| Real | getDeterminantDeformationGradient () |
| const RightCauchyGreenTensor & | getRightCauchyGreenTensor () |
| void | setRightCauchyGreenTensor (const RightCauchyGreenTensor &C) |
| const GreenLagrangeTensor & | getGreenLagrangeTensor () |
| Real | getInvariant1 () |
| Real | getInvariant2 () |
| Real | getInvariant3 () |
| void | reset () |
| Reset all computed values. More... | |
Protected Member Functions | |
| void | computeDeterminant () |
| void | computeRightCauchyGreenTensor () |
| void | computeGreenLagrangeTensor () |
| void | computeInvariant1 () |
| void | computeInvariant2 () |
| void | computeInvariant3 () |
|
staticconstexpr |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticconstexpr |
Spatial dimension of the problem (2 or 3)
|
inlineconstexpr |
Constructor initializing from deformation gradient.
| tag | Tag for deformation gradient initialization |
| F | Deformation gradient tensor (F) |
|
inlineconstexpr |
Constructor initializing from right Cauchy-Green tensor.
| tag | Tag for right Cauchy-Green tensor initialization |
| C | Right Cauchy-Green tensor (C) |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Reset all computed values.
Clears all optional values (deformation gradient, C, invariants, tensors)
|
inline |
|
inline |