preCICE v3.1.1
Loading...
Searching...
No Matches
Namespaces | Classes | Functions | Variables
precice::math Namespace Reference

provides general mathematical constants and functions. More...

Namespaces

namespace  barycenter
 Provides operations to calculate barycentric coordinates for a point's projection onto a primitive.
 
namespace  geometry
 Provides computational geometry operations.
 

Classes

class  Bspline
 

Functions

template<class DerivedA , class DerivedB >
constexpr bool equals (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, double tolerance=NUMERICAL_ZERO_DIFFERENCE)
 Compares two Eigen::MatrixBase for equality up to tolerance.
 
template<class Scalar >
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type equals (const Scalar a, const Scalar b, const Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)
 Compares two scalar (arithmetic) types.
 
template<class DerivedA , class DerivedB >
bool oneGreater (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, double tolerance=math::NUMERICAL_ZERO_DIFFERENCE)
 
template<class DerivedA , class DerivedB >
bool oneGreaterEquals (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, double tolerance=math::NUMERICAL_ZERO_DIFFERENCE)
 
template<class DerivedA , class DerivedB >
bool allGreater (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, double tolerance=math::NUMERICAL_ZERO_DIFFERENCE)
 
template<class DerivedA , class DerivedB >
bool allGreaterEquals (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, double tolerance=math::NUMERICAL_ZERO_DIFFERENCE)
 
template<class Scalar >
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type greater (Scalar A, Scalar B, Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)
 
template<class Scalar >
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type greaterEquals (Scalar A, Scalar B, Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)
 
template<class Scalar >
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type smaller (Scalar A, Scalar B, Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)
 
template<class Scalar >
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type smallerEquals (Scalar A, Scalar B, Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)
 
template<typename DerivedA , typename DerivedB >
void sumSubvectors (const Eigen::MatrixBase< DerivedA > &vector, Eigen::MatrixBase< DerivedB > &result)
 Sums up the components of subvectors in vector into result.
 
int sign (double number)
 Return the sign, one of {-1, 0, 1}.
 
template<int iexp, typename T >
constexpr T pow_int (const T x)
 Computes the power of a given number by an integral exponent given at compile time, which is much faster than std::pow(x, iexp)
 

Variables

constexpr double PI = 3.1415926535897931
 
constexpr double NUMERICAL_ZERO_DIFFERENCE = 1.0e-14
 

Detailed Description

provides general mathematical constants and functions.

Function Documentation

◆ allGreater()

template<class DerivedA , class DerivedB >
bool precice::math::allGreater ( const Eigen::MatrixBase< DerivedA > & A,
const Eigen::MatrixBase< DerivedB > & B,
double tolerance = math::NUMERICAL_ZERO_DIFFERENCE )

Definition at line 50 of file differences.hpp.

◆ allGreaterEquals()

template<class DerivedA , class DerivedB >
bool precice::math::allGreaterEquals ( const Eigen::MatrixBase< DerivedA > & A,
const Eigen::MatrixBase< DerivedB > & B,
double tolerance = math::NUMERICAL_ZERO_DIFFERENCE )

Definition at line 61 of file differences.hpp.

◆ equals() [1/2]

template<class DerivedA , class DerivedB >
constexpr bool precice::math::equals ( const Eigen::MatrixBase< DerivedA > & A,
const Eigen::MatrixBase< DerivedB > & B,
double tolerance = NUMERICAL_ZERO_DIFFERENCE )
constexpr

Compares two Eigen::MatrixBase for equality up to tolerance.

Definition at line 13 of file differences.hpp.

◆ equals() [2/2]

template<class Scalar >
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type precice::math::equals ( const Scalar a,
const Scalar b,
const Scalar tolerance = NUMERICAL_ZERO_DIFFERENCE )

Compares two scalar (arithmetic) types.

Definition at line 22 of file differences.hpp.

◆ greater()

template<class Scalar >
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type precice::math::greater ( Scalar A,
Scalar B,
Scalar tolerance = NUMERICAL_ZERO_DIFFERENCE )

Definition at line 72 of file differences.hpp.

◆ greaterEquals()

template<class Scalar >
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type precice::math::greaterEquals ( Scalar A,
Scalar B,
Scalar tolerance = NUMERICAL_ZERO_DIFFERENCE )

Definition at line 78 of file differences.hpp.

◆ oneGreater()

template<class DerivedA , class DerivedB >
bool precice::math::oneGreater ( const Eigen::MatrixBase< DerivedA > & A,
const Eigen::MatrixBase< DerivedB > & B,
double tolerance = math::NUMERICAL_ZERO_DIFFERENCE )

Definition at line 28 of file differences.hpp.

◆ oneGreaterEquals()

template<class DerivedA , class DerivedB >
bool precice::math::oneGreaterEquals ( const Eigen::MatrixBase< DerivedA > & A,
const Eigen::MatrixBase< DerivedB > & B,
double tolerance = math::NUMERICAL_ZERO_DIFFERENCE )

Definition at line 39 of file differences.hpp.

◆ pow_int()

template<int iexp, typename T >
constexpr T precice::math::pow_int ( const T x)
inlineconstexpr

Computes the power of a given number by an integral exponent given at compile time, which is much faster than std::pow(x, iexp)

Definition at line 23 of file math.hpp.

◆ sign()

int precice::math::sign ( double number)
inline

Return the sign, one of {-1, 0, 1}.

Definition at line 11 of file math.hpp.

Here is the call graph for this function:

◆ smaller()

template<class Scalar >
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type precice::math::smaller ( Scalar A,
Scalar B,
Scalar tolerance = NUMERICAL_ZERO_DIFFERENCE )

Definition at line 84 of file differences.hpp.

◆ smallerEquals()

template<class Scalar >
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type precice::math::smallerEquals ( Scalar A,
Scalar B,
Scalar tolerance = NUMERICAL_ZERO_DIFFERENCE )

Definition at line 90 of file differences.hpp.

◆ sumSubvectors()

template<typename DerivedA , typename DerivedB >
void precice::math::sumSubvectors ( const Eigen::MatrixBase< DerivedA > & vector,
Eigen::MatrixBase< DerivedB > & result )

Sums up the components of subvectors in vector into result.

Definition at line 14 of file la.hpp.

Variable Documentation

◆ NUMERICAL_ZERO_DIFFERENCE

constexpr double precice::math::NUMERICAL_ZERO_DIFFERENCE = 1.0e-14
constexpr

Definition at line 9 of file differences.hpp.

◆ PI

constexpr double precice::math::PI = 3.1415926535897931
constexpr

Definition at line 6 of file constants.hpp.