walberla::math Namespace Reference

Namespaces

 internal
 

Classes

class  BoolRandom
 
class  DistributedSample
 Class describing a distributed statistical sample. More...
 
union  DoubleAndLongLong
 
union  FloatAndLong
 
class  FunctionParser
 Function parser, for parsing and evaluating functions. More...
 
class  FunctionParserOMP
 
class  GenericAABB
 GenericAABB represents an axis-aligned bounding box. More...
 
class  IntRandom
 
class  KahanAccumulator
 
struct  leastUnsignedInteger
 Provides the smallest unsigned integer type that has at least minSize bits. More...
 
struct  Limits
 Numerical limits of built-in data types. More...
 
class  MathTrait
 Base template for the MathTrait class. More...
 
struct  MathTrait< T, T >
 
class  Matrix2
 Efficient, generic implementation of a 2x2 matrix. More...
 
class  Matrix3
 Efficient, generic implementation of a 3x3 matrix. More...
 
class  MatrixMxN
 Efficient implementation of a \( M \times N \) matrix. More...
 
class  Plane
 
class  Quaternion
 Efficient implementation of a quaternion. More...
 
class  RealRandom
 
class  Rot3
 Rotation class which merges quaternion and matrix representation. More...
 
class  Sample
 Class describing a statistical sample. More...
 
struct  SqrtTrait
 Base template for the SqrtTrait class. More...
 
struct  uintFromBitWidth
 
struct  uintFromBitWidth< 16 >
 
struct  uintFromBitWidth< 32 >
 
struct  uintFromBitWidth< 64 >
 
struct  uintFromBitWidth< 8 >
 
class  Vector2
 Efficient, generic implementation of a 2-dimensional vector. More...
 
struct  Vector2LexicographicalyLess
 Functor providing a lexicographical ordering for Vector2. More...
 
class  Vector3
 Efficient, generic implementation of a 3-dimensional vector. More...
 
struct  Vector3LexicographicalyLess
 Functor providing a lexicographical ordering for Vector3. More...
 

Typedefs

using AABB = GenericAABB< real_t >
 

Functions

constexpr real_t degToRad (real_t deg)
 Converts a degrees angle to radians. More...
 
constexpr real_t radToDeg (real_t rad)
 Converts a radians angle to degrees. More...
 
template<unsigned int numIter>
double fastInvSqrt (double y)
 Computes 1.0 / sqrt(x) with limited accuracy. More...
 
template<unsigned int numIter>
float fastInvSqrt (float y)
 Float version, for documentation see above. More...
 
template<typename T >
bool isnan (T x)
 Query if 'x' is NaN. More...
 
template<typename T >
bool isinf (T x)
 Query if 'x' is infinite. More...
 
template<typename T >
bool finite (T x)
 Query if 'x' is finite. More...
 
template<typename T , typename U >
bool operator== (const GenericAABB< T > &lhs, const GenericAABB< U > &rhs)
 Compares two GenericeAABBs for equality. More...
 
template<typename T , typename U >
bool operator!= (const GenericAABB< T > &lhs, const GenericAABB< U > &rhs)
 Compares two GenericeAABBs for inequality. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const GenericAABB< T > &aabb)
 Writes a GenericAABB to a std::ostream. More...
 
template<typename T >
std::istream & operator>> (std::istream &is, GenericAABB< T > &aabb)
 Reads an GenericAABB from a std::istream. More...
 
template<typename T , typename G , typename VT >
mpi::GenericSendBuffer< T, G > & operator<< (mpi::GenericSendBuffer< T, G > &buf, const GenericAABB< VT > &aabb)
 Serializes an GenericAABB into a mpi::GenericSendBuffer. More...
 
std::vector< uint_tgetFactors (const uint_t number, const uint_t numberOfFactors)
 Computes and returns an integer factorization of any arbitrary integer. More...
 
std::vector< uint_tgetFactors (const uint_t number, const uint_t numberOfFactors, const std::vector< real_t > &weight)
 
Vector3< uint_tgetFactors3D (const uint_t number)
 
Vector3< uint_tgetFactors3D (const uint_t number, const Vector3< real_t > &weights)
 
template<typename Iterator >
std::iterator_traits< Iterator >::value_type kahanSummation (const Iterator &begin, const Iterator &end)
 
template<typename Type >
const Matrix3< Type > operator- (const Matrix3< Type > &rhs)
 Negation operator for the negation of one matrix. More...
 
std::ostream & operator<< (std::ostream &os, const Plane &plane)
 
std::istream & operator>> (std::istream &is, Plane &plane)
 
bool isPrime (const uint_t n)
 Query if n is prime. More...
 
std::vector< uint_tgetPrimes (const uint_t n)
 Determine prime numbers up to an upper bound. More...
 
std::vector< uint_tgetPrimeFactors (const uint_t n)
 Gets all prime factors of a number. More...
 
std::set< uint_tgetDevisors (const uint_t n)
 Gets all devisors of a number n. More...
 
void seedRandomGenerator (const std::mt19937::result_type &seed)
 
template<typename INT >
INT intRandom (const INT min, const INT max, std::mt19937 &generator)
 Returns a random integral number of type INT in the range [min,max] (max included!) More...
 
template<>
char intRandom< char > (const char min, const char max, std::mt19937 &generator)
 
template<>
unsigned char intRandom< unsigned char > (const unsigned char min, const unsigned char max, std::mt19937 &generator)
 
template<>
signed char intRandom< signed char > (const signed char min, const signed char max, std::mt19937 &generator)
 
template<typename INT >
INT intRandom (const INT min)
 
template<typename INT >
INT intRandom (const INT min, const INT max)
 
template<typename INT >
INT intRandom ()
 
template<typename REAL_TYPE = real_t>
REAL_TYPE realRandom (const REAL_TYPE min=REAL_TYPE(0), const REAL_TYPE max=REAL_TYPE(1), std::mt19937 &generator=internal::getGenerator())
 Returns a random floating point number of type REAL in the range [min,max) (max excluded!) More...
 
bool boolRandom ()
 
template<typename Type >
std::ostream & operator<< (std::ostream &os, const Rot3< Type > &r)
 
template<typename Type >
void rotateAroundPoint (Vector3< Type > &pos, Rot3< Type > &rot, const Vector3< Type > &rotateAround, const Rot3< Type > &dRot)
 
std::ostream & operator<< (std::ostream &os, const Sample &statReal)
 Stream output operator for class Sample. More...
 
template<typename T , typename G >
mpi::GenericSendBuffer< T, G > & operator<< (mpi::GenericSendBuffer< T, G > &buf, const Sample &statReal)
 
template<typename T >
mpi::GenericRecvBuffer< T > & operator>> (mpi::GenericRecvBuffer< T > &buf, Sample &statReal)
 
template<typename Type >
void clear (Type &clearable)
 Clearing the given value/object to the default state. More...
 
float inv (float a)
 Inverting the given single precision value. More...
 
double inv (double a)
 Inverting the given double precision value. More...
 
long double inv (long double a)
 Inverting the given long double value. More...
 
template<typename Type >
bool isDefault (const Type &v)
 Returns whether the given value/object is in default state. More...
 
template<typename Type >
void reset (Type &resettable)
 Resetting the given value/object to the default value. More...
 
template<typename T >
const T sq (const T &a)
 Squaring the given value/object. More...
 
template<>
uint_t uintMSBPosition< uint64_t > (uint64_t value)
 
template<typename UINT >
bool uintIsEven (const UINT value)
 Returns true only if 'value' is an even number. More...
 
