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:

enumerator deflt#
enumerator centre#
enumerator xlow#
enumerator ylow#
enumerator zlow#
enumerator vshift#
enum DIFF_METHOD#

Differential methods. Both central and upwind.

Values:

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

Specify grid region for looping.

Values:

enumerator all#
enumerator nobndry#
enumerator nox#
enumerator noy#
enumerator 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:

enumerator X#
enumerator Y#
enumerator Z#
enumerator YAligned#
enumerator 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:

enumerator Standard#
enumerator 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:

enumerator Standard#
enumerator Average#
enum STAGGER#

To identify valid staggering combinations.

Values:

enumerator None#
enumerator C2L#
enumerator L2C#
enum DERIV#

To identify types of derivative method combinations.

Values:

enumerator Standard#
enumerator StandardSecond#
enumerator StandardFourth#
enumerator Upwind#
enumerator Flux#

Functions

std::string toString(CELL_LOC location)
CELL_LOC CELL_LOCFromString(const std::string &location_string)
std::string toString(DIFF_METHOD location)
std::string toString(REGION region)
std::string toString(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 toString(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

using type = T#

Public Functions

inline T lookup()#

Public Static Attributes

static const type value = val#