Skip to main content

Rocky Solver SDK 2024 R2

IRockyDeviceModel Struct Reference

Last update: 08.07.2024

#include <rocky_model_api.hpp>

Public Member Functions

ROCKY_FUNCTIONS double get_timestep () const
 
ROCKY_FUNCTIONS double get_current_time () const
 
ROCKY_FUNCTIONS IRockyCloudPoint get_particle_cloud_point (int point_cloud_index, const IRockyParticle &particle)
 
ROCKY_FUNCTIONS IRockyPairScalars get_pair_scalars (int pair_index)
 
ROCKY_FUNCTIONS IRockyGeometryScalars get_geometry_scalars (int geometry_index)
 

Detailed Description

IRockyDeviceModel includes auxiliary functions that are available only during the execution of a simulation. Hooks such as ROCKY_PLUGIN_PRE_FORCE..., ROCKY_PLUGIN_POST_FORCE..., and ROCKY_PLUGIN_PRE_MOVE..., provide an IRockyDeviceModel object as a parameter.

Member Function Documentation

◆ get_current_time()

ROCKY_FUNCTIONS double IRockyDeviceModel::get_current_time ( ) const
Returns
The value of the current time in the simulation.

◆ get_geometry_scalars()

ROCKY_FUNCTIONS IRockyGeometryScalars IRockyDeviceModel::get_geometry_scalars ( int  geometry_index)
Returns
An IRockyGeometryScalars object, that gives access to all geometry scalars defined in a project.
Parameters
geometry_indexThe index that identifies a specific geometry within a Rocky project.

◆ get_pair_scalars()

ROCKY_FUNCTIONS IRockyPairScalars IRockyDeviceModel::get_pair_scalars ( int  pair_index)
Returns
An IRockyPairScalars object, that gives access to all pair scalars defined in a project.
Parameters
pair_indexThe index that identifies a specific pair of particle groups or a pair formed by a particle group and a geometry.

◆ get_particle_cloud_point()

ROCKY_FUNCTIONS IRockyCloudPoint IRockyDeviceModel::get_particle_cloud_point ( int  point_cloud_index,
const IRockyParticle particle 
)
This function gets an auxiliary object that gives access
to cloud point values of the nearest point to a given particle.
Parameters
point_cloud_indexThe index that uniquely identifies a point cloud dataset.
particleA IRockyParticle whose position is used to determine the nearest cloud point.
Returns
An IRockyParticleCloudPoint object, which can be used to get cloud point values of the nearest point to the particle passed as argument. For more information about point clouds, please refer to the Rocky User Manual.

◆ get_timestep()

ROCKY_FUNCTIONS double IRockyDeviceModel::get_timestep ( ) const
Returns
The value of the simulation timestep.