OGS
KineticReactant.cpp
Go to the documentation of this file.
1
11
#include "
KineticReactant.h
"
12
13
#include <algorithm>
14
15
namespace
ChemistryLib
16
{
17
namespace
PhreeqcKernelData
18
{
19
KineticReactant::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
27
Kinetics::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.h
ChemistryLib::PhreeqcKernelData::KineticReactant
Definition
KineticReactant.h:23
ChemistryLib::PhreeqcKernelData::KineticReactant::KineticReactant
KineticReactant(std::string name, double const initial_amount)
Definition
KineticReactant.cpp:19
ChemistryLib::PhreeqcKernelData::Kinetics::Kinetics
Kinetics(std::vector< KineticReactant > const &kinetic_reactants)
Definition
KineticReactant.cpp:27
ChemistryLib
Definition
ChemicalSolverInterface.h:31
ChemistryLib
PhreeqcKernelData
KineticReactant.cpp
Generated by
1.11.0