OGS
CreateAqueousSolution.cpp
Go to the documentation of this file.
1
11
#include "
CreateAqueousSolution.h
"
12
13
#include "
AqueousSolution.h
"
14
#include "
BaseLib/ConfigTree.h
"
15
#include "
ChemistryLib/Common/CreateChargeBalance.h
"
16
#include "
CreateSolutionComponent.h
"
17
#include "
MeshLib/Mesh.h
"
18
#include "
MeshLib/Utils/getOrCreateMeshProperty.h
"
19
20
namespace
ChemistryLib
21
{
22
namespace
PhreeqcIOData
23
{
24
std::unique_ptr<AqueousSolution>
createAqueousSolution
(
25
BaseLib::ConfigTree
const
& config,
MeshLib::Mesh
& mesh)
26
{
28
auto
const
fixing_pe = config.
getConfigAttribute
<
bool
>(
"fixing_pe"
,
false
);
29
31
auto
const
temperature = config.
getConfigParameter
<
double
>(
"temperature"
);
32
34
auto
const
pressure = config.
getConfigParameter
<
double
>(
"pressure"
);
35
37
auto
const
pe0 = config.
getConfigParameter
<
double
>(
"pe"
);
38
39
auto
pe
=
MeshLib::getOrCreateMeshProperty<double>
(
40
mesh,
"pe"
,
MeshLib::MeshItemType::IntegrationPoint
, 1);
41
42
auto
components =
createSolutionComponents
(config);
43
44
auto
charge_balance =
createChargeBalance
(config);
45
46
return
std::make_unique<AqueousSolution>(fixing_pe, temperature, pressure,
47
pe
, pe0, std::move(components),
48
charge_balance);
49
}
50
}
// namespace PhreeqcIOData
51
}
// namespace ChemistryLib
ConfigTree.h
CreateChargeBalance.h
CreateSolutionComponent.h
Mesh.h
Definition of the Mesh class.
AqueousSolution.h
CreateAqueousSolution.h
BaseLib::ConfigTree
Definition
ConfigTree.h:107
BaseLib::ConfigTree::getConfigParameter
T getConfigParameter(std::string const ¶m) const
Definition
ConfigTree-impl.h:41
BaseLib::ConfigTree::getConfigAttribute
T getConfigAttribute(std::string const &attr) const
Definition
ConfigTree-impl.h:167
MeshLib::Mesh
Definition
Mesh.h:43
getOrCreateMeshProperty.h
ChemistryLib::PhreeqcIOData::createAqueousSolution
std::unique_ptr< AqueousSolution > createAqueousSolution(BaseLib::ConfigTree const &config, MeshLib::Mesh &mesh)
Definition
CreateAqueousSolution.cpp:24
ChemistryLib::PhreeqcIOData::ItemType::pe
@ pe
ChemistryLib::PhreeqcIOData::createSolutionComponents
std::vector< Component > createSolutionComponents(BaseLib::ConfigTree const &config)
Definition
CreateSolutionComponent.cpp:20
ChemistryLib
Definition
ChemicalSolverInterface.h:31
ChemistryLib::createChargeBalance
ChargeBalance createChargeBalance(BaseLib::ConfigTree const &config)
Definition
CreateChargeBalance.cpp:19
MeshLib::getOrCreateMeshProperty
PropertyVector< T > * getOrCreateMeshProperty(Mesh &mesh, std::string const &property_name, MeshItemType const item_type, int const number_of_components)
Definition
getOrCreateMeshProperty.h:25
MeshLib::MeshItemType::IntegrationPoint
@ IntegrationPoint
ChemistryLib
PhreeqcIOData
CreateAqueousSolution.cpp
Generated by
1.11.0