swh:1:snp:6088ab52ef49920e01e3f334cdf4d5d6c8a822b9
Raw File
Tip revision: cbb8f2c206929f948d69737ffa08bb2fb45c2cac authored by Dmitri Naumov on 09 July 2021, 10:02:50 UTC
[MatL] Use std::max replacing if condition.
Tip revision: cbb8f2c
EquilibriumReactants.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 "EquilibriumReactants.h"

namespace ChemistryLib
{
namespace PhreeqcKernelData
{
PhaseComponent::PhaseComponent(std::string&& name_,
                               double const initial_amount,
                               double const saturation_index)
{
    name = std::move(name_);
    moles = initial_amount;
    si = saturation_index;
    si_org = saturation_index;
}

EquilibriumReactants::EquilibriumReactants(
    std::vector<PhaseComponent> const& phase_components)
{
    for (auto& phase_component : phase_components)
    {
        auto& name = phase_component.getName();
        pp_assemblage_comps[name] = *phase_component.castToBaseClass();
    }
}
}  // namespace PhreeqcKernelData
}  // namespace ChemistryLib
back to top