Namespace containing utility functions for Cell and CellContainer objects.
More...
|
| static const std::unordered_map< std::string, BoundaryCondition > | conditionTable |
| | Map containing conversion information for converting a string to a BoundaryCondition enum.
|
| |
| static const std::unordered_map< std::string, CellType > | typeTable |
| | Map containing conversion information for converting a string to a CellType enum.
|
| |
| static const std::unordered_map< std::string, HaloLocation > | haloTable |
| | Map containing conversion information for converting a string to a HaloLocation enum.
|
| |
| static const std::unordered_map< BoundaryCondition, std::string > | conditionStringTable |
| | Reverse map containing conversion information for converting a BoundaryCondition enum to a string.
|
| |
| static const std::unordered_map< CellType, std::string > | typeStringTable |
| | Reverse map containing conversion information for converting a CellType enum to a string.
|
| |
| static const std::unordered_map< HaloLocation, std::string > | haloStringTable |
| | Reverse map containing conversion information for converting a HaloLocation enum to a string.
|
| |
Namespace containing utility functions for Cell and CellContainer objects.
◆ fromBoundaryCondition()
Converts a BoundaryCondition to a string.
- Parameters
-
| type | An instance of the BoundaryCondition enum to be converted. |
- Returns
- The resulting string.
◆ fromBoundaryConditionArray()
| static std::string CellUtils::fromBoundaryConditionArray |
( |
const std::array< BoundaryCondition, 6 > & |
arr | ) |
|
|
inlinestatic |
Converts an array of BoundaryCondition enums to a truncated, concatenated string.
For each type, the first letter is chosen and appended to the final string.
- Parameters
-
| arr | The array of BoundaryCondition enums. |
- Returns
- A string containing the initials of all elements, in order.
◆ fromHalo()
Converts a HaloLocation to a string.
- Parameters
-
| type | An instance of the HaloLocation enum to be converted. |
- Returns
- The resulting string.
◆ fromHaloVec()
| static std::string CellUtils::fromHaloVec |
( |
const std::vector< HaloLocation > & |
vec | ) |
|
|
inlinestatic |
Converts a vector of HaloLocation enums to a truncated, concatenated string.
For each type, the first letter is chosen and appended to the final string.
- Parameters
-
| vec | The vector of HaloLocation enums. |
- Returns
- A string containing the initials of all elements, in order.
◆ fromType()
| static std::string CellUtils::fromType |
( |
CellType |
type | ) |
|
|
inlinestatic |
Converts a CellType to a string.
- Parameters
-
| type | An instance of the CellType enum to be converted. |
- Returns
- The resulting string.
◆ stringToBoundaryConditions()
| static std::array< BoundaryCondition, 6 > CellUtils::stringToBoundaryConditions |
( |
const std::string & |
str | ) |
|
|
inlinestatic |
Converts a string of length 6 to an array of boundary conditions for each boundary.
The characters correspond to the boundary condition for the following directions (in this order): north, south, east, west, above, below. The string may only contain the characters described in the help string.
- Parameters
-
- Returns
- An array of boundary conditions for each boundary.
◆ toBoundaryCondition()
Converts a string to a BoundaryCondition enum using a dedicated map.
- Parameters
-
| type | The string containing the desired BoundaryCondition. |
- Returns
- The desired BoundaryCondition enum if the type string is valid, otherwise terminates with error.
◆ toHalo()
| static HaloLocation CellUtils::toHalo |
( |
const std::string & |
type | ) |
|
|
inlinestatic |
Converts a string to a HaloLocation enum using a dedicated map.
- Parameters
-
| type | The string containing the desired HaloLocation. |
- Returns
- The desired HaloLocation enum if the type string is valid, otherwise terminates with error.
◆ toType()
| static CellType CellUtils::toType |
( |
const std::string & |
type | ) |
|
|
inlinestatic |
Converts a string to a CellType enum using a dedicated map.
- Parameters
-
| type | The string containing the desired CellType. |
- Returns
- The desired CellType enum if the type string is valid, otherwise terminates with error.
◆ conditionStringTable
| const std::unordered_map<BoundaryCondition, std::string> CellUtils::conditionStringTable |
|
inlinestatic |
Initial value:= []() {
std::unordered_map<BoundaryCondition, std::string> reverseMap;
reverseMap[pair.second] = pair.first;
return reverseMap;
}()
static const std::unordered_map< std::string, BoundaryCondition > conditionTable
Map containing conversion information for converting a string to a BoundaryCondition enum.
Definition CellUtils.h:29
Reverse map containing conversion information for converting a BoundaryCondition enum to a string.
◆ conditionTable
Initial value:
Map containing conversion information for converting a string to a BoundaryCondition enum.
◆ haloStringTable
| const std::unordered_map<HaloLocation, std::string> CellUtils::haloStringTable |
|
inlinestatic |
Initial value:= []() {
std::unordered_map<HaloLocation, std::string> reverseMap;
reverseMap[pair.second] = pair.first;
return reverseMap;
}()
static const std::unordered_map< std::string, HaloLocation > haloTable
Map containing conversion information for converting a string to a HaloLocation enum.
Definition CellUtils.h:39
Reverse map containing conversion information for converting a HaloLocation enum to a string.
◆ haloTable
| const std::unordered_map<std::string, HaloLocation> CellUtils::haloTable |
|
inlinestatic |
Initial value:
Map containing conversion information for converting a string to a HaloLocation enum.
◆ typeStringTable
| const std::unordered_map<CellType, std::string> CellUtils::typeStringTable |
|
inlinestatic |
Initial value:= []() {
std::unordered_map<CellType, std::string> reverseMap;
reverseMap[pair.second] = pair.first;
return reverseMap;
}()
static const std::unordered_map< std::string, CellType > typeTable
Map containing conversion information for converting a string to a CellType enum.
Definition CellUtils.h:35
Reverse map containing conversion information for converting a CellType enum to a string.
◆ typeTable
| const std::unordered_map<std::string, CellType> CellUtils::typeTable |
|
inlinestatic |
Initial value:
Map containing conversion information for converting a string to a CellType enum.