preCICE
Loading...
Searching...
No Matches
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.
bool equals (double a, double b, double tolerance=NUMERICAL_ZERO_DIFFERENCE) noexcept
 Compares two scalar (arithmetic) types.
bool isZero (double a, double tolerance=NUMERICAL_ZERO_DIFFERENCE) noexcept
bool greater (double a, double b, double tolerance=NUMERICAL_ZERO_DIFFERENCE) noexcept
bool greaterEquals (double a, double b, double tolerance=NUMERICAL_ZERO_DIFFERENCE) noexcept
bool smaller (double a, double b, double tolerance=NUMERICAL_ZERO_DIFFERENCE) noexcept
bool smallerEquals (double a, double b, double tolerance=NUMERICAL_ZERO_DIFFERENCE) noexcept
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 base)
 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

◆ equals() [1/2]

template<class DerivedA, class DerivedB>
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 12 of file differences.hpp.

◆ equals() [2/2]

bool precice::math::equals ( double a,
double b,
double tolerance = NUMERICAL_ZERO_DIFFERENCE )
inlinenoexcept

Compares two scalar (arithmetic) types.

Definition at line 20 of file differences.hpp.

◆ greater()

bool precice::math::greater ( double a,
double b,
double tolerance = NUMERICAL_ZERO_DIFFERENCE )
inlinenoexcept

Definition at line 32 of file differences.hpp.

◆ greaterEquals()

bool precice::math::greaterEquals ( double a,
double b,
double tolerance = NUMERICAL_ZERO_DIFFERENCE )
inlinenoexcept

Definition at line 37 of file differences.hpp.

Here is the call graph for this function:

◆ isZero()

bool precice::math::isZero ( double a,
double tolerance = NUMERICAL_ZERO_DIFFERENCE )
inlinenoexcept

Definition at line 27 of file differences.hpp.

◆ pow_int()

template<int iexp, typename T>
T precice::math::pow_int ( const T base)
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 22 of file math.hpp.

◆ sign()

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

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

Definition at line 10 of file math.hpp.

Here is the call graph for this function:

◆ smaller()

bool precice::math::smaller ( double a,
double b,
double tolerance = NUMERICAL_ZERO_DIFFERENCE )
inlinenoexcept

Definition at line 42 of file differences.hpp.

◆ smallerEquals()

bool precice::math::smallerEquals ( double a,
double b,
double tolerance = NUMERICAL_ZERO_DIFFERENCE )
inlinenoexcept

Definition at line 47 of file differences.hpp.

Here is the call graph for this function:

◆ 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 13 of file la.hpp.

Variable Documentation

◆ NUMERICAL_ZERO_DIFFERENCE

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

Definition at line 8 of file differences.hpp.

◆ PI

double precice::math::PI = 3.1415926535897931
constexpr

Definition at line 5 of file constants.hpp.