template<typename UINT >
bool uintIsPowerOfTwo (const UINT value)
 Returns true only if 'value' (must be an unsigned integer) is a power of 2 (http://graphics.stanford.edu/~seander/bithacks.html) More...
 
template<typename UINT >
UINT uintPow2 (const UINT exp)
 Returns the result of 2^exp. More...
 
template<typename UINT >
UINT uintPow4 (UINT exp)
 Returns the result of 4^exp. More...
 
template<typename UINT >
UINT uintPow8 (UINT exp)
 Returns the result of 8^exp. More...
 
template<typename UINT >
UINT uintPow16 (UINT exp)
 Returns the result of 16^exp. More...
 
template<typename UINT >
uint_t uintMSBPosition (UINT value)
 Calculation of the position of the most significant bit of a variable of type UINT. More...
 
template<>
uint_t uintMSBPosition< uint32_t > (uint32_t value)
 
template<>
uint_t uintMSBPosition< uint16_t > (uint16_t value)
 
template<>
uint_t uintMSBPosition< uint8_t > (uint8_t value)
 
constexpr uint_t leastUnsignedIntegerBitWidth (uint_t width)
 
template<typename Type >
Vector3< Type > cross (const Vector3< Type > &lhs, const Vector3< Type > &rhs)
 Cross product (outer product) of two vectors ( \( \vec{a}=\vec{b}\times\vec{c} \)). More...
 
template<typename Type , typename Other >
Vector3< typename MathTrait< Type, Other >::High > operator/ (Other lhs, const Vector3< Type > &rhs)
 

Variables

constexpr real_t e = real_t(2.7182818284590452354)
 
constexpr real_t log2_e = real_t(1.4426950408889634074)
 
constexpr real_t log10_e = real_t(0.43429448190325182765)
 
constexpr real_t ln_two = real_t(0.69314718055994530942)
 
constexpr real_t ln_ten = real_t(2.30258509299404568402)
 
constexpr real_t pi = real_t(3.14159265358979323846)
 
constexpr real_t half_pi = real_t(1.57079632679489661923)
 
constexpr real_t fourth_pi = real_t(0.78539816339744830962)
 
constexpr real_t one_div_pi = real_t(0.31830988618379067154)
 
constexpr real_t two_div_pi = real_t(0.63661977236758134308)
 
constexpr real_t two_div_root_pi = real_t(1.12837916709551257390)
 
constexpr real_t root_two = real_t(1.41421356237309504880)
 
constexpr real_t one_div_root_two = real_t(0.70710678118654752440)
 
constexpr real_t root_three = real_t(1.73205080757)
 
constexpr real_t one_div_root_three = real_t(0.57735026919)
 
static const uint8_t msbLookupTable [256]
 

Typedef Documentation

◆ AABB

Function Documentation

◆ abs() [1/7]

template<typename Type >
const Matrix2< Type > walberla::math::abs ( const Matrix2< Type > &  m)
inline

Returns a matrix containing the absolute values of each single element of m.

Parameters
mThe integral input matrix.
Returns
The absolute value of each single element of m.

The abs function calculates the absolute value of each element of the input matrix m. This function can only be applied to matrices of integral data type. For floating point matrices, the pe::fabs( const Matrix2& ) function can be used.

◆ abs() [2/7]

template<typename Type >
const Matrix3< Type > walberla::math::abs ( const Matrix3< Type > &  m)
inline

Returns a matrix containing the absolute values of each single element of m.

Parameters
mThe integral input matrix.
Returns
The absolute value of each single element of m.

The abs function calculates the absolute value of each element of the input matrix m. This function can only be applied to matrices of integral data type. For floating point matrices, the pe::fabs( const Matrix3& ) function can be used.

◆ abs() [3/7]

template<typename Type >
const Vector2< Type > walberla::math::abs ( const Vector2< Type > &  v)
inline

Returns a vector containing the absolute values of each single element of v.

Parameters
vThe integral input vector.
Returns
The absolute value of each single element of v.

The abs function calculates the absolute value of each element of the input vector v. This function can only be applied to vectors of integral data type. For floating point vectors, the pe::fabs( const Vector2& ) function can be used.

◆ abs() [4/7]

template<typename Type >
const Vector3< Type > walberla::math::abs ( const Vector3< Type > &  v)
inline

Returns a vector containing the absolute values of each single element of v.

Parameters
vThe integral input vector.
Returns
The absolute value of each single element of v.

The abs function calculates the absolute value of each element of the input vector v. This function can only be applied to vectors of integral data type. For floating point vectors, the pe::fabs( const Vector3& ) function can be used.

◆ abs() [5/7]

template<typename T >
const std::enable_if< ! std::is_unsigned<T>::value, T >::type walberla::math::abs ( a)
inline

Absolute value function.

Parameters
aThe value.
Returns
The value if it is greater than or equal to zero, -1 times the value if the value is smaller than zero.

◆ abs() [6/7]

template<typename T >
const std::enable_if< std::is_unsigned< T >::value, T >::type walberla::math::abs ( a)
inline

Absolute value function.

Parameters
aThe value.
Returns
The value if it is greater than or equal to zero, -1 times the value if the value is smaller than zero.

◆ abs() [7/7]

template<typename T >
const std::enable_if< !std::is_unsigned<T>::value, T >::type walberla::math::abs ( a)
inline

Absolute value function.

Parameters
aThe value.
Returns
The value if it is greater than or equal to zero, -1 times the value if the value is smaller than zero.

◆ boolRandom()

bool walberla::math::boolRandom ( )
inline

< Randomly returns 'true' or 'false'

◆ clear() [1/3]

template<typename Type >
void walberla::math::clear ( MatrixMxN< Type > &  m)
inline

Clearing the given dense matrix.

Parameters
mThe dense matrix to be cleared.
Returns
void

◆ clear() [2/3]

template<typename Type >
void walberla::math::clear ( Quaternion< Type > &  q)
inline

Clearing the given quaternion.

Parameters
qThe quaternion to be cleared.
Returns
void

Clearing a quaternion is equivalent to resetting it via the reset() function.

◆ clear() [3/3]

template<typename Type >
void walberla::math::clear ( Type &  clearable)
inline

Clearing the given value/object to the default state.

Parameters
clearableThe value/object to be cleared.
Returns
void

The clear shim represents an abstract interface for clearing a value/object of any given data type to its default state. Values of built-in data type are reset to zero.

◆ cross()

template<typename Type >
Vector3<Type> walberla::math::cross ( const Vector3< Type > &  lhs,
const Vector3< Type > &  rhs 
)
inline

Cross product (outer product) of two vectors ( \( \vec{a}=\vec{b}\times\vec{c} \)).

Parameters
lhsThe left-hand-side vector for the cross product.
rhsThe right-hand-side vector for the cross product.
Returns
The cross product.

◆ degToRad()

constexpr real_t walberla::math::degToRad ( real_t  deg)
constexpr

Converts a degrees angle to radians.

◆ dot()

template<typename T >
real_t walberla::math::dot ( const Vector3< T > &  v1,
const Vector3< T > &  v2 
)

Dot product of two vectors.

◆ dyadicProduct()

template<typename Type >
const Matrix3<Type> walberla::math::dyadicProduct ( const Vector3< Type > &  vec1,
const Vector3< Type > &  vec2 
)
inline

Dyadic product of two vectors ( \( M = u \otimes v \)).

Parameters
vec1The first vector argument.
vec2The second vector argument.
Returns
The matrix \( u \otimes v \).

◆ equal()

template<typename T1 , typename T2 >
bool walberla::math::equal ( T1  a,
T2  b 
)
inline

Generic equality check.

Parameters
aFirst value.
bSecond value.
Returns
true if the two values are equal, false if not.

Generic equal function for the comparison of two numeric values. Depending on the types of the two arguments, a special comparison for floating point values is selected that takes the limited machine accuracy into account.

◆ fabs() [1/4]

template<typename Type >
const Matrix2< Type > walberla::math::fabs ( const Matrix2< Type > &  m)
inline

Returns a matrix containing the absolute values of each single element of m.

Parameters
mThe floating point input matrix.
Returns
The absolute value of each single element of m.

The fabs function calculates the absolute value of each element of the input matrix m. This function can only be applied to floating point matrices. For matrices of integral data type, the pe::abs( const Matrix2& ) function can be used.

◆ fabs() [2/4]

template<typename Type >
const Matrix3< Type > walberla::math::fabs ( const Matrix3< Type > &  m)
inline

Returns a matrix containing the absolute values of each single element of m.

Parameters
mThe floating point input matrix.
Returns
The absolute value of each single element of m.

The fabs function calculates the absolute value of each element of the input matrix m. This function can only be applied to floating point matrices. For matrices of integral data type, the pe::abs( const Matrix3& ) function can be used.

◆ fabs() [3/4]

template<typename Type >
const Vector2< Type > walberla::math::fabs ( const Vector2< Type > &  v)
inline

Returns a vector containing the absolute values of each single element of v.

Parameters
vThe floating point input vector.
Returns
The absolute value of each single element of v.

The fabs function calculates the absolute value of each element of the input vector v. This function can only be applied to floating point vectors. For vectors of integral data type, the pe::abs( const Vector2& ) function can be used.

◆ fabs() [4/4]

template<typename Type >
const Vector3< Type > walberla::math::fabs ( const Vector3< Type > &  v)
inline

Returns a vector containing the absolute values of each single element of v.

Parameters
vThe floating point input vector.
Returns
The absolute value of each single element of v.

The fabs function calculates the absolute value of each element of the input vector v. This function can only be applied to floating point vectors. For vectors of integral data type, the pe::abs( const Vector3& ) function can be used.

◆ fastInvSqrt() [1/2]

template<unsigned int numIter>
double walberla::math::fastInvSqrt ( double  y)
inline

Computes 1.0 / sqrt(x) with limited accuracy.

The bigger y is ( relative to 1 ) the better the approximation

Template Parameters
numIternumber of iterations higher numbers make the function slower but result more accurate

◆ fastInvSqrt() [2/2]

template<unsigned int numIter>
float walberla::math::fastInvSqrt ( float  y)
inline

Float version, for documentation see above.

◆ finite() [1/2]

template<typename Type >
bool walberla::math::finite ( const Vector3< Type > &  v)
inline

Checks if the given vector has only finite elements.

Parameters
vThe vector to be checked for only having finite elements.
Returns
true if all elements of the vector are finite, false otherwise.

◆ finite() [2/2]

template<typename T >
bool walberla::math::finite ( x)

Query if 'x' is finite.

Parameters
xValue to be checked.
Returns
true if x is not NaN and not infinite, else false.

◆ getDevisors()

std::set< uint_t > walberla::math::getDevisors ( const uint_t  n)

Gets all devisors of a number n.

Computes all unique products of n's prime factors.

Parameters
nThe number the devisors are computed for.
Precondition
n > 0
Returns
A set of the devisors including 1 and n

◆ getFactors() [1/2]

std::vector< uint_t > walberla::math::getFactors ( const uint_t  number,
const uint_t  numberOfFactors 
)

Computes and returns an integer factorization of any arbitrary integer.

Goal: returned factors should roughly be of equal size Typical use case: uniform process distribution

Parameters
numberinteger to factorize
numberOfFactorsnumber of factors to create (= size of returned vector)

◆ getFactors() [2/2]

std::vector< uint_t > walberla::math::getFactors ( const uint_t  number,
const uint_t  numberOfFactors,
const std::vector< real_t > &  weight 
)

◆ getFactors3D() [1/2]

Vector3< uint_t > walberla::math::getFactors3D ( const uint_t  number)

◆ getFactors3D() [2/2]

Vector3< uint_t > walberla::math::getFactors3D ( const uint_t  number,
const Vector3< real_t > &  weights 
)

◆ getPrimeFactors()

std::vector< uint_t > walberla::math::getPrimeFactors ( const uint_t  n)

Gets all prime factors of a number.

Uses trial division algorithm. See http://en.wikipedia.org/w/index.php?title=Trial_division&oldid=518625973.

Parameters
nThe number to be factorized.
Precondition
n > 0
Returns
The prime factors in ascending order.

◆ getPrimes()

std::vector< uint_t > walberla::math::getPrimes ( const uint_t  n)

Determine prime numbers up to an upper bound.

Uses the 'Sieve of Eratosthenes' algorithm. See http://en.wikipedia.org/w/index.php?title=Sieve_of_Eratosthenes&oldid=527676398.

Parameters
nThe maximum prime number.
Returns
All prime numbers <= n in ascending order.

◆ hash_value() [1/2]

template<typename T , typename Enable = std::enable_if_t<std::is_integral<T>::value>>
std::size_t walberla::math::hash_value ( const Vector2< T > &  v)

Function providing a hash value for Vector2.

Template Parameters
TDatatype of the Vector2's elements (only integers are supported).
Parameters
vThe vector the hash is computed for.
Returns
A hash for the entire Vector2.

◆ hash_value() [2/2]

template<typename T , typename Enable = std::enable_if_t<std::is_integral<T>::value>>
std::size_t walberla::math::hash_value ( const Vector3< T > &  v)

Function providing a hash value for Vector3.

Template Parameters
TDatatype of the Vector3's elements (only integers are supported).
Parameters
vThe vector the hash is computed for.
Returns
A hash for the entire Vector3.

◆ intRandom() [1/4]

template<typename INT >
INT walberla::math::intRandom ( )

◆ intRandom() [2/4]

template<typename INT >
INT walberla::math::intRandom ( const INT  min)

◆ intRandom() [3/4]

template<typename INT >
INT walberla::math::intRandom ( const INT  min,
const INT  max 
)

◆ intRandom() [4/4]

template<typename INT >
INT walberla::math::intRandom ( const INT  min,
const INT  max,
std::mt19937 &  generator 
)

Returns a random integral number of type INT in the range [min,max] (max included!)

◆ intRandom< char >()

template<>
char walberla::math::intRandom< char > ( const char  min,
const char  max,
std::mt19937 &  generator 
)
inline

◆ intRandom< signed char >()

template<>
signed char walberla::math::intRandom< signed char > ( const signed char  min,
const signed char  max,
std::mt19937 &  generator 
)
inline

◆ intRandom< unsigned char >()

template<>
unsigned char walberla::math::intRandom< unsigned char > ( const unsigned char  min,
const unsigned char  max,
std::mt19937 &  generator 
)
inline

◆ inv() [1/5]

template<typename Type >
const MatrixMxN< Type > walberla::math::inv ( const MatrixMxN< Type > &  m)
inline

Inverting the given dense matrix.

Parameters
mThe dense matrix to be inverted.
Returns
The inverse of the matrix.

This function returns the inverse of the given dense matrix. It has the same effect as calling the getInverse() member function of the matrix.

◆ inv() [2/5]

template<typename Type >
const Quaternion< Type > walberla::math::inv ( const Quaternion< Type > &  q)
inline

Inverting the given quaternion.

Parameters
qThe quaternion to be inverted.
Returns
The inverse quaternion.

This function returns the inverse of the given quaternion. It has the same effect as calling the getInverse() member function of the quaternion.

◆ inv() [3/5]

double walberla::math::inv ( double  a)
inline

Inverting the given double precision value.

Parameters
aThe double precision value to be inverted.
Returns
The inverse of the given value.

The invert shim represents an abstract interface for inverting a value/object of any given data type. For double precision floating point values this results in \( \frac{1}{a} \).

◆ inv() [4/5]

float walberla::math::inv ( float  a)
inline

Inverting the given single precision value.

Parameters
aThe single precision value to be inverted.
Returns
The inverse of the given value.

The invert shim represents an abstract interface for inverting a value/object of any given data type. For single precision floating point values this results in \( \frac{1}{a} \).

◆ inv() [5/5]

long double walberla::math::inv ( long double  a)
inline

Inverting the given long double value.

Parameters
aThe long double value to be inverted.
Returns
The inverse of the given value.

The invert shim represents an abstract interface for inverting a value/object of any given data type. For long double floating point values this results in \( \frac{1}{a} \).

◆ isDefault() [1/3]

template<typename Type >
bool walberla::math::isDefault ( const MatrixMxN< Type > &  m)
inline

Returns whether the given dense matrix is in default state.

Parameters
mThe dense matrix to be tested for its default state.
Returns
true in case the given matrix is component-wise zero, false otherwise.

◆ isDefault() [2/3]

template<typename Type >
bool walberla::math::isDefault ( const Quaternion< Type > &  q)
inline

Returns whether the given quaternion is in default state.

Parameters
qThe quaternion to be tested for its default state.
Returns
true in case the given quaternion is in default state, false otherwise.

The function returns true in case the real part of the quaternion is 1 and the imaginary parts are 0, otherwise it returns false.

                      \f[\left(\begin{array}{*{4}{c}}
                      1 & 0 & 0 & 0 \\
                      \end{array}\right)\f]

◆ isDefault() [3/3]

template<typename Type >
bool walberla::math::isDefault ( const Type &  v)
inline

Returns whether the given value/object is in default state.

Parameters
vThe value/object to be tested for its default state.
Returns
true in case the given value/object is in its default state, false otherwise.

The isDefault shim represents an abstract interface for testing a value/object whether it is in its default state or not. In case the value/object is in its default state, the function returns true, otherwise it returns false. For built-in data types, the function returns true in case the current value is zero.

const int i = 0; // isDefault( i ) returns true
double d = 2.0; // isDefault( d ) returns false
Vec3 v1; // isDefault( v1 ) returns true
Vec3 v2( 0, 0, 0 ); // isDefault( v2 ) returns true since (0,0,0) is the default state
Vec3 v3( 1, 2, 3 ); // isDefault( v3 ) returns false

◆ isinf() [1/3]

template<typename Type >
bool walberla::math::isinf ( const Matrix3< Type > &  m)
inline

Checks the given matrix for infinite elements.

Parameters
mThe matrix to be checked for infinite elements.
Returns
true if at least one element of the matrix is infinite, false otherwise.

◆ isinf() [2/3]

template<typename Type >
bool walberla::math::isinf ( const Vector3< Type > &  v)
inline

Checks the given vector for infinite elements.

Parameters
vThe vector to be checked for infinite elements.
Returns
true if at least one element of the vector is infinite, false otherwise.

◆ isinf() [3/3]

template<typename T >
bool walberla::math::isinf ( x)
inline

Query if 'x' is infinite.

Parameters
xValue to be checked.
Returns
true if x is infinite, else false.

◆ isnan() [1/7]

template<typename Type >
bool walberla::math::isnan ( const Matrix2< Type > &  m)
inline

Checks the given matrix for not-a-number elements.

Parameters
mThe matrix to be checked for not-a-number elements.
Returns
true if at least one element of the matrix is not-a-number, false otherwise.

◆ isnan() [2/7]

template<typename Type >
bool walberla::math::isnan ( const Matrix3< Type > &  m)
inline

Checks the given matrix for not-a-number elements.

Parameters
mThe matrix to be checked for not-a-number elements.
Returns
true if at least one element of the matrix is not-a-number, false otherwise.

◆ isnan() [3/7]

template<typename Type >
bool walberla::math::isnan ( const MatrixMxN< Type > &  m)
inline

Checks the given matrix for not-a-number elements.

Parameters
mThe matrix to be checked for not-a-number elements.
Returns
true if at least one element of the matrix is not-a-number, false otherwise.

◆ isnan() [4/7]

template<typename Type >
bool walberla::math::isnan ( const Quaternion< Type > &  q)
inline

Checks the given quaternion for not-a-number elements.

Parameters
qThe quaternion to be checked for not-a-number elements.
Returns
true if at least one element of the quaternion is not-a-number, false otherwise.

◆ isnan() [5/7]

template<typename Type >
bool walberla::math::isnan ( const Vector2< Type > &  v)
inline

Checks the given vector for not-a-number elements.

Parameters
vThe vector to be checked for not-a-number elements.
Returns
true if at least one element of the vector is not-a-number, false otherwise.

◆ isnan() [6/7]

template<typename Type >
bool walberla::math::isnan ( const Vector3< Type > &  v)
inline

Checks the given vector for not-a-number elements.

Parameters
vThe vector to be checked for not-a-number elements.
Returns
true if at least one element of the vector is not-a-number, false otherwise.

◆ isnan() [7/7]

template<typename T >
bool walberla::math::isnan ( x)
inline

Query if 'x' is NaN.

Parameters
xValue to be checked.
Returns
true if x is NaN, else false.

◆ isPrime()

bool walberla::math::isPrime ( const uint_t  n)

Query if n is prime.

Parameters
nThe number to be checked.
Returns
true if n is prime, false if not.

◆ kahanSummation()

template<typename Iterator >
std::iterator_traits< Iterator >::value_type walberla::math::kahanSummation ( const Iterator &  begin,
const Iterator &  end 
)

◆ leastUnsignedIntegerBitWidth()

constexpr uint_t walberla::math::leastUnsignedIntegerBitWidth ( uint_t  width)
constexpr

◆ length()

template<typename T >
real_t walberla::math::length ( const Vector3< T > &  v)

Length of the vector.

Returns
Length of the vector.

◆ max() [1/2]

template<typename T1 , typename T2 >
const MathTrait< T1, T2 >::High walberla::math::max ( const T1 &  a,
const T2 &  b 
)
inline

Maximum function for two arguments.

Parameters
aFirst value.
bSecond value.
Returns
The maximum of the two values.

This function returns the maximum of the two given data values. The return type of the function is determined by the data types of the given arguments (for further detail see the MathTrait class description).

◆ max() [2/2]

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 
)
inline

