COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Functions
cf3::math::Checks Namespace Reference

Static functions for checking Real numbers. More...

Functions

bool is_equal_with_error (const Real &x, const Real &y, const Real &fuzz)
 
bool is_equal (const Real &x, const Real &y)
 
bool is_not_equal (const Real &x, const Real &y)
 
bool is_zero (const Real &x)
 
bool is_not_zero (const Real &x)
 
bool is_finite (const Real &x)
 
bool is_inf (const Real &x)
 
bool is_nan (const Real &x)
 
bool is_pos (const Real &value)
 
bool is_neg (const Real &value)
 

Detailed Description

Static functions for checking Real numbers.

Author
Tiago Quintino, Willem Deconinck

Function Documentation

bool cf3::math::Checks::is_equal ( const Real &  x,
const Real &  y 
)
inline

Function to check if two Real numbers are equal.

Parameters
x
y
Returns
true if equal or almost equal within the accepted error fuzz.

Definition at line 41 of file Checks.hpp.

bool cf3::math::Checks::is_equal_with_error ( const Real &  x,
const Real &  y,
const Real &  fuzz 
)
inline

Function to check if two Real numbers are equal.

Parameters
x
y
fuzz
Returns
true if equal or almost equal within the accepted error fuzz.

Definition at line 31 of file Checks.hpp.

bool cf3::math::Checks::is_finite ( const Real &  x)
inline

Function to check if a Real number is finite number. This means is not a NaN neither a INF

Parameters
x
Returns
true if x is finite

Definition at line 74 of file Checks.hpp.

bool cf3::math::Checks::is_inf ( const Real &  x)
inline

Function to check if a Real number is either minus or plus INF

Parameters
x
Returns
true if x is finite

Definition at line 82 of file Checks.hpp.

bool cf3::math::Checks::is_nan ( const Real &  x)
inline

Function to check if a Real number is a NaN (Not a Number)

Parameters
x
Returns
true if x is a NaN

Definition at line 90 of file Checks.hpp.

bool cf3::math::Checks::is_neg ( const Real &  value)
inline

Checks is real is negative. Kind of a sign function returning a bool.

Definition at line 104 of file Checks.hpp.

bool cf3::math::Checks::is_not_equal ( const Real &  x,
const Real &  y 
)
inline

Function to check if two Real numbers are not equal.

Parameters
x
y
Returns
true if not equal or almost unequal within the accepted error fuzz.

Definition at line 50 of file Checks.hpp.

bool cf3::math::Checks::is_not_zero ( const Real &  x)
inline

Function to check if a Real number is not zero or very close.

Parameters
x
Returns
true if not equal to zero or not almost equal within the accepted error fuzz.

Definition at line 66 of file Checks.hpp.

bool cf3::math::Checks::is_pos ( const Real &  value)
inline

Checks is real is positive. Kind of a sign function returning a bool.

Definition at line 97 of file Checks.hpp.

bool cf3::math::Checks::is_zero ( const Real &  x)
inline

Function to check if a Real number is zero or very close.

Parameters
x
Returns
true if equal to zero or almost equal within the accepted error fuzz.

Definition at line 58 of file Checks.hpp.

Send comments to:
COOLFluiD Web Admin