Skip to main content

Rocky Solver SDK 2024 R2

IRockyCurveCollectionData Struct Reference

Last update: 08.07.2024

#include <rocky_output_collections_api.hpp>

Public Member Functions

void create_particles_dataset (const std::string &name, const std::string &unit)
 
void create_geometry_dataset (int geometry_id, const std::string &name, const std::string &unit)
 
void create_dataset (const std::string &owner_name, const std::string &name, const std::string &unit)
 
void create_particles_curve (const std::string &domain_dataset, const std::string &image_dataset)
 
void create_geometry_curve (int geometry_id, const std::string &domain_dataset, const std::string &image_dataset)
 
void add_curve (const std::string &owner_name, const std::string &domain_dataset, const std::string &image_dataset)
 
void setup_particles_dataset_dimension (const std::string &name, double dimension)
 
void setup_geometry_dataset_dimension (int geometry_id, const std::string &name, double dimension)
 
void setup_dataset_dimension (const std::string &owner_name, const std::string &name, double dimension)
 
void update_particles_dataset (const std::string &name, const double *dataset, size_t size)
 
void update_geometry_dataset (int geometry_id, const std::string &name, const double *dataset, size_t size)
 
void update_dataset (const std::string &owner_name, const std::string &name, const double *dataset, size_t size)
 
void create_particles_time_curve (const std::string &name, const std::string &unit)
 
void create_geometry_time_curve (int geometry_id, const std::string &name, const std::string &unit)
 
void create_time_curve (const std::string &owner_name, const std::string &name, const std::string &unit)
 
void setup_particles_time_curve_dimension (const std::string &name, double dimension)
 
void setup_geometry_time_curve_dimension (int geometry_id, const std::string &name, double dimension)
 
void setup_time_curve_dimension (const std::string &owner_name, const std::string &name, double dimension)
 
void update_particles_time_curve (const std::string &name, double value)
 
void update_geometry_time_curve (int geometry_id, const std::string &name, double value)
 
void update_time_curve (const std::string &owner_name, const std::string &name, double value)
 

Detailed Description

IRockyCurveCollectionData is a data structure intended to hold data that will be used by Rocky to create a custom collection of cross plot curves and/or time curves for particles and geometries.

A curve is composed of a pair of domain and image datasets. A dataset is a set of values that may change over time in values and size. When creating a dataset, one must provide its name and unit. During the simulation, such datasets must be updated with custom data, which will be written on disk by Rocky at output times. The most adequate hook to perform that data update is ROCKY_PLUGIN_PRE_OUTPUT, because it is executed immediately before the data output. However, depending on the particular needs of the module, that operation can be done in other hooks as well. After an output operation, all dataset values are automatically erased, and must be updated again for the next output. At any given output, a domain and an image datasets for a cross-plot curve must have the same size, otherwise an error will be thrown.

Member Function Documentation

◆ add_curve()

void IRockyCurveCollectionData::add_curve ( const std::string &  owner_name,
const std::string &  domain_dataset,
const std::string &  image_dataset 
)
This method creates a curve by specifying the names of domain and image datasets. Such
curve is related to a given named entity. Shown within the Rocky UI as a curve.
Parameters
owner_nameThe entity unique identifier (string)
domain_datasetThe name of the domain dataset.
image_datasetThe unit of the image dataset.

◆ create_dataset()

void IRockyCurveCollectionData::create_dataset ( const std::string &  owner_name,
const std::string &  name,
const std::string &  unit 
)
This method creates a dataset by specifying its name and the unit of the
physical magnitude associated. Such dataset is related to a given named owner entity. Initially empty, the dataset must be updated with values during the simulation by using IRockyCurveCollectionData::update_dataset.
Parameters
owner_nameThe entity unique identifier (string)
nameThe name of the dataset.
unitThe unit of the related magnitude, which will be associated to an axis of the cross plot where the dataset will be displayed.

◆ create_geometry_curve()

void IRockyCurveCollectionData::create_geometry_curve ( int  geometry_id,
const std::string &  domain_dataset,
const std::string &  image_dataset 
)
This method creates a curve by specifying the names of domain and image datasets. Such
curve is related to a geometry. Shown within the Rocky UI as a curve.
Parameters
geometry_idThe geometry unique identifier (index)
domain_datasetThe name of the domain dataset.
image_datasetThe unit of the image dataset.

◆ create_geometry_dataset()

