waLBerla 7.3
Loading...
Searching...
No Matches
DataTypes.h File Reference

Detailed Description

#include "waLBerlaDefinitions.h"
#include "Macros.h"
#include "Stdlib.hpp"
#include <limits>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <stdexcept>
#include <type_traits>

Classes

struct  walberla::never_true< typename >
 workaround to implement static_assert(false) (CWG 2518 / P2593R1) More...
class  walberla::shared_ptr< T >
 STL class. More...
class  walberla::weak_ptr< T >
 STL class. More...

Namespaces

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

Macros

#define WALBERLA_STATIC_ASSERT(x)
#define WALBERLA_UNUSED(x)

Typedefs

using walberla::int8_t = std::int8_t
 8 bit signed integer
using walberla::int16_t = std::int16_t
 16 bit signed integer
using walberla::int32_t = std::int32_t
 32 bit signed integer
using walberla::int64_t = std::int64_t
 64 bit signed integer
using walberla::uint8_t = std::uint8_t
 8 bit unsigned integer
using walberla::uint16_t = std::uint16_t
 16 bit unsigned integer
using walberla::uint32_t = std::uint32_t
 32 bit unsigned integer
using walberla::uint64_t = std::uint64_t
 64 bit unsigned integer
using walberla::byte_t = uint8_t
using walberla::id_t = uint64_t
using walberla::ptrdiff_t = std::ptrdiff_t
using walberla::uint_t = std::size_t
using walberla::size_t = std::size_t
using walberla::cell_idx_t = int
using walberla::real_t = float
using walberla::float32 = float
using walberla::float64 = double

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:
template<typename S, typename T>
walberla::numeric_cast (T t)
template<typename T>
int8_t walberla::int8_c (T t)
 cast to type int8_t using "int8_c(x)"
template<typename T>
int16_t walberla::int16_c (T t)
 cast to type int16_t using "int16_c(x)"
template<typename T>
int32_t walberla::int32_c (T t)
 cast to type int32_t using "int32_c(x)"
template<typename T>
int64_t walberla::int64_c (T t)
 cast to type int64_t using "int64_c(x)"
template<typename T>
uint8_t walberla::uint8_c (T t)
 cast to type uint8_t using "uint8_c(x)"
template<typename T>
uint16_t walberla::uint16_c (T t)
 cast to type uint16_t using "uint16_c(x)"
template<typename T>
uint32_t walberla::uint32_c (T t)
 cast to type uint32_t using "uint32_c(x)"
template<typename T>
uint64_t walberla::uint64_c (T t)
 cast to type uint64_t using "uint64_c(x)"
template<typename T>
int walberla::int_c (T t)
 cast to type int using "int_c(x)"
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)"
template<typename UINT>
void walberla::static_assert_uint_t ()
template<typename T>
cell_idx_t walberla::cell_idx_c (T t)
 cast to type cell_idx_t using "cell_idx_c(x)"
constexpr real_t walberla::operator""_r (long double t) noexcept
constexpr real_t walberla::operator""_r (unsigned long long int t) noexcept
template<typename T>
real_t walberla::real_c (T t)
 cast to type real_t using "real_c(x)"
template<typename T>
double walberla::double_c (T t)
 cast to type double
template<typename T>
float walberla::float_c (T t)
 cast to type float
bool walberla::realIsIdentical (const real_t a, const real_t b)
bool walberla::realIsEqual (const real_t lhs, const real_t rhs, const real_t epsilon=real_comparison::Epsilon< real_t >::value)
template<typename T1, typename T2>
bool walberla::floatIsEqual (T1 lhs, T2 rhs, const std::common_type_t< T1, T2 > epsilon=real_comparison::Epsilon< std::common_type_t< T1, T2 > >::value)

Macro Definition Documentation

◆ WALBERLA_STATIC_ASSERT

#define WALBERLA_STATIC_ASSERT ( x)
Value:
static_assert(x, "Assertion failed")

◆ WALBERLA_UNUSED

#define WALBERLA_UNUSED ( x)
Value:
(void)(x)