Maximum function for three arguments.

Parameters
aFirst value.
bSecond value.
cThird value.
Returns
The maximum of the three values.

This function returns the maximum of the three given data values. The return type of the function is determined by the data types of the given arguments (for further detail see the MathTrait class description).

◆ min() [1/2]

template<typename T1 , typename T2 >
const MathTrait< T1, T2 >::High walberla::math::min ( const T1 &  a,
const T2 &  b 
)
inline

Minimum function for two arguments.

Parameters
aFirst value.
bSecond value.
Returns
The minimum of the two values.

This function returns the minimum of the two given data values. The return type of the function is determined by the data types of the given arguments (for further detail see the MathTrait class description).

◆ min() [2/2]

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 
)
inline

Minimum function for three arguments.

Parameters
aFirst value.
bSecond value.
cThird value
Returns
The minimum of the three values.

This function returns the minimum of the three given data values. The return type of the function is determined by the data types of the given arguments (for further detail see the MathTrait class description).

◆ normalize() [1/2]

template<typename T >
Vector2< T > & walberla::math::normalize ( Vector2< T > &  v)

Normalization of the vector ( \(|\vec{a}|=1\)).

Precondition
\(|\vec{a}|\neq0\)
Returns
Reference to the normalized vector.

Normalization of the vector to a length of 1. If you want to normalize a vector of integral T use member function getNormalized() instead

