File bout_types.hxx

Defines

ENUMSTR(val)
STRENUM(val)

Typedefs

using BoutReal = double

Size of real numbers.

using FuncPtr = BoutReal (*)(BoutReal t, BoutReal x, BoutReal y, BoutReal z)

Boundary condition function.

Enums

enum CELL_LOC

4 possible variable locations. Default is for passing to functions

Values:

deflt
centre
xlow
ylow
zlow
vshift
enum DIFF_METHOD

Differential methods. Both central and upwind.

Values:

deflt
u1
u2
c2
w2
w3
c4
u3
fft
split
s2
enum REGION

Specify grid region for looping.

Values:

all
nobndry
nox
noy
noz
enum DIRECTION

To identify particular directions (in index space):

  • X, Y, Z are the coordinate directions
  • YAligned is a special case of Y, indicating a field-aligned grid, where the x- and z- axes are not necessarily orthogonal
  • YOrthogonal is a special case of Y, indicating a grid where the x and z axes are orthogonal but the y-direction is not necessarily field-aligned

Values:

X
Y
Z
YAligned
YOrthogonal
enum YDirectionType

Identify kind of a field’s y-direction

  • Standard is the default for the Mesh/Coordinates/ParallelTransform
  • Aligned indicates that the field has been transformed to field-aligned coordinates

Values:

Standard
Aligned
enum ZDirectionType

Identify kind of a field’s z-direction

  • Standard is the default
  • Average indicates that the field represents an average over the z-direction, rather than having a particular z-position (i.e. is a Field2D)

Values:

Standard
Average
enum STAGGER

To identify valid staggering combinations.

Values:

None
C2L
L2C
enum DERIV

To identify types of derivative method combinations.

Values:

Standard
StandardSecond
StandardFourth
Upwind
Flux

Functions

std::string toString(CELL_LOC location)
CELL_LOC CELL_LOCFromString(const std::string &location_string)
std::string CELL_LOC_STRING(CELL_LOC location)
std::string toString(DIFF_METHOD location)
std::string DIFF_METHOD_STRING(DIFF_METHOD location)
std::string toString(REGION region)
std::string REGION_STRING(REGION region)
std::string toString(DIRECTION direction)
std::string DIRECTION_STRING(DIRECTION direction)
std::string toString(YDirectionType d)
YDirectionType YDirectionTypeFromString(const std::string &y_direction_string)
std::string toString(ZDirectionType d)
ZDirectionType ZDirectionTypeFromString(const std::string &z_direction_string)
bool areDirectionsCompatible(const DirectionTypes &d1, const DirectionTypes &d2)

Check whether direction types are compatible, so two fields with attributes d1 and d2 respectively can be added, subtracted, etc.

void swap(const DirectionTypes &first, const DirectionTypes &second)
std::string toString(STAGGER stagger)
std::string STAGGER_STRING(STAGGER stagger)
std::string toString(DERIV deriv)
std::string DERIV_STRING(DERIV deriv)

Variables

constexpr BoutReal BoutNaN = std::numeric_limits<BoutReal>::quiet_NaN()

Quiet NaN.

constexpr CELL_LOC CELL_DEFAULT = CELL_LOC::deflt
constexpr CELL_LOC CELL_CENTRE = CELL_LOC::centre
constexpr CELL_LOC CELL_CENTER = CELL_LOC::centre
constexpr CELL_LOC CELL_XLOW = CELL_LOC::xlow
constexpr CELL_LOC CELL_YLOW = CELL_LOC::ylow
constexpr CELL_LOC CELL_ZLOW = CELL_LOC::zlow
constexpr CELL_LOC CELL_VSHIFT = CELL_LOC::vshift
constexpr DIFF_METHOD DIFF_DEFAULT = DIFF_METHOD::deflt
constexpr DIFF_METHOD DIFF_U1 = DIFF_METHOD::u1
constexpr DIFF_METHOD DIFF_U2 = DIFF_METHOD::u2
constexpr DIFF_METHOD DIFF_C2 = DIFF_METHOD::c2
constexpr DIFF_METHOD DIFF_W2 = DIFF_METHOD::w2
constexpr DIFF_METHOD DIFF_W3 = DIFF_METHOD::w3
constexpr DIFF_METHOD DIFF_C4 = DIFF_METHOD::c4
constexpr DIFF_METHOD DIFF_U3 = DIFF_METHOD::u3
constexpr DIFF_METHOD DIFF_FFT = DIFF_METHOD::fft
constexpr DIFF_METHOD DIFF_SPLIT = DIFF_METHOD::split
constexpr DIFF_METHOD DIFF_S2 = DIFF_METHOD::s2
constexpr REGION RGN_ALL = REGION::all
constexpr REGION RGN_NOBNDRY = REGION::nobndry
constexpr REGION RGN_NOX = REGION::nox
constexpr REGION RGN_NOY = REGION::noy
constexpr REGION RGN_NOZ = REGION::noz
struct DirectionTypes
#include <bout_types.hxx>

Container for direction types.

Public Members

YDirectionType y
ZDirectionType z
template<typename T, T val>
struct enumWrapper

Public Types

template<>
using type = T

Public Functions

T lookup()

Public Static Attributes

const type value = val