PetIBM 0.5.4
Toolbox and applications of the immersed-boundary method for distributed-memory architectures
type.cpp
Go to the documentation of this file.
1
8// here goes our headers
9#include <petibm/type.h>
10
11namespace petibm
12{
13namespace type
14{
15// default values of type::str2dir
16std::map<std::string, Dir> str2dir{{"x", x}, {"y", y}, {"z", z}};
17// default values of type::dir2str
18std::map<Dir, std::string> dir2str{{x, "x"}, {y, "y"}, {z, "z"}};
19
20// default values of type::str2fd
21std::map<std::string, Field> str2fd{
22 {"u", u}, {"v", v}, {"w", w}, {"p", p}, {"vertex", vertex}};
23// default values of type::fd2str
24std::map<Field, std::string> fd2str{
25 {u, "u"}, {v, "v"}, {w, "w"}, {p, "p"}, {vertex, "vertex"}};
26
27// default values of type::str2bt
28std::map<std::string, BCType> str2bt{{"NOBC", NOBC},
29 {"DIRICHLET", DIRICHLET},
30 {"NEUMANN", NEUMANN},
31 {"CONVECTIVE", CONVECTIVE},
32 {"PERIODIC", PERIODIC}};
33// default values of type::bt2str
34std::map<BCType, std::string> bt2str{{NOBC, "NOBC"},
35 {DIRICHLET, "DIRICHLET"},
36 {NEUMANN, "NEUMANN"},
37 {CONVECTIVE, "CONVECTIVE"},
38 {PERIODIC, "PERIODIC"}};
39
40// default values of type::str2bl
41std::map<std::string, BCLoc> str2bl{
42 {"left", XMINUS}, {"right", XPLUS}, {"bottom", YMINUS}, {"top", YPLUS},
43 {"back", ZMINUS}, {"front", ZPLUS}, {"xMinus", XMINUS}, {"xPlus", XPLUS},
44 {"yMinus", YMINUS}, {"yPlus", YPLUS}, {"zMinus", ZMINUS}, {"zPlus", ZPLUS},
45 {"XMINUS", XMINUS}, {"XPLUS", XPLUS}, {"YMINUS", YMINUS}, {"YPLUS", YPLUS},
46 {"ZMINUS", ZMINUS}, {"ZPLUS", ZPLUS}};
47// default values of type::bl2str
48std::map<BCLoc, std::string> bl2str{{XMINUS, "xMinus"}, {XPLUS, "xPlus"},
49 {YMINUS, "yMinus"}, {YPLUS, "yPlus"},
50 {ZMINUS, "zMinus"}, {ZPLUS, "zPlus"}};
51
52// default values of type::str2ProbeType
53std::map<std::string, ProbeType> str2ProbeType{
54 {"POINT", POINT}, {"LINE", LINE},
55 {"SURFACE", SURFACE}, {"VOLUME", VOLUME}};
56
57} // end of namespace type
58
59} // end of namespace petibm
std::map< BCLoc, std::string > bl2str
Mapping between BCLoc and std::string.
Definition: type.cpp:48
std::map< std::string, ProbeType > str2ProbeType
Mapping between std::string and ProbeType.
Definition: type.cpp:53
std::map< Field, std::string > fd2str
Mapping between Field and std::string.
Definition: type.cpp:24
std::map< std::string, BCLoc > str2bl
Mapping between std::string and BCLoc.
Definition: type.cpp:41
std::map< std::string, BCType > str2bt
Mapping between std::string and BCType.
Definition: type.cpp:28
std::map< Dir, std::string > dir2str
Mapping between Dir and std::string.
Definition: type.cpp:18
std::map< BCType, std::string > bt2str
mapping between BCType and std::string.
Definition: type.cpp:34
std::map< std::string, Dir > str2dir
Mapping between std::string and Dir.
Definition: type.cpp:16
std::map< std::string, Field > str2fd
Mapping between std::string and Field.
Definition: type.cpp:21
@ vertex
Definition: type.h:85
@ PERIODIC
Definition: type.h:96
@ CONVECTIVE
Definition: type.h:99
@ NOBC
Definition: type.h:95
@ DIRICHLET
Definition: type.h:97
@ NEUMANN
Definition: type.h:98
@ VOLUME
Definition: type.h:127
@ SURFACE
Definition: type.h:126
@ ZMINUS
Definition: type.h:113
@ XMINUS
Definition: type.h:109
@ YMINUS
Definition: type.h:111
A toolbox for building flow solvers.
Definition: bodypack.h:52
Definition of user-defined types for convenience.