void IRockyCurveCollectionData::create_geometry_dataset ( int  geometry_id,
const std::string &  name,
const std::string &  unit 
)
This method creates a dataset related to a geometry by specifying
its name and the unit of the associated physical magnitude. Initially empty, the dataset must be updated with values by using IRockyCurveCollectionData::update_geometry_dataset.
Parameters
geometry_idThe geometry unique identifier (index)
nameThe name of the dataset.
unitThe unit of the related magnitude, which will be associated to an axis of the cross plot where the dataset will be displayed.

◆ create_geometry_time_curve()

void IRockyCurveCollectionData::create_geometry_time_curve ( int  geometry_id,
const std::string &  name,
const std::string &  unit 
)
This method creates a time curve associated to a specific geometry, by specifying its
name and the unit of the physical magnitude associated. Initially empty, the time curve must be filled with data during a simulation by using IRockyCurveCollectionData::update_geometry_time_curve.
Parameters
geometry_idThe geometry unique identifier (index)
nameThe name of the time curve. Shown within the Rocky UI as the curve label.
unitThe unit of the magnitude displayed in the vertical axis of the time curve.

◆ create_particles_curve()

void IRockyCurveCollectionData::create_particles_curve ( const std::string &  domain_dataset,
const std::string &  image_dataset 
)
This method creates a curve by specifying the names of domain and image datasets. Such
curve is related to particles. Shown within the Rocky UI as a curve.
Parameters
domain_datasetThe name of the domain dataset.
image_datasetThe unit of the image dataset.

◆ create_particles_dataset()

void IRockyCurveCollectionData::create_particles_dataset ( const std::string &  name,
const std::string &  unit 
)
This method creates a dataset related to particles by specifying its name
and the unit of the physical magnitude associated. Initially empty, the dataset must be updated with values by using IRockyCurveCollectionData::update_particles_dataset during the simulation.
Parameters
nameThe name of the dataset.
unitThe unit of the related magnitude, which will be associated to an axis of the cross plot where the dataset will be displayed.

◆ create_particles_time_curve()

void IRockyCurveCollectionData::create_particles_time_curve ( const std::string &  name,
const std::string &  unit 
)
This method creates a time curve associated to particles by specifying its name and the
unit of the physical magnitude associated. Initially empty, the curve must be filled with data by using IRockyCurveCollectionData::update_particles_time_curve during the simulation.
Parameters
nameThe name of the time curve. Shown within the Rocky UI as the curve label.
unitThe unit of the magnitude displayed in the vertical axis of the time curve.

◆ create_time_curve()

void IRockyCurveCollectionData::create_time_curve ( const std::string &  owner_name,
const std::string &  name,
const std::string &  unit 
)
This method creates a time curve associated to a given entity by specifying its
name and the unit of the physical magnitude associated. Initially empty, the time curve must be filled with data by using IRockyCurveCollectionData::update_time_curve during the simulation.
Parameters
owner_nameThe entity unique identifier (string)
nameThe name of the time curve. Shown within the Rocky UI as the curve label.
unitThe unit of the magnitude displayed in the vertical axis of the time curve.

◆ setup_dataset_dimension()

void IRockyCurveCollectionData::setup_dataset_dimension ( const std::string &  owner_name,
const std::string &  name,
double  dimension 
)
The purpose of this method is to associate a dimensional factor to a dataset.
This factor will be used to nondimensionalize their values for calculations. Dimensional factors for the fundamental magnitudes are provided by functions of a IRockyModel object.
Parameters
owner_nameThe entity unique identifier (string)
nameThe name of the dataset.
dimensionThe appropriate dimensional factor for the dataset.

◆ setup_geometry_dataset_dimension()

void IRockyCurveCollectionData::setup_geometry_dataset_dimension ( int  geometry_id,
const std::string &  name,
double  dimension 
)
The purpose of this method is to associate a dimensional factor to a dataset.
This factor will be used to nondimensionalize their values for the calculations. Dimensional factors for the fundamental magnitudes are provided by functions of a IRockyModel object.
Parameters
geometry_idThe geometry unique identifier (index)
nameThe name of the dataset.
dimensionThe appropriate dimensional factor for the dataset.

◆ setup_geometry_time_curve_dimension()

void IRockyCurveCollectionData::setup_geometry_time_curve_dimension ( int  geometry_id,
const std::string &  name,
double  dimension 
)
The purpose of this method is to associate a dimensional factor to a time curve.
This factor will be used to nondimensionalize their values. Dimensional factors for the fundamental magnitudes are provided by functions of a IRockyModel object.
Parameters
geometry_idThe geometry unique identifier (index)
nameThe name of the time curve.
dimensionThe appropriate dimensional factor for the time curve.

◆ setup_particles_dataset_dimension()

