26 std::optional<BaseLib::ConfigTree>
const& config,
MeshLib::Mesh const& mesh)
33 std::vector<KineticReactant> kinetic_reactants;
35 auto const& reactant_config :
37 config->getConfigSubtreeList(
"kinetic_reactant"))
40 auto name = reactant_config.getConfigParameter<std::string>(
"name");
42 double const initial_amount =
44 reactant_config.getConfigParameter<
double>(
"initial_amount");
46 auto*
const amount = MeshLib::getOrCreateMeshProperty<double>(
51 std::fill(std::begin(*amount), std::end(*amount), initial_amount);
53 kinetic_reactants.emplace_back(std::move(name), initial_amount);
56 return std::make_unique<Kinetics>(kinetic_reactants);