BioCMAMC-ST
|
Provides structures and functions to initialize scalar data for simulations, supporting multiple data sources. More...
Classes | |
struct | CustomScript |
Represents scalar data initialized through a custom script. More... | |
struct | File |
Represents scalar data sourced from an external file. More... | |
struct | FullCase |
Represents scalar data everywhere. More... | |
struct | Local |
Represents localized concentration data for specific compartments. More... | |
struct | Uniform |
Represents uniform concentration data for all compartments. More... | |
struct | Visitor |
Functor struct to visit each type in ScalarVariant and initialize scalar data. More... | |
Typedefs | |
using | ScalarVariant = std::variant<Uniform, Local, File, CustomScript,FullCase> |
Path to the custom script used for initializing scalar data. | |
Functions | |
Simulation::ScalarInitializer | scalar_factory (bool f_init_gas_flow, std::span< double > gas_volume, std::span< double > liquid_volume, ScalarVariant arg_liq) |
Factory function to initialize scalar data based on the specified input source. | |
bool | sanitize (const Simulation::ScalarInitializer &res) |
Provides structures and functions to initialize scalar data for simulations, supporting multiple data sources.
The ScalarFactory namespace contains several structures representing different methods of initializing scalar values (liquid and gas concentrations) for simulations.
using Core::ScalarFactory::ScalarVariant = std::variant<Uniform, Local, File, CustomScript,FullCase> |
Path to the custom script used for initializing scalar data.
A variant type representing different scalar data sources.
bool Core::ScalarFactory::sanitize | ( | const Simulation::ScalarInitializer & | res | ) |
Simulation::ScalarInitializer Core::ScalarFactory::scalar_factory | ( | bool | f_init_gas_flow, |
std::span< double > | gas_volume, | ||
std::span< double > | liquid_volume, | ||
ScalarVariant | arg_liq ) |
Factory function to initialize scalar data based on the specified input source.
The scalar_factory
function uses a provided variant type to initialize scalar data for both liquid and optionally gas phases. This function accommodates a variety of data sources for flexibility in setup.
f_init_gas_flow | Boolean flag indicating whether gas flow initialization is required. |
gas_volume | Span of gas volume data for each compartment. |
liquid_volume | Span of liquid volume data for each compartment. |
arg_liq | Scalar variant specifying the source of scalar data for liquid concentration. |
ScalarInitializer
configured with the provided data.