◆ normalize() [2/2]

template<typename T >
Vector3< T > & walberla::math::normalize ( Vector3< T > &  v)

Normalization of the vector ( \(|\vec{a}|=1\)).

Precondition
\(|\vec{a}|\neq0\)
Returns
Reference to the normalized vector.

Normalization of the vector to a length of 1. If you want to normalize a vector of integral T use member function getNormalized() instead

◆ normals()

template<typename Type >
void walberla::math::normals ( const Vector3< Type > &  v,
Vector3< Type > &  defNor,
Vector3< Type > &  comNor 
)
inline

◆ operator!=() [1/28]

template<typename Type >
bool walberla::math::operator!= ( char  scalar,
const Vector2< Type > &  vec 
)
inline

Inequality operator for the comparison of a char scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [2/28]

template<typename Type >
bool walberla::math::operator!= ( char  scalar,
const Vector3< Type > &  vec 
)
inline

Inequality operator for the comparison of a char scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [3/28]

template<typename T , typename U >
bool walberla::math::operator!= ( const GenericAABB< T > &  lhs,
const GenericAABB< U > &  rhs 
)
inline

Compares two GenericeAABBs for inequality.

see isEqual

ATTENTION: Does not check for non-identity! If you need to check for non-identity, use member function isIdentical of class GenericAABB

Parameters
lhsAn arbitrary GenericAABB
rhsAn arbitrary GenericAABB
Returns
false, if lhs is equal to rhs, true else

