    

 ## On this page

  

 

 # IRockyGeometryScalars Struct Reference

 Last update: 16.07.2025 

`#include <<a class="el" href="rocky__boundary__scalars_8hpp_source.xhtml">rocky_boundary_scalars.hpp</a>>`

Inherits EntityScalars&lt; rocky20::BoundaryScalars &gt;.

## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

ROCKY\_FUNCTIONS double [get\_scalar](#aa943cd14cadc5673b99e273f135e82e1) (int scalar\_index) const ROCKY\_FUNCTIONS void [set\_scalar](#a566039747df70cbffa7bba5225906a5e) (int scalar\_index, double value) const ROCKY\_FUNCTIONS void [add\_scalar](#a870beada21c47f75239b2f523e1dfca1) (int scalar\_index, double value) const ROCKY\_FUNCTIONS void [max\_scalar](#aa5bd66e1850855de607d9499a7dfc0b4) (int scalar\_index, double value) const <a id="details" name="details"></a>## Detailed Description

When running a simulation, an `<a class="el" href="structIRockyGeometryScalars.xhtml">IRockyGeometryScalars</a>` gives access to all geometry scalars defined in the project. Geometry scalars are special variables with a different value associated to every geometry in a project.



## Member Function Documentation

<a id="a870beada21c47f75239b2f523e1dfca1" name="a870beada21c47f75239b2f523e1dfca1"></a>## [◆ ](#a870beada21c47f75239b2f523e1dfca1)add\_scalar()

 ROCKY\_FUNCTIONS void IRockyGeometryScalars::add\_scalar  ( int *scalar\_index*,    double *value* ) const

If a custom scalar variable was defined during the setup of the module,this method can be used to sum a value to the current one stored in it.Parameters scalar\_indexThe integer index that was associated to the scalar variable during the setup of the module.valueThe value that must be summed to the current stored value.  




<a id="aa943cd14cadc5673b99e273f135e82e1" name="aa943cd14cadc5673b99e273f135e82e1"></a>## [◆ ](#aa943cd14cadc5673b99e273f135e82e1)get\_scalar()

 ROCKY\_FUNCTIONS double IRockyGeometryScalars::get\_scalar  ( int *scalar\_index*)  const

If a custom scalar variable was defined during the setup of the module,the value currently stored can be accessed with this method.Parameters scalar\_indexThe integer index that was associated to the scalar variable during the setup of the module.ReturnsThe value currently stored in the scalar variable. 



<a id="aa5bd66e1850855de607d9499a7dfc0b4" name="aa5bd66e1850855de607d9499a7dfc0b4"></a>## [◆ ](#aa5bd66e1850855de607d9499a7dfc0b4)max\_scalar()

 ROCKY\_FUNCTIONS void IRockyGeometryScalars::max\_scalar  ( int *scalar\_index*,    double *value* ) const

If a custom scalar variable was defined during the setup of the module,this method can be used to make the scalar store the maximum of a set of values. A common use of this method is, for instance, to find the maximum among a set of values associated to the contacts of a particle.Parameters scalar\_indexThe integer index that was associated to the scalar variable during the setup of the module.valueA value that must be checked if it is greater than the current stored value. 



<a id="a566039747df70cbffa7bba5225906a5e" name="a566039747df70cbffa7bba5225906a5e"></a>## [◆ ](#a566039747df70cbffa7bba5225906a5e)set\_scalar()

 ROCKY\_FUNCTIONS void IRockyGeometryScalars::set\_scalar  ( int *scalar\_index*,    double *value* ) const

If a custom scalar variable was defined during the setup of the module,this method can be used to store a value on it.Parameters scalar\_indexThe integer index that was associated to the scalar variable during the setup of the module.valueThe value that must be stored.