Revision 2813b43c9713a6c544fb5f5651db54d4e153bb5b authored by Dmitry Yu. Naumov on 24 March 2021, 10:42:54 UTC, committed by Dmitry Yu. Naumov on 24 March 2021, 10:42:54 UTC
[MPL] A vapour diffusion property of VapourDiffusionPMQ

See merge request ogs/ogs!3527
2 parent s 6c9b2bd + 6718a42
Raw File
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 <algorithm>

#include "KineticReactant.h"

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
back to top