VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
ub_math Namespace Reference

Classes

struct  Epsilon
 
struct  Epsilon< double >
 
struct  Epsilon< float >
 
struct  Epsilon< int >
 
struct  Epsilon< long double >
 

Functions

template<typename T >
T log (const T &z, const T &base)
 
template<typename T >
T getNegativeInfinity ()
 
template<typename T >
T getPositiveInfinity ()
 
template<typename T >
bool isInfinity (const T &value)
 
template<typename T >
T getNaN ()
 
template<typename T >
bool isNaN (const T &x)
 
template<typename T >
T getEqualityEpsilon ()
 
template<typename T >
bool zero (const T &value)
 
template<>
bool zero (const int &value)
 
template<typename T1 , typename T2 >
bool zero (const T1 &value1, const T2 &value2)
 
template<typename T1 , typename T2 , typename T3 >
bool zero (const T1 &value1, const T2 &value2, const T3 &value3)
 
template<typename T >
bool negative (const T &value)
 
template<typename T >
bool nonPositive (const T &value)
 
template<typename T >
bool positive (const T &value)
 
template<typename T >
bool nonNegative (const T &value)
 
template<typename T1 , typename T2 >
bool equal (const T1 &value, const T2 &reference)
 
template<typename T1 , typename T2 , typename T3 >
bool equal (const T1 &val1, const T2 &val2, const T3 &val3)
 
template<typename T1 , typename T2 >
bool less (const T1 &value, const T2 &reference)
 
template<typename T1 , typename T2 >
bool lessEqual (const T1 &value, const T2 &reference)
 
template<typename T1 , typename T2 >
bool greater (const T1 &value, const T2 &reference)
 
template<typename T1 , typename T2 >
bool greaterEqual (const T1 &value, const T2 &reference)
 
template<typename T >
T round (const T &value, const int &decimalPlaces)
 
template<typename T >
int integerRounding (const T &value)
 
template<typename T >
T getRad (const T &degrees)
 
template<typename T >
T getDegrees (const T &rad)
 
template<typename T >
T ACos (const T &fValue)
 
template<typename T >
T ASin (const T &fValue)
 
template<typename T >
T invSqrt (const T &fValue)
 
template<typename T1 , typename T2 , typename T3 , typename T4 >
bool less2 (const T1 &value1, const T2 &value2, T3 toBeLessAs1, T4 toBeLessAs2)
 
template<typename T1 , typename T2 , typename T3 , typename T4 >
bool greater2 (const T1 &value1, const T2 &value2, T3 toBeGreaterAs1, T4 toBeGreaterAs2)
 
template<typename T1 , typename T2 , typename T3 >
bool inClosedInterval (const T1 &value, const T2 &threshold1, const T3 &threshold2)
 
template<typename T1 , typename T2 , typename T3 >
bool inOpenInterval (const T1 &value, const T2 &threshold1, const T3 &threshold2)
 
template<typename T1 , typename T2 , typename T3 >
double adaptToClosedInterval (const T1 &value, const T2 &threshold1, const T3 &threshold2)
 
int calcGgt (int val1, int val2)
 
int calcGgt (int val1, const int &val2, int val3)
 
template<typename T >
const Tmax (const T &a1, const T &a2)
 
template<typename T >
const Tmax (const T &a1, const T &a2, const T &a3)
 
template<typename T >
const Tmax (const T &a1, const T &a2, const T &a3, const T &a4)
 
template<typename T >
const Tmin (const T &a1, const T &a2)
 
template<typename T >
const Tmin (const T &a1, const T &a2, const T &a3)
 
template<typename T >
const Tmin (const T &a1, const T &a2, const T &a3, const T &a4)
 
template<typename T , typename U >
constexpr T lerp (const T &a, const T &b, const U &t)
 
template<typename T , typename U >
constexpr T lerp2 (const T &a, const T &b, const T &c, const T &d, const U &t, const U &u)
 
template<typename T , typename U >
constexpr T lerp3 (const T &a, const T &b, const T &c, const T &d, const T &e, const T &f, const T &g, const T &h, const U &t, const U &u, const U &v)
 

Variables

const double PI
 

