iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
imstk::PenaltyCH Class Reference

Implements penalty collision handling between Fem and Rigid models. More...

#include <imstkPenaltyCH.h>

Inheritance diagram for imstk::PenaltyCH:
Inheritance graph
[legend]
Collaboration diagram for imstk::PenaltyCH:
Collaboration graph
[legend]

Public Member Functions

void setInputFeObject (std::shared_ptr< FeDeformableObject > feObj)
 
void setInputRbdObject (std::shared_ptr< RigidObject2 > rbdObj)
 
std::shared_ptr< FeDeformableObjectgetInputFeObject ()
 
std::shared_ptr< RigidObject2getInputRbdObject ()
 
void setContactStiffness (const double stiffness)
 Set the contact stiffness.
 
void setContactVelocityDamping (const double damping)
 Set the contact velocity damping.
 
- Public Member Functions inherited from imstk::CollisionHandling
virtual const std::string getTypeName () const =0
 
void setInputObjectA (std::shared_ptr< CollidingObject > objectA)
 Set the input objects.
 
void setInputObjectB (std::shared_ptr< CollidingObject > objectB)
 
std::shared_ptr< CollidingObjectgetInputObjectA () const
 Get the input objects.
 
std::shared_ptr< CollidingObjectgetInputObjectB () const
 
virtual std::shared_ptr< GeometrygetHandlingGeometryA ()
 Get the geometry used for handling defaults to the collision geometry.
 
virtual std::shared_ptr< GeometrygetHandlingGeometryB ()
 
void setInputCollisionData (std::shared_ptr< CollisionData > collisionData)
 Set/Get the input collision data used for handling.
 
void setInputCollisionData (std::shared_ptr< std::vector< std::shared_ptr< CollisionData >>> collisionVectorData)
 Set/Get the input collision data used for handling This supports collating information from multiple collision detect algorithms.
 
std::shared_ptr< const CollisionDatagetInputCollisionData () const
 
void update ()
 Handle the input collision data.
 

Protected Member Functions

void handle (const std::vector< CollisionElement > &elementsA, const std::vector< CollisionElement > &elementsB) override
 Handle the input collision data. Elements will be flipped (if needed) such that elementsA corresponds with inputObjectA and B with inputObjectB in the case CD is backwards from CH. More...
 
void computeContactForcesAnalyticRigid (const std::vector< CollisionElement > &elements, std::shared_ptr< RigidObject2 > analyticObj)
 Given the collision data, applies contact as external force to the rigid body (onyl supports PointDirection contacts)
 
void computeContactForcesDiscreteDeformable (const std::vector< CollisionElement > &elements, std::shared_ptr< FeDeformableObject > deformableObj)
 Given the collision data, applies nodal forces in the FEM model.
 
- Protected Member Functions inherited from imstk::CollisionHandling
void updateCollisionData (std::shared_ptr< const CollisionData > data)
 

Protected Attributes

double m_stiffness = 5.0e5
 Stiffness of contact.
 
double m_damping = 0.5
 Damping of the contact.
 
- Protected Attributes inherited from imstk::CollisionHandling
std::shared_ptr< CollidingObjectm_inputObjectA
 
std::shared_ptr< CollidingObjectm_inputObjectB
 
std::shared_ptr< const CollisionDatam_colData
 Collision data.
 
std::shared_ptr< std::vector< std::shared_ptr< CollisionData > > > m_colVectorData
 Expansion to allow collision detection to return multiple types of collision data.
 
std::function< void()> m_updateFunction = []() {}
 
bool m_clearData = true
 
bool m_processConstraints = true
 

Detailed Description

Implements penalty collision handling between Fem and Rigid models.

Definition at line 24 of file imstkPenaltyCH.h.

Member Function Documentation

◆ handle()

void imstk::PenaltyCH::handle ( const std::vector< CollisionElement > &  elementsA,
const std::vector< CollisionElement > &  elementsB 
)
overrideprotectedvirtual

Handle the input collision data. Elements will be flipped (if needed) such that elementsA corresponds with inputObjectA and B with inputObjectB in the case CD is backwards from CH.

Parameters
CDelements to resolve geomA
CDelements to resolve geomB

Implements imstk::CollisionHandling.

Definition at line 42 of file imstkPenaltyCH.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

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