21 namespace PhreeqcIOData
24 std::optional<BaseLib::ConfigTree>
const& config,
MeshLib::Mesh& mesh)
31 std::vector<KineticReactant> kinetic_reactants;
33 auto const& reactant_config :
35 config->getConfigSubtreeList(
"kinetic_reactant"))
38 auto name = reactant_config.getConfigParameter<std::string>(
"name");
40 auto chemical_formula =
42 reactant_config.getConfigParameter<std::string>(
"chemical_formula",
47 reactant_config.getConfigParameter<std::vector<double>>(
50 bool const fix_amount =
52 reactant_config.getConfigParameter<
bool>(
"fix_amount",
false);
54 auto molality = MeshLib::getOrCreateMeshProperty<double>(
57 auto molality_prev = MeshLib::getOrCreateMeshProperty<double>(
63 auto volume_fraction_prev = MeshLib::getOrCreateMeshProperty<double>(
65 "phi_" +
name +
"_prev",
69 auto mesh_prop_molality = MeshLib::getOrCreateMeshProperty<double>(
73 if (chemical_formula.empty() && fix_amount)
76 "fix_amount can only be used if a chemical_formula has been "
80 kinetic_reactants.emplace_back(std::move(
name),
81 std::move(chemical_formula),
87 std::move(parameters),
91 return kinetic_reactants;
Definition of the Mesh class.
std::size_t getNumberOfElements() const
Get the number of elements.
std::vector< KineticReactant > createKineticReactants(std::optional< BaseLib::ConfigTree > const &config, MeshLib::Mesh &mesh)