◆ operator!=() [4/28]

template<typename T1 , typename T2 >
bool walberla::math::operator!= ( const Quaternion< T1 > &  lhs,
const Quaternion< T2 > &  rhs 
)
inline

Inequality operator for the comparison of two quaternions.

Parameters
lhsThe left-hand side quaternion for the comparison.
rhsThe right-hand side quaternion for the comparison.
Returns
true if the two quaternions are not equal, false if they are equal.

◆ operator!=() [5/28]

template<typename Type >
bool walberla::math::operator!= ( double  scalar,
const Vector2< Type > &  vec 
)
inline

Inequality operator for the comparison of a double scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [6/28]

template<typename Type >
bool walberla::math::operator!= ( double  scalar,
const Vector3< Type > &  vec 
)
inline

Inequality operator for the comparison of a double scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [7/28]

template<typename Type >
bool walberla::math::operator!= ( float  scalar,
const Vector2< Type > &  vec 
)
inline

Inequality operator for the comparison of a float scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [8/28]

template<typename Type >
bool walberla::math::operator!= ( float  scalar,
const Vector3< Type > &  vec 
)
inline

Inequality operator for the comparison of a float scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [9/28]

template<typename Type >
bool walberla::math::operator!= ( int  scalar,
const Vector2< Type > &  vec 
)
inline

Inequality operator for the comparison of an int scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [10/28]

template<typename Type >
bool walberla::math::operator!= ( int  scalar,
const Vector3< Type > &  vec 
)
inline

Inequality operator for the comparison of an int scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [11/28]

template<typename Type >
bool walberla::math::operator!= ( long double  scalar,
const Vector2< Type > &  vec 
)
inline

Inequality operator for the comparison of a long double scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [12/28]

template<typename Type >
bool walberla::math::operator!= ( long double  scalar,
const Vector3< Type > &  vec 
)
inline

Inequality operator for the comparison of a long double scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [13/28]

template<typename Type >
bool walberla::math::operator!= ( long  scalar,
const Vector2< Type > &  vec 
)
inline

Inequality operator for the comparison of a long scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [14/28]

template<typename Type >
bool walberla::math::operator!= ( long  scalar,
const Vector3< Type > &  vec 
)
inline

Inequality operator for the comparison of a long scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [15/28]

template<typename Type >
bool walberla::math::operator!= ( short  scalar,
const Vector2< Type > &  vec 
)
inline

Inequality operator for the comparison of a short scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [16/28]

template<typename Type >
bool walberla::math::operator!= ( short  scalar,
const Vector3< Type > &  vec 
)
inline

Inequality operator for the comparison of a short scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [17/28]

template<typename Type >
bool walberla::math::operator!= ( signed char  scalar,
const Vector2< Type > &  vec 
)
inline

Inequality operator for the comparison of a signed char scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [18/28]

template<typename Type >
bool walberla::math::operator!= ( signed char  scalar,
const Vector3< Type > &  vec 
)
inline

Inequality operator for the comparison of a signed char scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [19/28]

template<typename Type >
bool walberla::math::operator!= ( unsigned char  scalar,
const Vector2< Type > &  vec 
)
inline

Inequality operator for the comparison of an unsigned char scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [20/28]

template<typename Type >
bool walberla::math::operator!= ( unsigned char  scalar,
const Vector3< Type > &  vec 
)
inline

Inequality operator for the comparison of an unsigned char scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [21/28]

template<typename Type >
bool walberla::math::operator!= ( unsigned int  scalar,
const Vector2< Type > &  vec 
)
inline

◆ operator!=() [22/28]

template<typename Type >
bool walberla::math::operator!= ( unsigned int  scalar,
const Vector3< Type > &  vec 
)
inline

◆ operator!=() [23/28]

template<typename Type >
bool walberla::math::operator!= ( unsigned long  scalar,
const Vector2< Type > &  vec 
)
inline

Inequality operator for the comparison of an unsigned long scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [24/28]

template<typename Type >
bool walberla::math::operator!= ( unsigned long  scalar,
const Vector3< Type > &  vec 
)
inline

Inequality operator for the comparison of an unsigned long scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [25/28]

template<typename Type >
bool walberla::math::operator!= ( unsigned short  scalar,
const Vector2< Type > &  vec 
)
inline

Inequality operator for the comparison of an unsigned short scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [26/28]

template<typename Type >
bool walberla::math::operator!= ( unsigned short  scalar,
const Vector3< Type > &  vec 
)
inline

Inequality operator for the comparison of an unsigned short scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [27/28]

template<typename Type >
bool walberla::math::operator!= ( wchar_t  scalar,
const Vector2< Type > &  vec 
)
inline

Inequality operator for the comparison of a wchar_t scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator!=() [28/28]

template<typename Type >
bool walberla::math::operator!= ( wchar_t  scalar,
const Vector3< Type > &  vec 
)
inline

Inequality operator for the comparison of a wchar_t scalar value and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If one value of the vector is inequal to the scalar value, the inequality test returns true, otherwise false.

◆ operator*() [1/5]

template<typename T1 , typename T2 >
const Quaternion< typename MathTrait< T1, T2 >::MultType > walberla::math::operator* ( const Quaternion< T1 > &  lhs,
const Quaternion< T2 > &  rhs 
)
inline

Multiplication operator for the multiplication of two quaternions ( \( \hat{q}=\hat{p}*\hat{r} \)).

Parameters
lhsThe left-hand side quaternion for the multiplication.
rhsThe right-hand side quaternion for the multiplication.
Returns
The resulting quaternion.

◆ operator*() [2/5]

template<typename Type , typename Other >
const Matrix2< Type > walberla::math::operator* ( Other  scalar,
const Matrix2< Type > &  matrix 
)
inline

Multiplication operator for the multiplication of a scalar value and a matrix.

( \( A=s*B \)).

Parameters
scalarThe left-hand-side scalar value for the multiplication.
matrixThe right-hand-side matrix for the multiplication.
Returns
The scaled result matrix.

◆ operator*() [3/5]

template<typename Type , typename Other >
const Matrix3< Type > walberla::math::operator* ( Other  scalar,
const Matrix3< Type > &  matrix 
)
inline

Multiplication operator for the multiplication of a scalar value and a matrix.

( \( A=s*B \)).

Parameters
scalarThe left-hand-side scalar value for the multiplication.
matrixThe right-hand-side matrix for the multiplication.
Returns
The scaled result matrix.

◆ operator*() [4/5]

template<typename Type , typename Other >
Vector2< HIGH > walberla::math::operator* ( Other  scalar,
const Vector2< Type > &  vec 
)
inline

Multiplication operator for the multiplication of a scalar value and a vector.

( \( \vec{a}=s*\vec{b} \)).

Parameters
scalarThe left-hand-side scalar value for the multiplication.
vecThe right-hand-side vector for the multiplication.
Returns
The scaled result vector.

◆ operator*() [5/5]

template<typename Type , typename Other >
Vector3< HIGH > walberla::math::operator* ( Other  scalar,
const Vector3< Type > &  vec 
)
inline

Multiplication operator for the multiplication of a scalar value and a vector.

( \( \vec{a}=s*\vec{b} \)).

Parameters
scalarThe left-hand-side scalar value for the multiplication.
vecThe right-hand-side vector for the multiplication.
Returns
The scaled result vector.

◆ operator-()

template<typename Type >
const Matrix3< Type > walberla::math::operator- ( const Matrix3< Type > &  rhs)
inline

Negation operator for the negation of one matrix.

Parameters
rhsThe right-hand-side matrix of the operator.
Returns
The negative matrix.

◆ operator/()

template<typename Type , typename Other >
Vector3< typename MathTrait<Type,Other>::High > walberla::math::operator/ ( Other  lhs,
const Vector3< Type > &  rhs 
)
inline

◆ operator<<() [1/12]

