OGS
KineticReactant.cpp
Go to the documentation of this file.
1
11#include "KineticReactant.h"
12
13#include <algorithm>
14
15namespace ChemistryLib
16{
17namespace PhreeqcKernelData
18{
19KineticReactant::KineticReactant(std::string name, double const initial_amount)
20{
21 rate_name = std::move(name);
22 namecoef.add(rate_name.c_str(), 1.0);
23 m = initial_amount;
24 m0 = initial_amount;
25}
26
27Kinetics::Kinetics(std::vector<KineticReactant> const& kinetic_reactants)
28{
29 std::transform(kinetic_reactants.begin(),
30 kinetic_reactants.end(),
31 std::back_inserter(kinetics_comps),
32 [](KineticReactant const& kinetic_reactant)
33 { return *kinetic_reactant.castToBaseClass(); });
34}
35} // namespace PhreeqcKernelData
36} // namespace ChemistryLib
KineticReactant(std::string name, double const initial_amount)
Kinetics(std::vector< KineticReactant > const &kinetic_reactants)