1#ifndef __CORE_SCALAR_FACTORY_HPP__
2#define __CORE_SCALAR_FACTORY_HPP__
6#include <simulation/scalar_initializer.hpp>
67 std::optional<std::vector<size_t>>
gas_indices = std::nullopt;
133 std::variant<Uniform, Local, File, CustomScript, FullCase>;
172 std::span<double> gas_volume,
173 std::span<double> liquid_volume,
Provides structures and functions to initialize scalar data for simulations, supporting multiple data...
Definition scalar_factory.hpp:21
bool sanitize(const Simulation::ScalarInitializer &res)
Definition scalar_factory.cpp:269
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.
Definition scalar_factory.cpp:32
std::variant< Uniform, Local, File, CustomScript, FullCase > ScalarVariant
Path to the custom script used for initializing scalar data.
Definition scalar_factory.hpp:132
Represents scalar data initialized through a custom script.
Definition scalar_factory.hpp:92
std::string_view path
Path to the custom script used for initializing scalar data.
Definition scalar_factory.hpp:96
Represents scalar data sourced from an external file.
Definition scalar_factory.hpp:75
std::string_view path
Path to the file containing scalar data for compartments.
Definition scalar_factory.hpp:84
size_t n_compartment
Number of compartments represented in the file.
Definition scalar_factory.hpp:79
Represents scalar data everywhere.
Definition scalar_factory.hpp:104
std::vector< double > raw_liquid
Definition scalar_factory.hpp:109
std::optional< std::vector< double > > raw_gas
Definition scalar_factory.hpp:110
std::size_t n_species
Liquid concentration (size n*m)
Definition scalar_factory.hpp:108
Represents localized concentration data for specific compartments.
Definition scalar_factory.hpp:45
std::optional< std::vector< size_t > > gas_indices
Optional vector of indices corresponding to compartments with specified gas concentrations.
Definition scalar_factory.hpp:67
std::optional< std::vector< double > > gas_concentration
Optional vector of gas phase concentrations, applied to specific compartments if provided.
Definition scalar_factory.hpp:61
std::vector< size_t > liquid_indices
Vector of indices corresponding to compartments with specified liquid concentrations.
Definition scalar_factory.hpp:55
std::vector< double > liquid_concentrations
Vector of liquid phase concentrations for specified compartments.
Definition scalar_factory.hpp:49
Functor struct to visit each type in ScalarVariant and initialize scalar data.
Definition scalar_factory.hpp:141
Simulation::ScalarInitializer operator()(Uniform args) const
Definition scalar_factory.cpp:62
bool init_gas
Definition scalar_factory.hpp:151
Definition scalar_initializer.hpp:28