    

 ## On this page

  

 

 # rocky\_model\_api

 Last update: 17.07.2025 

<a id="l00001" name="l00001"></a> 1\#pragma once

<a id="l00002" name="l00002"></a> 2 

<a id="l00003" name="l00003"></a> 3// Includes =======================================================================================

<a id="l00004" name="l00004"></a> 4\#include "rocky\_model.hpp"

<a id="l00005" name="l00005"></a> 5\#include "rocky\_particle\_api.hpp"

<a id="l00006" name="l00006"></a> 6 

<a id="l00007" name="l00007"></a> 7// ================================================================================================

<a id="l00008" name="l00008"></a> 8// IRockyDeviceModel

<a id="l00009" name="l00009"></a> 9// ================================================================================================

<a id="l00010" name="l00010"></a> 10 

<a id="l00018" name="l00018"></a>[ 18](structIRockyDeviceModel.xhtml)struct [IRockyDeviceModel](structIRockyDeviceModel.xhtml)

<a id="l00019" name="l00019"></a> 19{

<a id="l00020" name="l00020"></a> 20 

<a id="l00024" name="l00024"></a> 24 ROCKY_FUNCTIONS double [get\_timestep](structIRockyDeviceModel.xhtml#ab03adbadfc1d2a7a8f3a1f849be73d1a)() const;

<a id="l00025" name="l00025"></a> 25 

<a id="l00029" name="l00029"></a> 29 ROCKY_FUNCTIONS double [get\_current\_time](structIRockyDeviceModel.xhtml#a089a84ac233a433ac17ac46fbbb229b3)() const;

<a id="l00030" name="l00030"></a> 30 

<a id="l00046" name="l00046"></a> 46 ROCKY_FUNCTIONS [IRockyCloudPoint](structIRockyCloudPoint.xhtml) [get\_particle\_cloud\_point](structIRockyDeviceModel.xhtml#ac4d4eb7321ad6815176bda70de368c17)(

<a id="l00047" name="l00047"></a> 47 int point_cloud_index, const [IRockyParticle](structIRockyParticle.xhtml) &amp;particle);

<a id="l00048" name="l00048"></a> 48 

<a id="l00056" name="l00056"></a> 56 ROCKY_FUNCTIONS [IRockyPairScalars](structIRockyPairScalars.xhtml) [get\_pair\_scalars](structIRockyDeviceModel.xhtml#a380db6692ee5fe3c15b52d62cef723cd)(int pair_index);

<a id="l00057" name="l00057"></a> 57 

<a id="l00065" name="l00065"></a> 65 ROCKY_FUNCTIONS [IRockyGeometryScalars](structIRockyGeometryScalars.xhtml) [get\_geometry\_scalars](structIRockyDeviceModel.xhtml#a9bd2b236ca0c6f7859924b0ed588c584)(int geometry_index);

<a id="l00066" name="l00066"></a> 66 

<a id="l00069" name="l00069"></a> 69 [[deprecated("Use get\_timestep() instead.")]]

<a id="l00070" name="l00070"></a> 70 ROCKY_FUNCTIONS double get_time_step() const;

<a id="l00071" name="l00071"></a> 71 

<a id="l00072" name="l00072"></a> 72 RockyDeviceModel _impl;

<a id="l00073" name="l00073"></a> 73 

<a id="l00075" name="l00075"></a> 75};



<a id="l00076" name="l00076"></a> 76 

<a id="l00077" name="l00077"></a> 77// deprecated

<a id="l00078" name="l00078"></a> 78inline

<a id="l00079" name="l00079"></a> 79ROCKY_FUNCTIONS double IRockyDeviceModel::get_time_step() const

<a id="l00080" name="l00080"></a> 80{

<a id="l00081" name="l00081"></a> 81 return this-&gt;_impl.get_timestep();

<a id="l00082" name="l00082"></a> 82}

<a id="l00083" name="l00083"></a> 83 

<a id="l00084" name="l00084"></a> 84inline

<a id="l00085" name="l00085"></a>[ 85](structIRockyDeviceModel.xhtml#ab03adbadfc1d2a7a8f3a1f849be73d1a)ROCKY_FUNCTIONS double [IRockyDeviceModel::get\_timestep](structIRockyDeviceModel.xhtml#ab03adbadfc1d2a7a8f3a1f849be73d1a)() const

<a id="l00086" name="l00086"></a> 86{

<a id="l00087" name="l00087"></a> 87 return this-&gt;_impl.get_timestep();

<a id="l00088" name="l00088"></a> 88}



<a id="l00089" name="l00089"></a> 89 

<a id="l00090" name="l00090"></a> 90inline

<a id="l00091" name="l00091"></a>[ 91](structIRockyDeviceModel.xhtml#a089a84ac233a433ac17ac46fbbb229b3)ROCKY_FUNCTIONS double [IRockyDeviceModel::get\_current\_time](structIRockyDeviceModel.xhtml#a089a84ac233a433ac17ac46fbbb229b3)() const

<a id="l00092" name="l00092"></a> 92{

<a id="l00093" name="l00093"></a> 93 return this-&gt;_impl.get_current_time();

<a id="l00094" name="l00094"></a> 94}



<a id="l00095" name="l00095"></a> 95 

<a id="l00096" name="l00096"></a> 96inline ROCKY_FUNCTIONS [IRockyCloudPoint](structIRockyCloudPoint.xhtml)

<a id="l00097" name="l00097"></a>[ 97](structIRockyDeviceModel.xhtml#ac4d4eb7321ad6815176bda70de368c17)[IRockyDeviceModel::get\_particle\_cloud\_point](structIRockyDeviceModel.xhtml#ac4d4eb7321ad6815176bda70de368c17)(int point_cloud_index, const [IRockyParticle](structIRockyParticle.xhtml)&amp; particle)

<a id="l00098" name="l00098"></a> 98{

<a id="l00099" name="l00099"></a> 99 auto point_cloud = this-&gt;_impl.model-&gt;point_clouds + point_cloud_index;

<a id="l00100" name="l00100"></a> 100 int point_index = this-&gt;_impl.model-&gt;particle_scalars-&gt;get_scalar&lt;int&gt;(

<a id="l00101" name="l00101"></a> 101 point_cloud-&gt;particle_scalars_index, particle._impl.particle_index);

<a id="l00102" name="l00102"></a> 102 return [IRockyCloudPoint](structIRockyCloudPoint.xhtml)(point_cloud, point_index);

<a id="l00103" name="l00103"></a> 103}



<a id="l00104" name="l00104"></a> 104 

<a id="l00105" name="l00105"></a>[ 105](structIRockyDeviceModel.xhtml#a380db6692ee5fe3c15b52d62cef723cd)inline ROCKY_FUNCTIONS [IRockyPairScalars](structIRockyPairScalars.xhtml) [IRockyDeviceModel::get\_pair\_scalars](structIRockyDeviceModel.xhtml#a380db6692ee5fe3c15b52d62cef723cd)(int pair_index)

<a id="l00106" name="l00106"></a> 106{

<a id="l00107" name="l00107"></a> 107 return [IRockyPairScalars](structIRockyPairScalars.xhtml)(*this-&gt;_impl.model-&gt;pair_scalars, pair_index);

<a id="l00108" name="l00108"></a> 108}



<a id="l00109" name="l00109"></a> 109 

<a id="l00110" name="l00110"></a>[ 110](structIRockyDeviceModel.xhtml#a9bd2b236ca0c6f7859924b0ed588c584)inline ROCKY_FUNCTIONS [IRockyGeometryScalars](structIRockyGeometryScalars.xhtml) [IRockyDeviceModel::get\_geometry\_scalars](structIRockyDeviceModel.xhtml#a9bd2b236ca0c6f7859924b0ed588c584)(int geometry_index)

<a id="l00111" name="l00111"></a> 111{

<a id="l00112" name="l00112"></a> 112 return [IRockyGeometryScalars](structIRockyGeometryScalars.xhtml)(*this-&gt;_impl.model-&gt;boundary_scalars, geometry_index);

<a id="l00113" name="l00113"></a> 113}



[IRockyCloudPoint](structIRockyCloudPoint.xhtml)

**Definition** rocky_point_cloud_api.hpp:15



[IRockyDeviceModel](structIRockyDeviceModel.xhtml)

**Definition** rocky_model_api.hpp:19



[IRockyDeviceModel::get\_current\_time](structIRockyDeviceModel.xhtml#a089a84ac233a433ac17ac46fbbb229b3)

ROCKY_FUNCTIONS double get_current_time() const

**Definition** rocky_model_api.hpp:91



[IRockyDeviceModel::get\_pair\_scalars](structIRockyDeviceModel.xhtml#a380db6692ee5fe3c15b52d62cef723cd)

ROCKY_FUNCTIONS IRockyPairScalars get_pair_scalars(int pair_index)

**Definition** rocky_model_api.hpp:105



[IRockyDeviceModel::get\_geometry\_scalars](structIRockyDeviceModel.xhtml#a9bd2b236ca0c6f7859924b0ed588c584)

ROCKY_FUNCTIONS IRockyGeometryScalars get_geometry_scalars(int geometry_index)

**Definition** rocky_model_api.hpp:110



[IRockyDeviceModel::get\_timestep](structIRockyDeviceModel.xhtml#ab03adbadfc1d2a7a8f3a1f849be73d1a)

ROCKY_FUNCTIONS double get_timestep() const

**Definition** rocky_model_api.hpp:85



[IRockyDeviceModel::get\_particle\_cloud\_point](structIRockyDeviceModel.xhtml#ac4d4eb7321ad6815176bda70de368c17)

ROCKY_FUNCTIONS IRockyCloudPoint get_particle_cloud_point(int point_cloud_index, const IRockyParticle &amp;particle)

**Definition** rocky_model_api.hpp:97



[IRockyGeometryScalars](structIRockyGeometryScalars.xhtml)

**Definition** rocky_boundary_scalars.hpp:96



[IRockyPairScalars](structIRockyPairScalars.xhtml)

**Definition** rocky_pair_scalars.hpp:100



[IRockyParticle](structIRockyParticle.xhtml)

**Definition** rocky_particle_api.hpp:27