IRockyTriangleScalarsModel allows users to add new triangle scalars, find triangle scalars created in other modules or activate triangle scalars known to Rocky, during the setup phase of a module. Triangle scalars are special variables attached to boundary triangles, which are able to store values per triangle that are preserved between time iterations during a simulation.
Inherits from:
- ScalarsModel< rocky20::TriangleScalarsController >
Members
- add
- add_accumulation_scalar
- calculate_sum_over_geometries
- enable_storage_of_exchanged_heat
- find
- pull_scalar_from_devices
- push_scalar_to_devices
- reset
- reset_exchanged_heat
- set_dimension
Public functions
Function find
- name: The name given to the scalar at the moment of its creation.
- const char * name
Function add
double:
for storing custom values during a simulation, preserving them between time iterations.
Parameters:
- name: The name given to the scalar variable. The purpose of this name is twofold. First, it enables to find this scalar variable from other module, in order to share their values. Second, if the scalar variable can be displayed in a 3D window as a property, this name will identify it in the Rocky UI.
- unit: A string specifying the unit in S.I. associated to the scalar variable.
- output: Enables/disables the storage in disk at output times, for the visualization and post-processing of the scalar values.
- const char * name
- const char * unit
- bool output = true
Function add_accumulation_scalar
data_type for storing custom values during a simulation, preserving them between time iterations. The scalar added with this method has a special behavior defined for pulling data from devices in multi-gpu simulations: It will accumulate those values in the host memory.
Parameters:
- name: The name given to the scalar variable. The purpose of this name is twofold. First, it enables to find this scalar variable from other module, in order to share their values. Second, if the scalar variable can be displayed in a 3D window as a property, this name will identify it in the Rocky UI.
- unit: A string specifying the unit in S.I. associated to the scalar variable.
- output: Enables/disables the storage in disk at output times, for the visualization and post-processing of the scalar values.
- const char * name
- const char * unit
- bool output = true
Function reset
- scalar_index: The index attributed to the scalar variable at the moment of its creation.
- int scalar_index
Function set_dimension
IRockyModel object.
Parameters:
- scalar_index: The index attributed to the scalar variable at the moment of its creation.
- dimension_factor: The appropriate dimensional factor for the scalar variable.
- int scalar_index
- double dimension_factor
Function enable_storage_of_exchanged_heat
IRockyTriangleScalarsModel::reset_exchanged_heat() function.
Return type: void
Function reset_exchanged_heat
ROCKY_PLUGIN_BEGIN_ITERATION hook. In that case, at the end of an iteration, a custom module can get the value of the total heat received by each triangle during the last timestep.
Return type: void
Function calculate_sum_over_geometries
double or IRockyStatisticsAccumulator.
Parameters:
- int scalar_index
Function pull_scalar_from_devices
- scalar_index: the index of the scalar we want to copy.
- int scalar_index
Function push_scalar_to_devices
- scalar_index: the index of the scalar we want to push to devices.
- int scalar_index