9 #include "imstkInternalForceModel.h" 12 #pragma warning( push ) 13 #pragma warning( disable : 4458 ) 15 #include <isotropicHyperelasticFEM.h> 17 #pragma warning( pop ) 31 std::shared_ptr<vega::VolumetricMesh> mesh,
32 const double inversionThreshold,
33 const bool withGravity =
true,
34 const double gravity = 10.0);
43 double* data =
const_cast<double*
>(u.data());
44 m_isotropicHyperelasticFem->ComputeForces(data, internalForce.data());
52 double* data =
const_cast<double*
>(u.data());
53 m_isotropicHyperelasticFem->GetTangentStiffnessMatrix(data, m_vegaTangentStiffnessMatrix.get());
62 m_isotropicHyperelasticFem->GetStiffnessMatrixTopology(tangentStiffnessMatrix);
68 inline void getForceAndMatrix(
const Vectord& u, Vectord& internalForce, SparseMatrixd& tangentStiffnessMatrix)
override 70 double* data =
const_cast<double*
>(u.data());
71 m_isotropicHyperelasticFem->GetForceAndTangentStiffnessMatrix(data, internalForce.data(), m_vegaTangentStiffnessMatrix.get());
80 m_vegaTangentStiffnessMatrix = K;
84 std::shared_ptr<vega::IsotropicHyperelasticFEM> m_isotropicHyperelasticFem;
85 std::shared_ptr<vega::IsotropicMaterial> m_isotropicMaterial;
86 std::shared_ptr<vega::SparseMatrix> m_vegaTangentStiffnessMatrix;
void getTangentStiffnessMatrix(const Vectord &u, SparseMatrixd &tangentStiffnessMatrix) override
Get the tangent stiffness matrix.
Force model for the isotropic hyperelastic material.
void getTangentStiffnessMatrixTopology(vega::SparseMatrix **tangentStiffnessMatrix) override
Get the tangent stiffness matrix topology.
Base class for internal force model within the following context.
void getForceAndMatrix(const Vectord &u, Vectord &internalForce, SparseMatrixd &tangentStiffnessMatrix) override
Get the tangent stiffness matrix and internal force.
void getInternalForce(const Vectord &u, Vectord &internalForce) override
Get the internal force.
static void updateValuesFromMatrix(std::shared_ptr< vega::SparseMatrix > vegaMatrix, double *values)
Update the values of the Eigen sparse matrix given the linearized array of data from the Vega matrix...
void setTangentStiffness(std::shared_ptr< vega::SparseMatrix > K) override
Set the tangent stiffness matrix.