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
VariableType.cpp
Go to the documentation of this file.
1
11
#include "
VariableType.h
"
12
13
#include <boost/algorithm/string/predicate.hpp>
14
15
#include "
BaseLib/Error.h
"
16
17
namespace
MaterialPropertyLib
18
{
19
Variable
convertStringToVariable
(std::string
const
&
string
)
20
{
21
for
(
int
i = 0; i < static_cast<int>(
Variable::number_of_variables
); ++i)
22
{
23
if
(boost::iequals(
string
,
variable_enum_to_string
[i]))
24
{
25
return
static_cast<
Variable
>
(i);
26
}
27
}
28
29
OGS_FATAL
(
30
"The variable name '{:s}' does not correspond to any known variable"
,
31
string
);
32
}
33
}
// namespace MaterialPropertyLib
Error.h
OGS_FATAL
#define OGS_FATAL(...)
Definition:
Error.h:26
VariableType.h
MaterialPropertyLib
Definition:
ChemicalSolverInterface.h:17
MaterialPropertyLib::Variable
Variable
Definition:
VariableType.h:45
MaterialPropertyLib::Variable::number_of_variables
@ number_of_variables
MaterialPropertyLib::variable_enum_to_string
static const std::array< std::string, static_cast< int >Variable::number_of_variables)> variable_enum_to_string
Definition:
VariableType.h:74
MaterialPropertyLib::convertStringToVariable
Variable convertStringToVariable(std::string const &string)
Definition:
VariableType.cpp:19
MaterialLib
MPL
VariableType.cpp
Generated by
1.9.1