Function Documentation

◆ ACos()

template<typename T >
T ub_math::ACos ( const T fValue)
inline

Definition at line 255 of file UbMath.h.

◆ adaptToClosedInterval()

template<typename T1 , typename T2 , typename T3 >
double ub_math::adaptToClosedInterval ( const T1 &  value,
const T2 &  threshold1,
const T3 threshold2 
)
inline

Definition at line 329 of file UbMath.h.

◆ ASin()

template<typename T >
T ub_math::ASin ( const T fValue)
inline

Definition at line 267 of file UbMath.h.

◆ calcGgt() [1/2]

int ub_math::calcGgt ( int  val1,
const int val2,
int  val3 
)
inline

Definition at line 366 of file UbMath.h.

◆ calcGgt() [2/2]

int ub_math::calcGgt ( int  val1,
int  val2 
)
inline

Definition at line 349 of file UbMath.h.

◆ equal() [1/2]

template<typename T1 , typename T2 , typename T3 >
bool ub_math::equal ( const T1 &  val1,
const T2 &  val2,
const T3 val3 
)
inline

Definition at line 196 of file UbMath.h.

◆ equal() [2/2]

template<typename T1 , typename T2 >
bool ub_math::equal ( const T1 &  value,
const T2 &  reference 
)
inline

Definition at line 189 of file UbMath.h.

◆ getDegrees()

template<typename T >
T ub_math::getDegrees ( const T rad)
inline

Definition at line 248 of file UbMath.h.

◆ getEqualityEpsilon()

template<typename T >
T ub_math::getEqualityEpsilon ( )
inline

Definition at line 133 of file UbMath.h.

◆ getNaN()

template<typename T >
T ub_math::getNaN ( )
inline

Definition at line 117 of file UbMath.h.

◆ getNegativeInfinity()

template<typename T >
T ub_math::getNegativeInfinity ( )
inline

Definition at line 88 of file UbMath.h.

◆ getPositiveInfinity()

template<typename T >
T ub_math::getPositiveInfinity ( )
inline

Definition at line 97 of file UbMath.h.

◆ getRad()

template<typename T >
T ub_math::getRad ( const T degrees)
inline

Definition at line 242 of file UbMath.h.

◆ greater()

template<typename T1 , typename T2 >
bool ub_math::greater ( const T1 &  value,
const T2 &  reference 
)
inline

Definition at line 216 of file UbMath.h.

◆ greater2()

template<typename T1 , typename T2 , typename T3 , typename T4 >
bool ub_math::greater2 ( const T1 &  value1,
const T2 &  value2,
T3  toBeGreaterAs1,
T4  toBeGreaterAs2 
)
inline

Definition at line 302 of file UbMath.h.

◆ greaterEqual()

template<typename T1 , typename T2 >
bool ub_math::greaterEqual ( const T1 &  value,
const T2 &  reference 
)
inline

Definition at line 223 of file UbMath.h.

◆ inClosedInterval()

template<typename T1 , typename T2 , typename T3 >
bool ub_math::inClosedInterval ( const T1 &  value,
const T2 &  threshold1,
const T3 threshold2 
)
inline

Definition at line 309 of file UbMath.h.

◆ inOpenInterval()

template<typename T1 , typename T2 , typename T3 >
bool ub_math::inOpenInterval ( const T1 &  value,
const T2 &  threshold1,
const T3 threshold2 
)
inline

Definition at line 319 of file UbMath.h.

◆ integerRounding()

template<typename T >
int ub_math::integerRounding ( const T value)
inline

Definition at line 236 of file UbMath.h.

◆ invSqrt()

template<typename T >
T ub_math::invSqrt ( const T fValue)
inline

Definition at line 280 of file UbMath.h.

◆ isInfinity()

template<typename T >
bool ub_math::isInfinity ( const T value)
inline

Definition at line 106 of file UbMath.h.

◆ isNaN()

template<typename T >
bool ub_math::isNaN ( const T x)
inline

Definition at line 126 of file UbMath.h.

◆ lerp()

template<typename T , typename U >
constexpr T ub_math::lerp ( const T a,
const T b,
const U t 
)
constexpr

