BioCMAMC-ST
Core::ScalarFactory Namespace Reference

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)
 

Detailed Description

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.

Typedef Documentation

◆ ScalarVariant

Path to the custom script used for initializing scalar data.

A variant type representing different scalar data sources.

Function Documentation

◆ sanitize()

bool Core::ScalarFactory::sanitize ( const Simulation::ScalarInitializer & res)
Here is the caller graph for this function:

◆ scalar_factory()

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.

Parameters
f_init_gas_flowBoolean flag indicating whether gas flow initialization is required.
gas_volumeSpan of gas volume data for each compartment.
liquid_volumeSpan of liquid volume data for each compartment.
arg_liqScalar variant specifying the source of scalar data for liquid concentration.
Returns
A ScalarInitializer configured with the provided data.
Here is the call graph for this function:
Here is the caller graph for this function: