MolSim
Loading...
Searching...
No Matches
Namespaces | Enumerations | Functions | Variables
CellUtils.h File Reference

Utility functions for Cell and CellContainer objects. More...

#include "CLIUtils.h"
#include <bitset>
#include <sstream>
#include <string>
#include <unordered_map>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  CellUtils
 Namespace containing utility functions for Cell and CellContainer objects.
 

Enumerations

enum class  BoundaryCondition { OUTFLOW , REFLECTIVE , PERIODIC }
 Enum containing the possible types of boundary conditions. More...
 
enum class  CellType { INNER , BORDER , HALO }
 Enum containing the possible types of cells. More...
 
enum class  HaloLocation {
  NORTH , SOUTH , WEST , EAST ,
  ABOVE , BELOW
}
 Enum containing the possible corner and edge directions of halo cells. More...
 
enum class  BorderLocation {
  NORTH = 0 , SOUTH = 1 , WEST = 2 , EAST = 3 ,
  ABOVE = 4 , BELOW = 5
}
 Enum containing the possible corner and edge directions of border cells. More...
 

Functions

static std::string CellUtils::fromBoundaryCondition (BoundaryCondition type)
 Converts a BoundaryCondition to a string.
 
static BoundaryCondition CellUtils::toBoundaryCondition (const std::string &type)
 Converts a string to a BoundaryCondition enum using a dedicated map.
 
static std::string CellUtils::fromType (CellType type)
 Converts a CellType to a string.
 
static CellType CellUtils::toType (const std::string &type)
 Converts a string to a CellType enum using a dedicated map.
 
static std::string CellUtils::fromHalo (HaloLocation type)
 Converts a HaloLocation to a string.
 
static std::string CellUtils::fromHaloVec (const std::vector< HaloLocation > &vec)
 Converts a vector of HaloLocation enums to a truncated, concatenated string.
 
static std::string CellUtils::fromBoundaryConditionArray (const std::array< BoundaryCondition, 6 > &arr)
 Converts an array of BoundaryCondition enums to a truncated, concatenated string.
 
static HaloLocation CellUtils::toHalo (const std::string &type)
 Converts a string to a HaloLocation enum using a dedicated map.
 
static std::array< BoundaryCondition, 6 > CellUtils::stringToBoundaryConditions (const std::string &str)
 Converts a string of length 6 to an array of boundary conditions for each boundary.
 

Variables

static const std::unordered_map< std::string, BoundaryConditionCellUtils::conditionTable
 Map containing conversion information for converting a string to a BoundaryCondition enum.
 
static const std::unordered_map< std::string, CellTypeCellUtils::typeTable
 Map containing conversion information for converting a string to a CellType enum.
 
static const std::unordered_map< std::string, HaloLocationCellUtils::haloTable
 Map containing conversion information for converting a string to a HaloLocation enum.
 
static const std::unordered_map< BoundaryCondition, std::string > CellUtils::conditionStringTable
 Reverse map containing conversion information for converting a BoundaryCondition enum to a string.
 
static const std::unordered_map< CellType, std::string > CellUtils::typeStringTable
 Reverse map containing conversion information for converting a CellType enum to a string.
 
static const std::unordered_map< HaloLocation, std::string > CellUtils::haloStringTable
 Reverse map containing conversion information for converting a HaloLocation enum to a string.
 

Detailed Description

Utility functions for Cell and CellContainer objects.

Date
2024-12-02

Enumeration Type Documentation

◆ BorderLocation

enum class BorderLocation
strong

Enum containing the possible corner and edge directions of border cells.

Enumerator
NORTH 
SOUTH 
WEST 
EAST 
ABOVE 
BELOW 

◆ BoundaryCondition

enum class BoundaryCondition
strong

Enum containing the possible types of boundary conditions.

Enumerator
OUTFLOW 
REFLECTIVE 
PERIODIC 

◆ CellType

enum class CellType
strong

Enum containing the possible types of cells.

Enumerator
INNER 
BORDER 
HALO 

◆ HaloLocation

enum class HaloLocation
strong

Enum containing the possible corner and edge directions of halo cells.

Enumerator
NORTH 
SOUTH 
WEST 
EAST 
ABOVE 
BELOW