DataTypes.h File Reference
#include "waLBerlaDefinitions.h"
#include <cmath>
#include <cstdint>
#include <limits>
#include <memory>
#include <stdexcept>
#include <string>
#include <type_traits>

Classes

struct  walberla::never_true< typename >
 
struct  walberla::uintFromBitWidth< size >
 
struct  walberla::uintFromBitWidth< 8 >
 
struct  walberla::uintFromBitWidth< 16 >
 
struct  walberla::uintFromBitWidth< 32 >
 
struct  walberla::uintFromBitWidth< 64 >
 
struct  walberla::leastUnsignedInteger< minSize >
 Provides the smallest unsigned integer type that has at least minSize bits. More...
 

Namespaces

 walberla
 Storage for detected contacts which can be used to perform actions for all contacts, e.g.
 

Macros

#define WALBERLA_STATIC_ASSERT(x)   static_assert(x, "Assertion failed")
 
#define TypeToString(X)
 
#define WALBERLA_UNUSED(x)   (void)(x)
 

Typedefs

typedef std::int8_t walberla::int8_t
 8 bit signed integer More...
 
typedef std::int16_t walberla::int16_t
 16 bit signed integer More...
 
typedef std::int32_t walberla::int32_t
 32 bit signed integer More...
 
typedef std::int64_t walberla::int64_t
 64 bit signed integer More...
 
typedef std::uint8_t walberla::uint8_t
 8 bit unsigned integer More...
 
typedef std::uint16_t walberla::uint16_t
 16 bit unsigned integer More...
 
typedef std::uint32_t walberla::uint32_t
 32 bit unsigned integer More...
 
typedef std::uint64_t walberla::uint64_t
 64 bit unsigned integer More...
 
typedef uint8_t walberla::byte_t
 
typedef uint64_t walberla::id_t
 
typedef size_t walberla::uint_t
 
typedef int walberla::cell_idx_t
 
typedef float walberla::real_t
 

Functions

template<typename T >
bool walberla::isIdentical (const T a, const T b)
 If you want to compare two reals using operator == and you really know what you are doing, you can use the following function: More...
 
template<typename S , typename T >
walberla::numeric_cast (T t)
 
template<typename S >
walberla::string_to_num (std::string &t)
 
template<>
float walberla::string_to_num (std::string &t)
 
template<>
double walberla::string_to_num (std::string &t)
 
template<>
long double walberla::string_to_num (std::string &t)
 
template<>
int walberla::string_to_num (std::string &t)
 
template<>
long walberla::string_to_num (std::string &t)
 
template<>
long long walberla::string_to_num (std::string &t)
 
template<>
unsigned long walberla::string_to_num (std::string &t)
 
template<>
unsigned long long walberla::string_to_num (std::string &t)
 
template<typename T >
int8_t walberla::int8_c (T t)
 cast to type int8_t using "int8_c(x)" More...
 
template<typename T >
int16_t walberla::int16_c (T t)
 cast to type int16_t using "int16_c(x)" More...
 
template<typename T >
int32_t walberla::int32_c (T t)
 cast to type int32_t using "int32_c(x)" More...
 
template<typename T >
int64_t walberla::int64_c (T t)
 cast to type int64_t using "int64_c(x)" More...
 
template<typename T >
uint8_t walberla::uint8_c (T t)
 cast to type uint8_t using "uint8_c(x)" More...
 
template<typename T >
uint16_t walberla::uint16_c (T t)
 cast to type uint16_t using "uint16_c(x)" More...
 
template<typename T >
uint32_t walberla::uint32_c (T t)
 cast to type uint32_t using "uint32_c(x)" More...
 
template<typename T >
uint64_t walberla::uint64_c (T t)
 cast to type uint64_t using "uint64_c(x)" More...
 
template<typename T >
int walberla::int_c (T t)
 cast to type int using "int_c(x)" More...
 
template<typename INT >
void walberla::static_assert_int_t ()
 
template<typename T >
uint_t walberla::uint_c (T t)
 cast to type uint_t using "uint_c(x)" More...
 
template<typename UINT >
void walberla::static_assert_uint_t ()
 
constexpr uint_t walberla::leastUnsignedIntegerBitWidth (uint_t width)
 
template<typename T >
cell_idx_t walberla::cell_idx_c (T t)
 cast to type cell_idx_t using "cell_idx_c(x)" More...
 
template<typename T >
real_t walberla::real_c (T t)
 cast to type real_t using "real_c(x)" More...
 
template<typename T >
double walberla::double_c (T t)
 cast to type double More...
 
template<typename T >
float walberla::float_c (T t)
 cast to type float More...
 
bool walberla::realIsIdentical (const real_t a, const real_t b)
 
bool walberla::realIsEqual (const real_t a, const real_t b, const real_t eps=real_comparison::Epsilon< real_t >::value)
 
bool walberla::floatIsEqual (long double lhs, long double rhs, const long double epsilon=real_comparison::Epsilon< long double >::value)
 
bool walberla::floatIsEqual (double lhs, double rhs, const double epsilon=real_comparison::Epsilon< double >::value)
 
bool walberla::floatIsEqual (float lhs, float rhs, const float epsilon=real_comparison::Epsilon< float >::value)
 
template<typename T >
const char * walberla::typeToString ()
 
template<>
const char * walberla::typeToString< bool > ()
 
template<>
const char * walberla::typeToString< char > ()
 
template<>
const char * walberla::typeToString< short > ()
 
template<>
const char * walberla::typeToString< int > ()
 
template<>
const char * walberla::typeToString< long > ()
 
template<>
const char * walberla::typeToString< long long > ()
 
template<>
const char * walberla::typeToString< unsigned char > ()
 
template<>
const char * walberla::typeToString< unsigned short > ()
 
template<>
const char * walberla::typeToString< unsigned int > ()
 
template<>
const char * walberla::typeToString< unsigned long > ()
 
template<>
const char * walberla::typeToString< unsigned long long > ()
 
template<>
const char * walberla::typeToString< float > ()
 
template<>
const char * walberla::typeToString< double > ()
 
template<typename T >
const char * walberla::typeToString (T)
 
std::string walberla::demangle (const std::string &name)
 

Macro Definition Documentation

#define TypeToString (   X)
Value:
template<> inline const char* typeToString< X >() { \
static char string[] = #X; \
return string; \
}
#define WALBERLA_STATIC_ASSERT (   x)    static_assert(x, "Assertion failed")
#define WALBERLA_UNUSED (   x)    (void)(x)