> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IRockyDeviceModel Struct Reference

`#include <rocky_model_api.hpp>`

## Public Member Functions

| Type | Name |
| - | - |
| ROCKY\_FUNCTIONS double | [get\_timestep](#ab03adbadfc1d2a7a8f3a1f849be73d1a) () const |
| ROCKY\_FUNCTIONS double | [get\_current\_time](#a089a84ac233a433ac17ac46fbbb229b3) () const |
| ROCKY\_FUNCTIONS double3 | [get\_gravity](#ac59cb9db0136afc98b82bfb07573101a) () const |
| ROCKY\_FUNCTIONS void | [set\_gravity](#a9980c5362764f3bf7a159ccd7865d947) (const double3 \&gravity) |
| ROCKY\_FUNCTIONS [IRockyCloudPoint](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r2/structIRockyCloudPoint.md) | [get\_particle\_cloud\_point](#ac4d4eb7321ad6815176bda70de368c17) (int point\_cloud\_index, const [IRockyParticle](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r2/structIRockyParticle.md) \&particle) |
| ROCKY\_FUNCTIONS [IRockyPairScalars](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r2/structIRockyPairScalars.md) | [get\_pair\_scalars](#a380db6692ee5fe3c15b52d62cef723cd) (int pair\_index) |
| ROCKY\_FUNCTIONS [IRockyGeometryScalars](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r2/structIRockyGeometryScalars.md) | [get\_geometry\_scalars](#a9bd2b236ca0c6f7859924b0ed588c584) (int geometry\_index) |

## Detailed Description

[`IRockyDeviceModel`](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r2/structIRockyDeviceModel) 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`](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r2/structIRockyDeviceModel) object as a parameter.

## Member Function Documentation

### get\_current\_time()

```cpp theme={null}
ROCKY_FUNCTIONS double IRockyDeviceModel::get_current_time() const
```

**Returns**

The value of the current time in the simulation.

### get\_geometry\_scalars()

```cpp theme={null}
ROCKY_FUNCTIONS IRockyGeometryScalars IRockyDeviceModel::get_geometry_scalars(
    int geometry_index
)
```

**Returns**

An [`IRockyGeometryScalars`](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r2/structIRockyGeometryScalars) object, that gives access to all geometry scalars defined in a project.

**Parameters**

| Name | Description |
| - | - |
| geometry\_index | The index that identifies a specific geometry within a Rocky project. |

### get\_gravity()

```cpp theme={null}
ROCKY_FUNCTIONS double3 IRockyDeviceModel::get_gravity() const
```

**This functions returns the current gravity acceleration**

in the simulation.

**Returns**

A `double3` value representing the current gravity acceleration vector in Cartesian Coordinates.

### get\_pair\_scalars()

```cpp theme={null}
ROCKY_FUNCTIONS IRockyPairScalars IRockyDeviceModel::get_pair_scalars(int pair_index)
```

**Returns**

An [`IRockyPairScalars`](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r2/structIRockyPairScalars) object, that gives access to all pair scalars defined in a project.

**Parameters**

| Name | Description |
| - | - |
| pair\_index | The index that identifies a specific pair of particle groups or a pair formed by a particle group and a geometry. |

### get\_particle\_cloud\_point()

```cpp theme={null}
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**

| Name | Description |
| - | - |
| point\_cloud\_index | The index that uniquely identifies a point cloud dataset. |
| particle | A [`IRockyParticle`](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r2/structIRockyParticle) 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()

```cpp theme={null}
ROCKY_FUNCTIONS double IRockyDeviceModel::get_timestep() const
```

**Returns**

The value of the simulation timestep.

### set\_gravity()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyDeviceModel::set_gravity(const double3 & gravity)
```

**This function sets the gravity acceleration to be used**

globally in the simulation from that time onward.

**Parameters**

| Name | Description |
| - | - |
| gravity | A `double3` value representing the gravity acceleration vector in Cartesian Coordinates. |