template<typename T , typename G , typename VT >
mpi::GenericSendBuffer< T, G > & walberla::math::operator<< ( mpi::GenericSendBuffer< T, G > &  buf,
const GenericAABB< VT > &  aabb 
)
inline

Serializes an GenericAABB into a mpi::GenericSendBuffer.

Parameters
bufThe mpi::GenericSendBuffer written to
aabbThe GenericAABB the be serialized
Returns
A reference to buf

◆ operator<<() [2/12]

template<typename T , typename G , typename MT >
mpi::GenericSendBuffer<T,G>& walberla::math::operator<< ( mpi::GenericSendBuffer< T, G > &  buf,
const Matrix2< MT > &  m 
)

◆ operator<<() [3/12]

template<typename T , typename G >
mpi::GenericSendBuffer<T,G>& walberla::math::operator<< ( mpi::GenericSendBuffer< T, G > &  buf,
const Sample statReal 
)

◆ operator<<() [4/12]

template<typename T >
std::ostream & walberla::math::operator<< ( std::ostream &  os,
const GenericAABB< T > &  aabb 
)
inline

Writes a GenericAABB to a std::ostream.

The format is [ <0,0,0>, <1,1,1> ]

Parameters
osThe std::ostream written to
aabbThe GenericAABB written
Returns
A reference to os

◆ operator<<() [5/12]

template<typename Type >
std::ostream & walberla::math::operator<< ( std::ostream &  os,
const Matrix2< Type > &  m 
)

Global output operator for 2x2 matrices.

Parameters
osReference to the output stream.
mReference to a constant matrix object.
Returns
Reference to the output stream.

◆ operator<<() [6/12]

template<typename Type >
std::ostream & walberla::math::operator<< ( std::ostream &  os,
const Matrix3< Type > &  m 
)

Global output operator for 3x3 matrices.

Parameters
osReference to the output stream.
mReference to a constant matrix object.
Returns
Reference to the output stream.

◆ operator<<() [7/12]

std::ostream& walberla::math::operator<< ( std::ostream &  os,
const Plane plane 
)

◆ operator<<() [8/12]

template<typename Type >
std::ostream & walberla::math::operator<< ( std::ostream &  os,
const Quaternion< Type > &  q 
)

Global output operator for quaternions.

Parameters
osReference to the output stream.
qReference to a constant quaternion object.
Returns
Reference to the output stream.

◆ operator<<() [9/12]

template<typename Type >
std::ostream& walberla::math::operator<< ( std::ostream &  os,
const Rot3< Type > &  r 
)
inline

◆ operator<<() [10/12]

std::ostream & walberla::math::operator<< ( std::ostream &  os,
const Sample statReal 
)

Stream output operator for class Sample.

◆ operator<<() [11/12]

template<typename Type >
std::ostream & walberla::math::operator<< ( std::ostream &  os,
const Vector2< Type > &  v 
)

Global output operator for 2-dimensional vectors.

Parameters
osReference to the output stream.
vReference to a constant vector object.
Returns
Reference to the output stream.

◆ operator<<() [12/12]

template<typename Type >
std::ostream & walberla::math::operator<< ( std::ostream &  os,
const Vector3< Type > &  v 
)

Global output operator for 3-dimensional vectors.

Parameters
osReference to the output stream.
vReference to a constant vector object.
Returns
Reference to the output stream.

◆ operator==() [1/28]

template<typename Type >
bool walberla::math::operator== ( char  scalar,
const Vector2< Type > &  vec 
)
inline

Equality operator for the comparison of a char scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [2/28]

template<typename Type >
bool walberla::math::operator== ( char  scalar,
const Vector3< Type > &  vec 
)
inline

Equality operator for the comparison of a char scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [3/28]

template<typename T , typename U >
bool walberla::math::operator== ( const GenericAABB< T > &  lhs,
const GenericAABB< U > &  rhs 
)
inline

Compares two GenericeAABBs for equality.

see isEqual

ATTENTION: Does not check for identity! If you need to check for identity, use member function isIdentical of class GenericAABB

Parameters
lhsAn arbitrary GenericAABB
rhsAn arbitrary GenericAABB
Returns
true, if lhs is equal to rhs, false else

◆ operator==() [4/28]

template<typename T1 , typename T2 >
bool walberla::math::operator== ( const Quaternion< T1 > &  lhs,
const Quaternion< T2 > &  rhs 
)
inline

Equality operator for the comparison of two quaternions.

Parameters
lhsThe left-hand side quaternion for the comparison.
rhsThe right-hand side quaternion for the comparison.
Returns
true if the two quaternions are equal, false if not.

◆ operator==() [5/28]

template<typename Type >
bool walberla::math::operator== ( double  scalar,
const Vector2< Type > &  vec 
)
inline

Equality operator for the comparison of a double scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [6/28]

template<typename Type >
bool walberla::math::operator== ( double  scalar,
const Vector3< Type > &  vec 
)
inline

Equality operator for the comparison of a double scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [7/28]

template<typename Type >
bool walberla::math::operator== ( float  scalar,
const Vector2< Type > &  vec 
)
inline

Equality operator for the comparison of a float scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [8/28]

template<typename Type >
bool walberla::math::operator== ( float  scalar,
const Vector3< Type > &  vec 
)
inline

Equality operator for the comparison of a float scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [9/28]

template<typename Type >
bool walberla::math::operator== ( int  scalar,
const Vector2< Type > &  vec 
)
inline

Equality operator for the comparison of an int scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [10/28]

template<typename Type >
bool walberla::math::operator== ( int  scalar,
const Vector3< Type > &  vec 
)
inline

Equality operator for the comparison of an int scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [11/28]

template<typename Type >
bool walberla::math::operator== ( long double  scalar,
const Vector2< Type > &  vec 
)
inline

Equality operator for the comparison of a long double scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [12/28]

template<typename Type >
bool walberla::math::operator== ( long double  scalar,
const Vector3< Type > &  vec 
)
inline

Equality operator for the comparison of a long double scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [13/28]

template<typename Type >
bool walberla::math::operator== ( long  scalar,
const Vector2< Type > &  vec 
)
inline

Equality operator for the comparison of a long scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [14/28]

template<typename Type >
bool walberla::math::operator== ( long  scalar,
const Vector3< Type > &  vec 
)
inline

Equality operator for the comparison of a long scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [15/28]

template<typename Type >
bool walberla::math::operator== ( short  scalar,
const Vector2< Type > &  vec 
)
inline

Equality operator for the comparison of a short scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [16/28]

template<typename Type >
bool walberla::math::operator== ( short  scalar,
const Vector3< Type > &  vec 
)
inline

Equality operator for the comparison of a short scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [17/28]

template<typename Type >
bool walberla::math::operator== ( signed char  scalar,
const Vector2< Type > &  vec 
)
inline

Equality operator for the comparison of a signed char scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [18/28]

template<typename Type >
bool walberla::math::operator== ( signed char  scalar,
const Vector3< Type > &  vec 
)
inline

Equality operator for the comparison of a signed char scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [19/28]

template<typename Type >
bool walberla::math::operator== ( unsigned char  scalar,
const Vector2< Type > &  vec 
)
inline

Equality operator for the comparison of an unsigned char scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [20/28]

template<typename Type >
bool walberla::math::operator== ( unsigned char  scalar,
const Vector3< Type > &  vec 
)
inline

Equality operator for the comparison of an unsigned char scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [21/28]

template<typename Type >
bool walberla::math::operator== ( unsigned int  scalar,
const Vector2< Type > &  vec 
)
inline

◆ operator==() [22/28]

template<typename Type >
bool walberla::math::operator== ( unsigned int  scalar,
const Vector3< Type > &  vec 
)
inline

◆ operator==() [23/28]

template<typename Type >
bool walberla::math::operator== ( unsigned long  scalar,
const Vector2< Type > &  vec 
)
inline

Equality operator for the comparison of an unsigned long scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [24/28]

template<typename Type >
bool walberla::math::operator== ( unsigned long  scalar,
const Vector3< Type > &  vec 
)
inline