Definition at line 412 of file UbMath.h.

◆ lerp2()

template<typename T , typename U >
constexpr T ub_math::lerp2 ( const T a,
const T b,
const T c,
const T d,
const U t,
const U u 
)
constexpr

Definition at line 418 of file UbMath.h.

◆ lerp3()

template<typename T , typename U >
constexpr T ub_math::lerp3 ( const T a,
const T b,
const T c,
const T d,
const T e,
const T f,
const T g,
const T h,
const U t,
const U u,
const U v 
)
constexpr

Definition at line 424 of file UbMath.h.

◆ less()

template<typename T1 , typename T2 >
bool ub_math::less ( const T1 &  value,
const T2 &  reference 
)
inline

Definition at line 202 of file UbMath.h.

◆ less2()

template<typename T1 , typename T2 , typename T3 , typename T4 >
bool ub_math::less2 ( const T1 &  value1,
const T2 &  value2,
T3  toBeLessAs1,
T4  toBeLessAs2 
)
inline

Returns true, if specified values a and b are less both values c and d.

Parameters
athe first value to check
bthe second value to check
cthe first value to check against
dthe second value to check against
Returns
true, if specified values a and b are less both values c and d

Definition at line 295 of file UbMath.h.

◆ lessEqual()

template<typename T1 , typename T2 >
bool ub_math::lessEqual ( const T1 &  value,
const T2 &  reference 
)
inline

Definition at line 209 of file UbMath.h.

◆ log()

template<typename T >
T ub_math::log ( const T z,
const T base 
)
inline

Definition at line 79 of file UbMath.h.

◆ max() [1/3]

template<typename T >
const T & ub_math::max ( const T a1,
const T a2 
)
inline

Definition at line 371 of file UbMath.h.

◆ max() [2/3]

template<typename T >
const T & ub_math::max ( const T a1,
const T a2,
const T a3 
)
inline

Definition at line 377 of file UbMath.h.

◆ max() [3/3]

template<typename T >
const T & ub_math::max ( const T a1,
const T a2,
const T a3,
const T a4 
)
inline

Definition at line 383 of file UbMath.h.

◆ min() [1/3]

template<typename T >
const T & ub_math::min ( const T a1,
const T a2 
)
inline

Definition at line 389 of file UbMath.h.

◆ min() [2/3]

template<typename T >
const T & ub_math::min ( const T a1,
const T a2,
const T a3 
)
inline

Definition at line 395 of file UbMath.h.

◆ min() [3/3]

template<typename T >
const T & ub_math::min ( const T a1,
const T a2,
const T a3,
const T a4 
)
inline

Definition at line 401 of file UbMath.h.

◆ negative()

template<typename T >
bool ub_math::negative ( const T value)
inline

Definition at line 165 of file UbMath.h.

◆ nonNegative()

template<typename T >
bool ub_math::nonNegative ( const T value)
inline

Definition at line 183 of file UbMath.h.

◆ nonPositive()

template<typename T >
bool ub_math::nonPositive ( const T value)
inline

Definition at line 171 of file UbMath.h.

◆ positive()

template<typename T >
bool ub_math::positive ( const T value)
inline

Definition at line 177 of file UbMath.h.

◆ round()

template<typename T >
T ub_math::round ( const T value,
const int decimalPlaces 
)
inline

Definition at line 230 of file UbMath.h.

◆ zero() [1/4]

template<>
bool ub_math::zero ( const int value)
inline

Definition at line 147 of file UbMath.h.

◆ zero() [2/4]

template<typename T >
bool ub_math::zero ( const T value)
inline

Definition at line 139 of file UbMath.h.

◆ zero() [3/4]

template<typename T1 , typename T2 >
bool ub_math::zero ( const T1 &  value1,
const T2 &  value2 
)
inline

Definition at line 153 of file UbMath.h.

◆ zero() [4/4]

template<typename T1 , typename T2 , typename T3 >
bool ub_math::zero ( const T1 &  value1,
const T2 &  value2,
const T3 value3 
)
inline

Definition at line 159 of file UbMath.h.

Variable Documentation

◆ PI

const double ub_math::PI
extern