void IRockyCurveCollectionData::setup_particles_dataset_dimension ( const std::string &  name,
double  dimension 
)
The purpose of this method is to associate a dimensional factor to a dataset.
This factor will be used to nondimensionalize their values for the calculations. Dimensional factors for the fundamental magnitudes are provided by functions of a IRockyModel object.
Parameters
nameThe name of the dataset.
dimensionThe appropriate dimensional factor for the dataset.

◆ setup_particles_time_curve_dimension()

void IRockyCurveCollectionData::setup_particles_time_curve_dimension ( const std::string &  name,
double  dimension 
)
The purpose of this method is to associate a dimensional factor to a time curve.
This factor will be used to nondimensionalize their values. Dimensional factors for the fundamental magnitudes are provided by functions of a IRockyModel object.
Parameters
nameThe name of the time curve.
dimensionThe appropriate dimensional factor for the time curve.

◆ setup_time_curve_dimension()

void IRockyCurveCollectionData::setup_time_curve_dimension ( const std::string &  owner_name,
const std::string &  name,
double  dimension 
)
The purpose of this method is to associate a dimensional factor to a time curve.
This factor will be used to nondimensionalize their values. Dimensional factors for the fundamental magnitudes are provided by functions of a IRockyModel object.
Parameters
owner_nameThe entity unique identifier (string)
nameThe name of the time curve. Shown within the Rocky UI as the curve label.
dimensionThe appropriate dimensional factor for the time curve.

◆ update_dataset()

void IRockyCurveCollectionData::update_dataset ( const std::string &  owner_name,
const std::string &  name,
const double *  dataset,
size_t  size 
)
This method updates a dataset by inserting new dataset values.
Intended to be used only at output times. The dataset to be added should correspond to the output time at which this method is called. It only works with datasets previously created using IRockyCurveCollectionData::create_dataset, otherwise it throws an error.
Parameters
owner_nameThe entity unique identifier (string)
nameThe name of the dataset.
datasetA data pointer to the new dataset data to be copied into dataset.
sizeThe number of elements of the given dataset

◆ update_geometry_dataset()

void IRockyCurveCollectionData::update_geometry_dataset ( int  geometry_id,
const std::string &  name,
const double *  dataset,
size_t  size 
)
This method updates a dataset by inserting new dataset values.
Intended to be used only at output times. The dataset to be added should correspond to the output time at which this method is called. It only works with datasets previously created using IRockyCurveCollectionData::create_geometry_dataset, otherwise it throws an error.
Parameters
geometry_idThe geometry unique identifier (index)
nameThe name of the dataset.
datasetA data pointer to the new dataset data to be copied into dataset.
sizeThe number of elements of the given dataset

◆ update_geometry_time_curve()

void IRockyCurveCollectionData::update_geometry_time_curve ( int  geometry_id,
const std::string &  name,
double  value 
)
This method updates a time curve by inserting a new value.
Intended to be used only at output times. The value to be added should correspond to the output time at which this method is called. It only works with time curves previously created using IRockyCurveCollectionData::create_geometry_time_curve, otherwise it throws an error.
Parameters
geometry_idThe geometry unique identifier (index)
nameThe name of the time curve.
valueThe value to be appended into the curve.

◆ update_particles_dataset()

void IRockyCurveCollectionData::update_particles_dataset ( const std::string &  name,
const double *  dataset,
size_t  size 
)
This method updates a dataset by inserting new values.
Intended to be used only at output times. The dataset to be added should correspond to the output time at which this method is called. It only works with datasets previously created using IRockyCurveCollectionData::create_particles_dataset, otherwise it throws an error.
Parameters
nameThe name of the dataset.
datasetA data pointer to the new dataset data to be copied into dataset.
sizeThe number of elements of the given dataset

◆ update_particles_time_curve()

void IRockyCurveCollectionData::update_particles_time_curve ( const std::string &  name,
double  value 
)
This method updates a time curve by inserting a new value.
Intended to be used only at output times. The value to be added should correspond to the output time at which this method is called. It only works with time curves previously created using IRockyCurveCollectionData::create_particles_time_curve, otherwise it throws an error.
Parameters
nameThe name of the time curve.
valueThe value to be appended into the curve.

◆ update_time_curve()

void IRockyCurveCollectionData::update_time_curve ( const std::string &  owner_name,
const std::string &  name,
double  value 
)
This method updates a time curve by inserting a new value.
Intended to be used only at output times. The value to be added should correspond to the output time at which this method is called. It only works with time curves previously created using IRockyCurveCollectionData::create_time_curve, otherwise it throws an error.
Parameters
owner_nameThe entity unique identifier (string)
nameThe name of the time curve.
valueThe value to be appended into the curve.