Equality operator for the comparison of an unsigned long scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [25/28]

template<typename Type >
bool walberla::math::operator== ( unsigned short  scalar,
const Vector2< Type > &  vec 
)
inline

Equality operator for the comparison of an unsigned short scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [26/28]

template<typename Type >
bool walberla::math::operator== ( unsigned short  scalar,
const Vector3< Type > &  vec 
)
inline

Equality operator for the comparison of an unsigned short scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [27/28]

template<typename Type >
bool walberla::math::operator== ( wchar_t  scalar,
const Vector2< Type > &  vec 
)
inline

Equality operator for the comparison of a wchar_t scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator==() [28/28]

template<typename Type >
bool walberla::math::operator== ( wchar_t  scalar,
const Vector3< Type > &  vec 
)
inline

Equality operator for the comparison of a wchar_t scalar and a vector.

Parameters
scalarThe left-hand-side scalar value for the comparison.
vecThe right-hand-side vector for the comparison.
Returns
bool

If all values of the vector are equal to the scalar value, the equality test returns true, otherwise false.

◆ operator>>() [1/9]

template<typename T , typename MT >
mpi::GenericRecvBuffer<T>& walberla::math::operator>> ( mpi::GenericRecvBuffer< T > &  buf,
Matrix2< MT > &  m 
)

◆ operator>>() [2/9]

template<typename T >
mpi::GenericRecvBuffer<T>& walberla::math::operator>> ( mpi::GenericRecvBuffer< T > &  buf,
Sample statReal 
)

◆ operator>>() [3/9]

template<typename T >
std::istream & walberla::math::operator>> ( std::istream &  is,
GenericAABB< T > &  aabb 
)
inline

Reads an GenericAABB from a std::istream.

The format is [ <0,0,0>, <1,1,1> ]

Parameters
isThe std::istream read from
aabbThe GenericAABB the read values are to be stored in
Returns
A reference to is

◆ operator>>() [4/9]

std::istream& walberla::math::operator>> ( std::istream &  is,
Plane plane 
)

◆ operator>>() [5/9]

template<typename Type >
std::istream & walberla::math::operator>> ( std::istream &  is,
Quaternion< Type > &  q 
)

Global input operator for quaternions.

Parameters
isReference to the input stream.
qReference to a quaternion object.
Returns
The input stream.

◆ operator>>() [6/9]

template<>
std::istream & walberla::math::operator>> ( std::istream &  is,
Vector2< bool > &  v 
)
inline

Specialization for input operator for 2-dimensional vectors of bool.

The operator can parse e.g. <1, 0, 1> and <true, false, true> from the istream

Parameters
isReference to the input stream.
vReference to a bool vector object.
Returns
The input stream.

◆ operator>>() [7/9]

template<typename Type >
std::istream & walberla::math::operator>> ( std::istream &  is,
Vector2< Type > &  v 
)

Global input operator for 2-dimensional vectors.

Parameters
isReference to the input stream.
vReference to a vector object.
Returns
The input stream.

◆ operator>>() [8/9]

template<>
std::istream & walberla::math::operator>> ( std::istream &  is,
Vector3< bool > &  v 
)
inline

Specialization for input operator for 3-dimensional vectors of bool.

The operator can parse e.g. <1, 0, 1> and <true, false, true> from the istream

Parameters
isReference to the input stream.
vReference to a bool vector object.
Returns
The input stream.

◆ operator>>() [9/9]

template<typename Type >
std::istream & walberla::math::operator>> ( std::istream &  is,
Vector3< Type > &  v 
)

Global input operator for 3-dimensional vectors.

Parameters
isReference to the input stream.
vReference to a vector object.
Returns
The input stream.

◆ radToDeg()

constexpr real_t walberla::math::radToDeg ( real_t  rad)
constexpr

Converts a radians angle to degrees.

◆ realRandom()

template<typename REAL_TYPE = real_t>
REAL_TYPE walberla::math::realRandom ( const REAL_TYPE  min = REAL_TYPE(0),
const REAL_TYPE  max = REAL_TYPE(1),
std::mt19937 &  generator = internal::getGenerator() 
)

Returns a random floating point number of type REAL in the range [min,max) (max excluded!)

◆ reset() [1/3]

template<typename Type >
void walberla::math::reset ( MatrixMxN< Type > &  m)
inline

Resetting the given dense matrix.

Parameters
mThe dense matrix to be resetted.
Returns
void

◆ reset() [2/3]

template<typename Type >
void walberla::math::reset ( Quaternion< Type > &  q)
inline

Resetting the given quaternion.

Parameters
qThe quaternion to be resetted.
Returns
void

◆ reset() [3/3]

template<typename Type >
void walberla::math::reset ( Type &  resettable)
inline

Resetting the given value/object to the default value.

Parameters
resettableThe value/object to be resetted.
Returns
void

The reset shim represents an abstract interface for the resetting of a value/object of any given data type to its default value. Values of built-in data type are reset to zero.

◆ rotateAroundPoint()

template<typename Type >
void walberla::math::rotateAroundPoint ( Vector3< Type > &  pos,
Rot3< Type > &  rot,
const Vector3< Type > &  rotateAround,
const Rot3< Type > &  dRot 
)
inline

◆ round()

real_t walberla::math::round ( real_t  a)
inline

Rounding function.

Parameters
aFloating point value.
Returns
The floating point value rounded towards the next whole number.

◆ seedRandomGenerator()

void walberla::math::seedRandomGenerator ( const std::mt19937::result_type &  seed)

◆ sign()

template<typename T >
const T walberla::math::sign ( a)
inline

Sign function.

Parameters
aThe signed value.
Returns
1 if the value is greater than or equal to zero, -1 if the value is smaller than zero.

The sign function only works for signed built-in data types. The attempt to use unsigned data types or user-defined class types will result in a compile time error.

http://stackoverflow.com/questions/1903954/is-there-a-standard-sign-function-signum-sgn-in-c-c

◆ skewSymCrossProduct() [1/2]

template<typename Type >
const Matrix3< Type > walberla::math::skewSymCrossProduct ( const Matrix3< Type > &  mat,
const Vector3< Type > &  vec 
)
inline

Cross product (outer product) between a matrix and a vector ( \( R = M \cdot r^{\times} \)).

Parameters
matThe left-hand side matrix for the skew-symmetric cross product.
vecThe right-hand side vector for the skew-symmetric cross product.
Returns
The matrix \( M \cdot r^{\times} \).

This operator multiplies the matrix with the skew-symmetric matrix resulting from the vector, which corresponds to a cross product between the columns vectors of the matrix and the right-hand side vector:

                    \f[
                    M \cdot r^{\times} =

                    \left(\begin{array}{*{3}{c}}
                    m_{00} & m_{01} & m_{02} \\
                    m_{10} & m_{11} & m_{12} \\
                    m_{20} & m_{21} & m_{22} \\
                    \end{array}\right) \cdot

                    \left(\begin{array}{*{1}{c}}
                    r_0 \\
                    r_1 \\
                    r_2 \\
                    \end{array}\right)^{\times} =

                    \left(\begin{array}{*{3}{c}}
                    m_{00} & m_{01} & m_{02} \\
                    m_{10} & m_{11} & m_{12} \\
                    m_{20} & m_{21} & m_{22} \\
                    \end{array}\right) \cdot

                    \left(\begin{array}{*{3}{c}}
                    0    & -r_2 & r_1  \\
                    r_2  & 0    & -r_0 \\
                    -r_1 & r_0  & 0    \\
                    \end{array}\right)
                    \f]

The operator returns a matrix of the higher-order data type of the two involved data types T1 and T2. In case T1 and T2 match, the operator works for any data type as long as the data type has a multiplication and subtraction operator. In case T1 and T2 differ, the operator only works for data types supported by the MathTrait class template.

◆ skewSymCrossProduct() [2/2]

template<typename Type >
const Matrix3<Type> walberla::math::skewSymCrossProduct ( const Vector3< Type > &  vec,
const Matrix3< Type > &  mat 
)
inline

