iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
imstk::SphModel Class Reference
Inheritance diagram for imstk::SphModel:
Inheritance graph
[legend]
Collaboration diagram for imstk::SphModel:
Collaboration graph
[legend]

Public Member Functions

void configure (const std::shared_ptr< SphModelConfig > &params)
 Set simulation parameters.
 
bool initialize () override
 Initialize the dynamical model.
 
void resetToInitialState () override
 Reset the current state to the initial state.
 
const std::shared_ptr< SphModelConfig > & getParameters () const
 Get the simulation parameters.
 
void setTimeStep (const double timeStep) override
 Set the default time step size, valid only if using a fixed time step for integration.
 
void setDefaultTimeStep (const double timeStep)
 Set the default time step size, valid only if using a fixed time step for integration.
 
double getTimeStep () const override
 Returns the time step size.
 
void setInitialVelocities (const size_t numParticles, const Vec3d &initialVelocities)
 
double getParticlePressure (const double density)
 
void findNearestParticleToVertex (const VecDataArray< double, 3 > &points, const std::vector< std::vector< size_t >> &indices)
 Write the state to external file. More...
 
void setBoundaryConditions (std::shared_ptr< SphBoundaryConditions > sphBoundaryConditions)
 
std::shared_ptr< SphBoundaryConditionsgetBoundaryConditions ()
 
void setRestDensity (const double restDensity)
 
std::shared_ptr< TaskNodegetFindParticleNeighborsNode () const
 
std::shared_ptr< TaskNodegetComputeDensityNode () const
 
std::shared_ptr< TaskNodegetComputePressureNode () const
 
std::shared_ptr< TaskNodegetComputeSurfaceTensionNode () const
 
std::shared_ptr< TaskNodegetComputeTimeStepSizeNode () const
 
std::shared_ptr< TaskNodegetSumAccelsNode () const
 
std::shared_ptr< TaskNodegetIntegrateNode () const
 
std::shared_ptr< TaskNodegetComputeViscosityNode () const
 
std::shared_ptr< TaskNodegetUpdateVelocityNode () const
 
std::shared_ptr< TaskNodegetMoveParticlesNode () const
 
- Public Member Functions inherited from imstk::DynamicalModel< SphState >
 DynamicalModel (DynamicalModelType type=DynamicalModelType::None)
 
std::shared_ptr< SphStategetInitialState () const
 Return the initial state of the problem.
 
std::shared_ptr< SphStategetCurrentState () const
 Return the current state of the problem.
 
std::shared_ptr< SphStategetPreviousState () const
 Return the previous state of the problem.
 
void resetToInitialState () override
 Reset the current state to the initial state.
 
- Public Member Functions inherited from imstk::AbstractDynamicalModel
std::shared_ptr< TaskGraphgetTaskGraph () const
 
const DynamicalModelTypegetType () const
 Get the type of the object.
 
virtual void updatePhysicsGeometry ()
 Update the geometry of the model.
 
void setModelGeometry (std::shared_ptr< Geometry > geometry)
 Sets the model geometry.
 
bool isGeometryValid (const std::shared_ptr< Geometry > geometry)
 Checks if the given geometry is a valid geometry type for the model.
 
std::shared_ptr< GeometrygetModelGeometry () const
 Gets the model geometry.
 
void initGraphEdges ()
 Initializes the edges of the graph.
 
std::size_t getNumDegreeOfFreedom () const
 Get/Set the number of degrees of freedom.
 
void setNumDegreeOfFreedom (const size_t nDof)
 
virtual void setTimeStepSizeType (const TimeSteppingType type)
 Get/Set the type of approach used to update the time step size after every frame.
 
TimeSteppingType getTimeStepSizeType () const
 

Protected Member Functions

void initGraphEdges (std::shared_ptr< TaskNode > source, std::shared_ptr< TaskNode > sink) override
 Setup SPH compute graph connectivity.
 
- Protected Member Functions inherited from imstk::AbstractDynamicalModel
 AbstractDynamicalModel (DynamicalModelType type=DynamicalModelType::None)
 

Protected Attributes

std::shared_ptr< TaskNodem_findParticleNeighborsNode = nullptr
 
std::shared_ptr< TaskNodem_computeDensityNode = nullptr
 
std::shared_ptr< TaskNodem_computePressureAccelNode = nullptr
 
std::shared_ptr< TaskNodem_computeSurfaceTensionNode = nullptr
 
std::shared_ptr< TaskNodem_computeTimeStepSizeNode = nullptr
 
std::shared_ptr< TaskNodem_sumAccelsNode = nullptr
 
std::shared_ptr< TaskNodem_integrateNode = nullptr
 
std::shared_ptr< TaskNodem_updateVelocityNode = nullptr
 
std::shared_ptr< TaskNodem_computeViscosityNode = nullptr
 
std::shared_ptr< TaskNodem_moveParticlesNode = nullptr
 
std::shared_ptr< TaskNodem_normalizeDensityNode = nullptr
 
std::shared_ptr< TaskNodem_collectNeighborDensityNode = nullptr
 
- Protected Attributes inherited from imstk::DynamicalModel< SphState >
std::shared_ptr< SphStatem_initialState
 Initial state.
 
std::shared_ptr< SphStatem_currentState
 Current state.
 
std::shared_ptr< SphStatem_previousState
 Previous state.
 
- Protected Attributes inherited from imstk::AbstractDynamicalModel
DynamicalModelType m_type
 Mathematical model type.
 
std::size_t m_numDof
 Total number of degree of freedom.
 
std::shared_ptr< Geometrym_geometry = nullptr
 Physics geometry of the model.
 
std::set< std::string > m_validGeometryTypes
 Valid geometry types of this model.
 
TimeSteppingType m_timeStepSizeType = TimeSteppingType::Fixed
 
std::shared_ptr< TaskGraphm_taskGraph = nullptr
 

Additional Inherited Members

- Public Types inherited from imstk::AbstractDynamicalModel
enum  StateUpdateType {
  Displacement, Velocity, DeltaDisplacement, DeltaVelocity,
  None
}
 Type of the update of the state of the body.
 

Detailed Description

Definition at line 81 of file imstkSphModel.h.

Member Function Documentation

◆ findNearestParticleToVertex()

void imstk::SphModel::findNearestParticleToVertex ( const VecDataArray< double, 3 > &  points,
const std::vector< std::vector< size_t >> &  indices 
)

Write the state to external file.

Todo:
move this out of this class

Definition at line 786 of file imstkSphModel.cpp.


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