Utility.h File Reference

Detailed Description

Header file for mathematical functions and constants.

Author
Klaus Iglberger
#include "MathTrait.h"
#include "core/DataTypes.h"
#include <cmath>
#include <cstddef>
#include <limits>
#include <type_traits>

Namespaces

 walberla
 \file TimestepTracker.h \ingroup lbm \author Frederik Hennig frede.nosp@m.rik..nosp@m.henni.nosp@m.g@fa.nosp@m.u.de
 
 walberla::math
 

Functions

Mathematical utility functions
template<typename T >
const T walberla::math::sign (T a)
 Sign function. More...
 
template<typename T >
const std::enable_if< std::is_unsigned< T >::value, T >::type walberla::math::abs (T a)
 Absolute value function. More...
 
template<typename T >
const std::enable_if< ! std::is_unsigned< T >::value, T >::type walberla::math::abs (T a)
 Absolute value function. More...
 
template<typename T1 , typename T2 >
const MathTrait< T1, T2 >::High walberla::math::min (const T1 &a, const T2 &b)
 Minimum function for two arguments. More...
 
template<typename T1 , typename T2 , typename T3 >
const MathTrait< typename MathTrait< T1, T2 >::High, T3 >::High walberla::math::min (const T1 &a, const T2 &b, const T3 &c)
 Minimum function for three arguments. More...
 
template<typename T1 , typename T2 >
const MathTrait< T1, T2 >::High walberla::math::max (const T1 &a, const T2 &b)
 Maximum function for two arguments. More...
 
template<typename T1 , typename T2 , typename T3 >
const MathTrait< typename MathTrait< T1, T2 >::High, T3 >::High walberla::math::max (const T1 &a, const T2 &b, const T3 &c)
 Maximum function for three arguments. More...
 
template<typename T >
const T walberla::math::sqr (const T &a)
 Square function. More...
 
template<typename T1 , typename T2 >
bool walberla::math::equal (T1 a, T2 b)
 Generic equality check. More...
 
real_t walberla::math::round (real_t a)
 Rounding function. More...
 
template<typename T >
const std::enable_if< !std::is_unsigned< T >::value, T >::type walberla::math::abs (T a)
 Absolute value function. More...
 
Mathematical utility functions
template<typename T >
const T walberla::math::sign (T a)
 Sign function. More...
 
template<typename T >
const std::enable_if< std::is_unsigned< T >::value, T >::type walberla::math::abs (T a)
 Absolute value function. More...
 
template<typename T >
const std::enable_if< ! std::is_unsigned< T >::value, T >::type walberla::math::abs (T a)
 Absolute value function. More...
 
template<typename T1 , typename T2 >
const MathTrait< T1, T2 >::High walberla::math::min (const T1 &a, const T2 &b)
 Minimum function for two arguments. More...
 
template<typename T1 , typename T2 , typename T3 >
const MathTrait< typename MathTrait< T1, T2 >::High, T3 >::High walberla::math::min (const T1 &a, const T2 &b, const T3 &c)
 Minimum function for three arguments. More...
 
template<typename T1 , typename T2 >
const MathTrait< T1, T2 >::High walberla::math::max (const T1 &a, const T2 &b)
 Maximum function for two arguments. More...
 
template<typename T1 , typename T2 , typename T3 >
const MathTrait< typename MathTrait< T1, T2 >::High, T3 >::High walberla::math::max (const T1 &a, const T2 &b, const T3 &c)
 Maximum function for three arguments. More...
 
template<typename T >
const T walberla::math::sqr (const T &a)
 Square function. More...
 
template<typename T1 , typename T2 >
bool walberla::math::equal (T1 a, T2 b)
 Generic equality check. More...
 
real_t walberla::math::round (real_t a)
 Rounding function. More...
 
template<typename T >
const std::enable_if< !std::is_unsigned< T >::value, T >::type walberla::math::abs (T a)
 Absolute value function. More...