Revision 863236855c7a64a7f3ce45cf822305ddc50f1f73 authored by Wenqing Wang on 19 May 2021, 13:46:02 UTC, committed by Dmitry Yu. Naumov on 07 October 2021, 21:11:23 UTC
1 parent 20886e2
KineticReactant.cpp
/**
* \file
* \copyright
* Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#include "KineticReactant.h"
#include <algorithm>
namespace ChemistryLib
{
namespace PhreeqcKernelData
{
KineticReactant::KineticReactant(std::string const& name,
double const initial_amount)
{
rate_name = name.c_str();
namecoef.add(name.c_str(), 1.0);
m = initial_amount;
m0 = initial_amount;
}
Kinetics::Kinetics(std::vector<KineticReactant> const& kinetic_reactants)
{
std::transform(kinetic_reactants.begin(),
kinetic_reactants.end(),
std::back_inserter(kinetics_comps),
[](KineticReactant const& kinetic_reactant) {
return *kinetic_reactant.castToBaseClass();
});
}
} // namespace PhreeqcKernelData
} // namespace ChemistryLib
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...