1#ifndef __CORE_SCALAR_FACTORY_HPP__
2#define __CORE_SCALAR_FACTORY_HPP__
6#include <simulation/scalar_initializer.hpp>
64 std::optional<std::vector<size_t>>
gas_indices = std::nullopt;
129 using ScalarVariant = std::variant<Uniform, Local, File, CustomScript,FullCase>;
163 std::span<double> gas_volume,
164 std::span<double> liquid_volume,
Provides structures and functions to initialize scalar data for simulations, supporting multiple data...
Definition scalar_factory.hpp:20
std::variant< Uniform, Local, File, CustomScript, FullCase > ScalarVariant
Path to the custom script used for initializing scalar data.
Definition scalar_factory.hpp:129
bool sanitize(const Simulation::ScalarInitializer &res)
Definition scalar_factory.cpp:249
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:24
Represents scalar data initialized through a custom script.
Definition scalar_factory.hpp:89
std::string_view path
Path to the custom script used for initializing scalar data.
Definition scalar_factory.hpp:93
Represents scalar data sourced from an external file.
Definition scalar_factory.hpp:72
std::string_view path
Path to the file containing scalar data for compartments.
Definition scalar_factory.hpp:81
size_t n_compartment
Number of compartments represented in the file.
Definition scalar_factory.hpp:76
Represents scalar data everywhere.
Definition scalar_factory.hpp:101
std::vector< double > raw_liquid
Definition scalar_factory.hpp:106
std::optional< std::vector< double > > raw_gas
Definition scalar_factory.hpp:107
std::size_t n_species
Liquid concentration (size n*m)
Definition scalar_factory.hpp:105
Represents localized concentration data for specific compartments.
Definition scalar_factory.hpp:43
std::optional< std::vector< size_t > > gas_indices
Optional vector of indices corresponding to compartments with specified gas concentrations.
Definition scalar_factory.hpp:64
std::optional< std::vector< double > > gas_concentration
Optional vector of gas phase concentrations, applied to specific compartments if provided.
Definition scalar_factory.hpp:58
std::vector< size_t > liquid_indices
Vector of indices corresponding to compartments with specified liquid concentrations.
Definition scalar_factory.hpp:52
std::vector< double > liquid_concentrations
Vector of liquid phase concentrations for specified compartments.
Definition scalar_factory.hpp:47
Functor struct to visit each type in ScalarVariant and initialize scalar data.
Definition scalar_factory.hpp:136
Simulation::ScalarInitializer operator()(Uniform args)
Definition scalar_factory.cpp:53
Definition scalar_initializer.hpp:30