waLBerla 7.2
|
Header file for mathematical functions and constants.
#include "MathTrait.h"
#include "core/DataTypes.h"
#include <cmath>
#include <cstddef>
#include <limits>
#include <type_traits>
Namespaces | |
namespace | walberla |
Storage for detected contacts which can be used to perform actions for all contacts, e.g. | |
namespace | walberla::math |
Functions | |
Mathematical utility functions | |
template<typename T > | |
const T | walberla::math::sign (T a) |
Sign function. | |
template<typename T > requires ( std::is_unsigned_v<T> ) | |
const T | walberla::math::abs (T a) |
Absolute value function. | |
template<typename T > requires ( !std::is_unsigned_v<T> ) | |
const T | walberla::math::abs (T a) |
template<typename T1 , typename T2 > | |
const MathTrait< T1, T2 >::High | walberla::math::min (const T1 &a, const T2 &b) |
Minimum function for two arguments. | |
template<typename T1 , typename T2 , typename T3 > | |
const MathTrait< typenameMathTrait< T1, T2 >::High, T3 >::High | walberla::math::min (const T1 &a, const T2 &b, const T3 &c) |
Minimum function for three arguments. | |
template<typename T1 , typename T2 > | |
const MathTrait< T1, T2 >::High | walberla::math::max (const T1 &a, const T2 &b) |
Maximum function for two arguments. | |
template<typename T1 , typename T2 , typename T3 > | |
const MathTrait< typenameMathTrait< T1, T2 >::High, T3 >::High | walberla::math::max (const T1 &a, const T2 &b, const T3 &c) |
Maximum function for three arguments. | |
template<typename T > | |
const T | walberla::math::sqr (const T &a) |
Square function. | |
template<typename T1 , typename T2 > | |
bool | walberla::math::equal (T1 a, T2 b) |
Generic equality check. | |
real_t | walberla::math::round (real_t a) |
Rounding function. | |