Skip to main content

Rocky Solver SDK 2026 R1

Structure IRockyJointScalars

Last update: 09.03.2026

#include

When running a simulation an IRockyJointScalars object gives access to all joint scalars defined in the project. These joint scalars can be built-in scalars defined in the solver, or custom joint scalars defined by the current module or other active modules.

Inherits from:

  • EntityScalars\ rocky20::JointScalars >

Members

Public functions

Function get_scalar

![][const]

ROCKY_FUNCTIONS double IRockyJointScalars::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_index: The integer index that was associated to the scalar variable during the setup of the module.

Returns:

The value currently stored in the scalar variable.

Parameters:

  • int scalar_index

Return type: ROCKY_FUNCTIONS double

Function set_scalar

![][const]

ROCKY_FUNCTIONS void IRockyJointScalars::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_index: The integer index that was associated to the scalar variable during the setup of the module.
  • value: The value that must be stored.

Parameters:

  • int scalar_index
  • double value

Return type: ROCKY_FUNCTIONS void

Function add_scalar

![][const]

ROCKY_FUNCTIONS void IRockyJointScalars::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_index: The integer index that was associated to the scalar variable during the setup of the module.
  • value: The value that must be summed to the current stored value.

Parameters:

  • int scalar_index
  • double value

Return type: ROCKY_FUNCTIONS void

Function max_scalar

![][const]

ROCKY_FUNCTIONS void IRockyJointScalars::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_index: The integer index that was associated to the scalar variable during the setup of the module.
  • value: A value that must be checked if it is greater than the current stored value.

Parameters:

  • int scalar_index
  • double value

Return type: ROCKY_FUNCTIONS void

[const]: https://img.shields.io/badge/-const-lightblue (const)

Connect with Ansys