iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | Static Public Member Functions | List of all members
imstk::InternalForceModel Class Referenceabstract

Base class for internal force model within the following context. More...

#include <imstkInternalForceModel.h>

Inheritance diagram for imstk::InternalForceModel:
Inheritance graph
[legend]

Public Member Functions

virtual void getInternalForce (const Vectord &u, Vectord &internalForce)=0
 Compute internal force internalForce at state u.
 
virtual void getTangentStiffnessMatrix (const Vectord &u, SparseMatrixd &tangentStiffnessMatrix)=0
 Compute stiffness matrix tangentStiffnessMatrix at state .
 
virtual void getTangentStiffnessMatrixTopology (vega::SparseMatrix **tangentStiffnessMatrix)=0
 Build the sparsity pattern for stiffness matrix.
 
virtual void getForceAndMatrix (const Vectord &u, Vectord &internalForce, SparseMatrixd &tangentStiffnessMatrix)
 Compute both internal force internalForce and stiffness matrix tangentStiffnessMatrix at state . More...
 
virtual void setTangentStiffness (std::shared_ptr< vega::SparseMatrix > K)=0
 Specify tangent stiffness matrix.
 

Static Public Member Functions

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. More...
 

Detailed Description

Base class for internal force model within the following context.

Definition at line 30 of file imstkInternalForceModel.h.

Member Function Documentation

◆ getForceAndMatrix()

void imstk::InternalForceModel::getForceAndMatrix ( const Vectord &  u,
Vectord &  internalForce,
SparseMatrixd &  tangentStiffnessMatrix 
)
virtual

Compute both internal force internalForce and stiffness matrix tangentStiffnessMatrix at state .

Note
This default implementation just call getInternalForce and getTangentStiffnessMatrix, but a more efficient implementation can be rewrite this.

Reimplemented in imstk::IsotropicHyperelasticFeForceModel, and imstk::CorotationalFemForceModel.

Definition at line 34 of file imstkInternalForceModel.cpp.

Here is the call graph for this function:

◆ updateValuesFromMatrix()

void imstk::InternalForceModel::updateValuesFromMatrix ( std::shared_ptr< vega::SparseMatrix >  vegaMatrix,
double *  values 
)
static

Update the values of the Eigen sparse matrix given the linearized array of data from the Vega matrix.

This operation should not add new values to the array since the matrices structures should remain the same. It just replaces the values in the array.

Definition at line 12 of file imstkInternalForceModel.cpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: