Loading [MathJax]/extensions/tex2jax.js
OGS
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
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
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
Typedefs
b
c
e
f
h
j
k
l
m
n
p
q
r
s
t
v
w
x
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
h
i
k
l
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
x
Variables
Typedefs
Enumerations
Macros
a
b
c
e
g
h
i
l
m
n
o
p
r
s
t
v
w
x
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
}
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:103
BaseLib::ConfigTree::getConfigParameterOptional
std::optional< T > getConfigParameterOptional(std::string const ¶m) const
Definition:
ConfigTree-impl.h:62
ChemistryLib
Definition:
ChemicalSolverInterface.h:27
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.9.1