Cross product (outer product) between a vector and a matrix ( \( R = r^{\times} \cdot M \)).

Parameters
vecThe left-hand side vector for the skew-symmetric product.
matThe right-hand side matrix for the skew-symmetric product.
Returns
The matrix \( r^{\times} \cdot M \).

This operator multiplies the skew-symmetric matrix resulting from the vector with the right-hand side matrix, which corresponds to a cross product between the vector and the columns vectors of the matrix:

                    \f[
                    r^{\times} \cdot M =

                    \left(\begin{array}{*{1}{c}}
                    r_0 \\
                    r_1 \\
                    r_2 \\
                    \end{array}\right)^{\times} \cdot

                    \left(\begin{array}{*{3}{c}}
                    m_{00} & m_{01} & m_{02} \\
                    m_{10} & m_{11} & m_{12} \\
                    m_{20} & m_{21} & m_{22} \\
                    \end{array}\right) =

                    \left(\begin{array}{*{3}{c}}
                    0    & -r_2 & r_1  \\
                    r_2  & 0    & -r_0 \\
                    -r_1 & r_0  & 0    \\
                    \end{array}\right) \cdot

                    \left(\begin{array}{*{3}{c}}
                    m_{00} & m_{01} & m_{02} \\
                    m_{10} & m_{11} & m_{12} \\
                    m_{20} & m_{21} & m_{22} \\
                    \end{array}\right)
                    \f]

The operator returns a matrix of the higher-order data type of the two involved data types T1 and T2. In case T1 and T2 match, the operator works for any data type as long as the data type has a multiplication and subtraction operator. In case T1 and T2 differ, the operator only works for data types supported by the MathTrait class template.

◆ sq() [1/2]

template<typename Type >
const Quaternion< Type > walberla::math::sq ( const Quaternion< Type > &  q)
inline

Squaring the given quaternion.

Parameters
qThe quaternion to be squared.
Returns
The result of the square operation.

This function squares the given quaternion q. This function has the same effect as multiplying the quaternion with itself ( \( q * q \)).

◆ sq() [2/2]

template<typename T >
const T walberla::math::sq ( const T &  a)
inline

Squaring the given value/object.

Parameters
aThe value/object to be squared.
Returns
The result of the square operation.

The square shim represents an abstract interface for squaring a value/object of any given data type. For values of built-in data type this results in a plain multiplication.

◆ sqr()

template<typename T >
const T walberla::math::sqr ( const T &  a)
inline

Square function.

Parameters
aValue to be squared.
Returns
The square of the input value.

◆ sqrLength()

template<typename T >
real_t walberla::math::sqrLength ( const Vector3< T > &  v)

Length of the vector squared.

Returns
Length of the vector squared.

◆ swap() [1/2]

template<typename Type >
void walberla::math::swap ( MatrixMxN< Type > &  a,
MatrixMxN< Type > &  b 
)
inline

Swapping the contents of two matrices.

Parameters
aThe first matrix to be swapped.
bThe second matrix to be swapped.
Returns
void
Exceptions
no-throwguarantee.

◆ swap() [2/2]

template<typename Type >
void walberla::math::swap ( Quaternion< Type > &  a,
Quaternion< Type > &  b 
)
inline

Swapping the contents of two quaternions.

Parameters
aThe first quaternion to be swapped.
bThe second quaternion to be swapped.
Returns
void
Exceptions
no-throwguarantee.

◆ tensorProduct() [1/2]

template<typename T0 , typename T1 >
Matrix2< typename MathTrait<T0,T1>::High > walberla::math::tensorProduct ( Vector2< T0 >  v0,
Vector2< T1 >  v1 
)

◆ tensorProduct() [2/2]

template<typename T0 , typename T1 >
Matrix3< typename MathTrait<T0,T1>::High > walberla::math::tensorProduct ( Vector3< T0 >  v0,
Vector3< T1 >  v1 
)

◆ transformMatrixRART()

template<typename Type >
Matrix3< Type > walberla::math::transformMatrixRART ( const Matrix3< Type > &  R,
const Matrix3< Type > &  A 
)
inline

Equivalent to R*A*R.getTranspose().

◆ uintIsEven()

template<typename UINT >
bool walberla::math::uintIsEven ( const UINT  value)
inline

Returns true only if 'value' is an even number.

◆ uintIsPowerOfTwo()

template<typename UINT >
bool walberla::math::uintIsPowerOfTwo ( const UINT  value)
inline

Returns true only if 'value' (must be an unsigned integer) is a power of 2 (http://graphics.stanford.edu/~seander/bithacks.html)

◆ uintMSBPosition()

template<typename UINT >
uint_t walberla::math::uintMSBPosition ( UINT  value)

Calculation of the position of the most significant bit of a variable of type UINT.

Examples: "[...] 1001" -> 4, "[...] 0011" -> 2, "[...] 0110" -> 3, "[...] 0001" -> 1, "[...] 0000" -> 0, etc.

◆ uintMSBPosition< uint16_t >()

template<>
uint_t walberla::math::uintMSBPosition< uint16_t > ( uint16_t  value)
inline

◆ uintMSBPosition< uint32_t >()

template<>
uint_t walberla::math::uintMSBPosition< uint32_t > ( uint32_t  value)
inline

◆ uintMSBPosition< uint64_t >()

◆ uintMSBPosition< uint8_t >()

template<>
uint_t walberla::math::uintMSBPosition< uint8_t > ( uint8_t  value)
inline

◆ uintPow16()

template<typename UINT >
UINT walberla::math::uintPow16 ( UINT  exp)
inline

Returns the result of 16^exp.

◆ uintPow2()

template<typename UINT >
UINT walberla::math::uintPow2 ( const UINT  exp)
inline

Returns the result of 2^exp.

◆ uintPow4()

template<typename UINT >
UINT walberla::math::uintPow4 ( UINT  exp)
inline

Returns the result of 4^exp.

◆ uintPow8()

template<typename UINT >
UINT walberla::math::uintPow8 ( UINT  exp)
inline

Returns the result of 8^exp.

Variable Documentation

◆ e

constexpr real_t walberla::math::e = real_t(2.7182818284590452354)
constexpr

◆ fourth_pi

constexpr real_t walberla::math::fourth_pi = real_t(0.78539816339744830962)
constexpr

◆ half_pi

constexpr real_t walberla::math::half_pi = real_t(1.57079632679489661923)
constexpr

◆ ln_ten

constexpr real_t walberla::math::ln_ten = real_t(2.30258509299404568402)
constexpr

◆ ln_two

constexpr real_t walberla::math::ln_two = real_t(0.69314718055994530942)
constexpr

◆ log10_e

constexpr real_t walberla::math::log10_e = real_t(0.43429448190325182765)
constexpr

◆ log2_e

constexpr real_t walberla::math::log2_e = real_t(1.4426950408889634074)
constexpr

◆ msbLookupTable

const uint8_t walberla::math::msbLookupTable[256]
static
Initial value:
=
{
#define msbLT(n)
0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 ,
8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8
}

◆ one_div_pi

constexpr real_t walberla::math::one_div_pi = real_t(0.31830988618379067154)
constexpr

◆ one_div_root_three

constexpr real_t walberla::math::one_div_root_three = real_t(0.57735026919)
constexpr

◆ one_div_root_two

constexpr real_t walberla::math::one_div_root_two = real_t(0.70710678118654752440)
constexpr

◆ pi

constexpr real_t walberla::math::pi = real_t(3.14159265358979323846)
constexpr

◆ root_three

constexpr real_t walberla::math::root_three = real_t(1.73205080757)
constexpr

◆ root_two

constexpr real_t walberla::math::root_two = real_t(1.41421356237309504880)
constexpr

◆ two_div_pi

constexpr real_t walberla::math::two_div_pi = real_t(0.63661977236758134308)
constexpr

◆ two_div_root_pi

constexpr real_t walberla::math::two_div_root_pi = real_t(1.12837916709551257390)
constexpr
math::Vector3< real_t > Vec3
Definition: DataTypes.h:40