Loading [MathJax]/extensions/tex2jax.js
OGS
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
z
Enumerations
b
c
d
e
f
g
i
l
m
n
o
p
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
l
m
n
p
r
s
t
v
y
Classes
Class List
Class Index
Class Hierarchy
Files
File List
File Members
All
a
b
c
d
e
f
g
i
k
m
n
o
p
r
s
t
v
w
x
Functions
a
c
d
e
f
g
i
m
o
p
r
s
t
v
w
Variables
Typedefs
Enumerations
Macros
b
c
g
m
n
o
p
r
s
t
▼
OGS
►
OpenGeoSys 6.5.4-396-ge0d32a01be0 source code documentation
►
OGS CTests—Project Files
►
OGS Input File Parameters—Quality Assurance
►
OGS Input File Parameters
BulkMappingDocuPage
Todo List
OGS Input File Parameters—List of incomplete documentation pages
Bibliography
►
Namespaces
►
Classes
▼
Files
▼
File List
►
Applications
►
BaseLib
►
build
▼
ChemistryLib
▼
Common
►
ChargeBalance.h
►
CreateChargeBalance.cpp
►
CreateChargeBalance.h
►
CreateReactionRate.cpp
►
CreateReactionRate.h
►
PhreeqcIOData
►
PhreeqcKernelData
►
SelfContainedSolverData
►
ChemicalSolverInterface.h
►
ChemicalSolverType.h
►
CreateChemicalSolverInterface.cpp
►
CreateChemicalSolverInterface.h
►
PhreeqcIO.cpp
►
PhreeqcIO.h
►
PhreeqcKernel.cpp
►
PhreeqcKernel.h
Documentation
►
GeoLib
►
InfoLib
►
MaterialLib
►
MathLib
►
MeshGeoToolsLib
►
MeshLib
►
MeshToolsLib
►
NumLib
►
ParameterLib
►
ProcessLib
►
File Members
CreateChargeBalance.cpp
Go to the documentation of this file.
1
11
#include "
CreateChargeBalance.h
"
12
13
#include "
BaseLib/ConfigTree.h
"
14
#include "
BaseLib/Error.h
"
15
#include "
ChargeBalance.h
"
16
17
namespace
ChemistryLib
18
{
19
ChargeBalance
createChargeBalance
(
BaseLib::ConfigTree
const
& config)
20
{
21
auto
const
charge_balance =
23
config.
getConfigParameterOptional
<std::string>(
"charge_balance"
);
24
25
if
(!charge_balance)
26
{
27
return
ChargeBalance::Unspecified
;
28
}
29
if
(*charge_balance ==
"pH"
)
30
{
31
return
ChargeBalance::pH
;
32
}
33
if
(*charge_balance ==
"pe"
)
34
{
35
return
ChargeBalance::pe
;
36
}
37
38
OGS_FATAL
(
39
"Error in specifying the way in which charge balance is achieved. "
40
"Adjusting pH value or pe value are supported at this moment."
);
41
}
19
ChargeBalance
createChargeBalance
(
BaseLib::ConfigTree
const
& config) {
…
}
42
}
// namespace ChemistryLib
ChargeBalance.h
ConfigTree.h
CreateChargeBalance.h
Error.h
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:26
BaseLib::ConfigTree
Definition
ConfigTree.h:107
BaseLib::ConfigTree::getConfigParameterOptional
std::optional< T > getConfigParameterOptional(std::string const ¶m) const
Definition
ConfigTree-impl.h:64
ChemistryLib
Definition
ChemicalSolverInterface.h:31
ChemistryLib::ChargeBalance
ChargeBalance
Definition
ChargeBalance.h:16
ChemistryLib::ChargeBalance::pH
@ pH
ChemistryLib::ChargeBalance::Unspecified
@ Unspecified
ChemistryLib::ChargeBalance::pe
@ pe
ChemistryLib::createChargeBalance
ChargeBalance createChargeBalance(BaseLib::ConfigTree const &config)
Definition
CreateChargeBalance.cpp:19
ChemistryLib
Common
CreateChargeBalance.cpp
Generated by
1.12.0