1 #ifndef BOUNDARY_TYPE_H_INCLUDED
2 #define BOUNDARY_TYPE_H_INCLUDED
36 None, NoFlux, SourceSink, SAM
39 inline std::ostream& operator<<(std::ostream& os,
BoundaryType b)
41 static const std::map<BoundaryType, std::string> m {
42 std::make_pair(BoundaryType::None,
"None"),
43 std::make_pair(BoundaryType::NoFlux,
"NoFlux"),
44 std::make_pair(BoundaryType::SourceSink,
"SourceSink"),
45 std::make_pair(BoundaryType::SAM,
"SAM")
48 const auto search = m.find(b);
49 os << ((search != m.end()) ? search->second :
"Unknown");
54 inline std::istream& operator>>(std::istream& is,
BoundaryType& b)
56 static const std::map<std::string, BoundaryType> m {
57 std::make_pair(
"NONE", BoundaryType::None),
58 std::make_pair(
"NOFLUX", BoundaryType::NoFlux),
59 std::make_pair(
"SOURCESINK", BoundaryType::SourceSink),
60 std::make_pair(
"SAM", BoundaryType::SAM)
66 b = (search != m.end()) ? search->second : BoundaryType::None;
73 #endif // end-of-include-guard
static std::string ToUpper(const std::string &source)
Builds a string with upper case characters only.
Namespace for the core simulator.
BoundaryType
Enumerates cell boundary types.
String manipulation utilities.