9 #include "imstkInternalForceModel.h" 13 class StVKInternalForces;
28 const bool withGravity =
true,
const double gravity = -9.81);
36 double* data =
const_cast<double*
>(u.data());
37 m_stiffnessMatrix->MultiplyVector(data, internalForce.data());
41 #pragma warning( push ) 42 #pragma warning( disable : 4100 ) 44 inline void getTangentStiffnessMatrix(
const Vectord& u, SparseMatrixd& tangentStiffnessMatrix)
override 50 InternalForceModel::updateValuesFromMatrix(m_stiffnessMatrix, tangentStiffnessMatrix.valuePtr());
54 #pragma warning( pop ) 62 *tangentStiffnessMatrix =
new vega::SparseMatrix(*m_stiffnessMatrix.get());
70 m_stiffnessMatrix = K;
74 std::shared_ptr<vega::SparseMatrix> m_stiffnessMatrix;
75 std::shared_ptr<vega::StVKInternalForces> m_stVKInternalForces;
78 vega::SparseMatrix* m_stiffnessMatrixRawPtr;
void getTangentStiffnessMatrixTopology(vega::SparseMatrix **tangentStiffnessMatrix) override
Get the tangent stiffness matrix topology.
void setTangentStiffness(std::shared_ptr< vega::SparseMatrix > K) override
Set the tangent stiffness matrix.
void getInternalForce(const Vectord &u, Vectord &internalForce) override
Compute the internal force.
Base class for internal force model within the following context.
Force model for linear finite element formulation.