Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
common_typedef.h File Reference

Typedefs for common types. More...

#include <string>
#include <array>
#include <vector>
#include <Kokkos_Macros.hpp>

Go to the source code of this file.

Macros

#define Mallard_DIM   2
 
#define N_DIM   Mallard_DIM
 
#define N_CONSERVATIVE   (N_DIM + 2)
 
#define N_PRIMITIVE   (N_DIM + 3)
 
#define FOR_I_DIM   for (uint8_t i = 0; i < N_DIM; i++)
 
#define FOR_I_CONSERVATIVE   for (uint8_t i = 0; i < N_CONSERVATIVE; i++)
 
#define FOR_I_PRIMITIVE   for (uint8_t i = 0; i < N_PRIMITIVE; i++)
 

Typedefs

using rtype = float
 
using NVector = std::array< rtype, N_DIM >
 
using NMatrix = std::array< std::array< rtype, N_DIM >, N_DIM >
 

Functions

KOKKOS_INLINE_FUNCTION constexpr rtype operator""_r (long double x)
 rtype literal, e.g. 0.5_r, so constants do not promote float expressions to double.
 
KOKKOS_INLINE_FUNCTION constexpr rtype operator""_r (unsigned long long x)
 
template<typename T = rtype>
KOKKOS_INLINE_FUNCTION constexpr T precision_tol (double double_tol, double single_tol)
 A tolerance that depends on rtype's precision: double_tol in double builds, single_tol in single. For tolerances against round-off in rtype data whose double value is below single-precision resolution; T is the type of the computation, which may be double in both.
 

Variables

const std::array< std::string, N_CONSERVATIVE > CONSERVATIVE_NAMES
 
const std::array< std::string, N_PRIMITIVE > PRIMITIVE_NAMES
 

Detailed Description

Typedefs for common types.

Author
Matthew Bonanni (mbona.nosp@m.nni0.nosp@m.01@gm.nosp@m.ail..nosp@m.com)
Version
0.1
Date
2023-12-25

Macro Definition Documentation

◆ FOR_I_CONSERVATIVE

#define FOR_I_CONSERVATIVE   for (uint8_t i = 0; i < N_CONSERVATIVE; i++)

◆ FOR_I_DIM

#define FOR_I_DIM   for (uint8_t i = 0; i < N_DIM; i++)

◆ FOR_I_PRIMITIVE

#define FOR_I_PRIMITIVE   for (uint8_t i = 0; i < N_PRIMITIVE; i++)

◆ Mallard_DIM

#define Mallard_DIM   2

◆ N_CONSERVATIVE

#define N_CONSERVATIVE   (N_DIM + 2)

◆ N_DIM

#define N_DIM   Mallard_DIM

◆ N_PRIMITIVE

#define N_PRIMITIVE   (N_DIM + 3)

Typedef Documentation

◆ NMatrix

◆ NVector

◆ rtype

Function Documentation

◆ operator""_r() [1/2]

KOKKOS_INLINE_FUNCTION constexpr rtype operator""_r ( long double  x)
constexpr

rtype literal, e.g. 0.5_r, so constants do not promote float expressions to double.

◆ operator""_r() [2/2]

KOKKOS_INLINE_FUNCTION constexpr rtype operator""_r ( unsigned long long  x)
constexpr

◆ precision_tol()

template<typename T = rtype>
KOKKOS_INLINE_FUNCTION constexpr T precision_tol ( double  double_tol,
double  single_tol 
)
constexpr

A tolerance that depends on rtype's precision: double_tol in double builds, single_tol in single. For tolerances against round-off in rtype data whose double value is below single-precision resolution; T is the type of the computation, which may be double in both.

Variable Documentation

◆ CONSERVATIVE_NAMES

Initial value:
= {
"RHO",
"RHOU_X",
"RHOU_Y",
"RHOE"
}

◆ PRIMITIVE_NAMES

Initial value:
= {
"U_X",
"U_Y",
"P",
"T",
"H"
}