122#if MOCHI_LANGUAGE_CPP20
189#if MOCHI_LANGUAGE_CPP20
240#if MOCHI_LANGUAGE_CPP20
A dynamically resizable array with syntax and behavior similar to std::pmr::vector.
SmithNeoHookeanMaterialParams NeoHookeanMaterialParams
SoftMaterialType
Material constitutive models for soft bodies.
@ NeoHookean
Neo-Hookean hyperelastic material.
MaterialPsdStrategy
Strategy for ensuring positive semi-definite (PSD) Hessian matrices in material models.
@ MaterialDefault
Use the material's default PSD strategy.
constexpr real kDefaultDensity
Default material density [kg/m³].
#define MOCHI_STRUCT_END()
#define MOCHI_FIELD(name)
#define MOCHI_STRUCT_BEGIN(name)
#define MOCHI_ATTRIBUTE(...)
Parameters for the Active Neo-Hookean composite material model.
Parameters for the Active Shape Targeting ARAP material model.
Parameters for the As-Rigid-As-Possible (ARAP) material model.
Parameters for the Linear Elastic (Hookean) material model.
Non-owning view of per-element material parameters for a soft body, in struct-of-arrays format.
Span< real const > arapStiffness
ARAP stiffness (μ) [Pa].
Span< real const > anisoLength
Anisotropic reference length (dimensionless). 1 per element.
Span< real const > youngsModulus
Young's modulus [Pa]. 1 per element.
SoftMaterialType type
Material constitutive model.
MaterialPsdStrategy psdStrategy
Strategy for ensuring positive semi-definite Hessian matrices.
bool operator!=(PerElementSoftMaterialDataView const &other) const =default
Span< real const > anisoTheta
Fiber azimuthal angle (θ) [rad]. 1 per element.
Span< real const > poissonRatio
Poisson's ratio (dimensionless). 1 per element.
Span< real const > anisoPhi
Fiber elevation angle (φ) [rad]. 1 per element.
bool operator==(PerElementSoftMaterialDataView const &other) const =default
PerElementSoftMaterialDataView()=default
Span< real const > anisoAlpha
Anisotropic stiffness (α) [Pa]. 1 per element.
Span< real const > shapeTargetTensor
Shape target tensor offset in flat symmetric upper-triangle layout.
Per-element material parameters for a soft body in struct-of-arrays format.
bool operator!=(PerElementSoftMaterialData const &other) const =default
DynamicArray< real > youngsModulus
Young's modulus [Pa]. 1 per element.
MaterialPsdStrategy psdStrategy
Strategy for ensuring positive semi-definite Hessian matrices.
DynamicArray< real > anisoPhi
Fiber elevation angle (φ) [rad]. 1 per element.
DynamicArray< real > anisoLength
Anisotropic reference length (dimensionless). 1 per element.
DynamicArray< real > anisoTheta
Fiber azimuthal angle (θ) [rad]. 1 per element.
DynamicArray< real > arapStiffness
ARAP stiffness (μ) [Pa].
SoftMaterialType type
Material constitutive model.
DynamicArray< real > anisoAlpha
Anisotropic stiffness (α) [Pa]. 1 per element.
int GetNumElements() const
Number of elements described by this per-element material field.
DynamicArray< real > shapeTargetTensor
Shape target tensor offset in flat symmetric upper-triangle layout.
DynamicArray< real > poissonRatio
Poisson's ratio (dimensionless). 1 per element.
bool operator==(PerElementSoftMaterialData const &other) const =default
PerElementSoftMaterialData()=default
Parameters for the stable Neo-Hookean hyperelastic material model by Smith et al.
Material parameters for soft body simulation.
ActiveShapeTargetingArapMaterialParams activeShapeTargetingArap
Parameters for the Active Shape Targeting ARAP material model.
ActiveNeoHookeanMaterialParams activeNeoHookean
Parameters for the Active Neo-Hookean material model.
real stiffnessDampingCoefficient
Stiffness damping coefficient β [s].
real density
Material density in the undeformed configuration [kg/m³].
bool operator==(SoftMaterialParams const &) const =default
SoftMaterialType type
Material constitutive model.
ArapMaterialParams arap
Parameters for the ARAP material model.
StVenantKirchhoffMaterialParams stVenantKirchhoff
Parameters for the St.
NeoHookeanMaterialParams neoHookean
Parameters for the Neo-Hookean material model.
LinearElasticMaterialParams linearElastic
Parameters for the Linear Elastic material model.
real massDampingCoefficient
Mass damping coefficient [1/s].
bool stiffnessDampingIncludeGeometricTerm
[Experimental] Include the geometric term in the stiffness-damping tangent.
Parameters for the Saint Venant-Kirchhoff (StVK) hyperelastic material model.