The open source CFD toolbox
Foam::Math Namespace Reference

A namespace for various mathematical functions. More...

## Functions

scalar erfInv (const scalar y)
Inverse error function of a real-number argument. More...

scalar invIncGamma (const scalar a, const scalar P)
Inverse of regularised lower incomplete gamma function. More...

scalar incGammaRatio_Q (const scalar a, const scalar x)
Regularised upper incomplete gamma function. More...

scalar incGammaRatio_P (const scalar a, const scalar x)
Regularised lower incomplete gamma function. More...

scalar incGamma_Q (const scalar a, const scalar x)
Upper incomplete gamma function. More...

scalar incGamma_P (const scalar a, const scalar x)
Lower incomplete gamma function. More...

## Detailed Description

A namespace for various mathematical functions.

Reference:

    Inverse error function (tag:W):
Winitzki, S. (2008).
A handy approximation for the error function and its inverse.
A lecture note obtained through private communication.
(Retrieved on: 16 Feb 2021).

Incomplete gamma functions (tag:DM):
DiDonato, A. R., & Morris Jr, A. H. (1986).
Computation of the incomplete gamma
function ratios and their inverse.
ACM Transactions on Mathematical Software (TOMS), 12(4), 377-393.
DOI:10.1145/22721.23109

Note
• The algorithm in invIncGamma is described in (DM:Sec. 4).
• The algorithm in incGammaRatio_Q is described in (DM:Sec. 3).
• The accuracy parameter IND is set to a value of 1.
Source files

## ◆ erfInv()

 Foam::scalar erfInv ( const scalar y )

Inverse error function of a real-number argument.

Parameters
 y Real-number argument at which to evaluate. Domain: (-1, 1)
Returns
The inverse of error function of y

Definition at line 34 of file erfInv.C.

Referenced by normal::sample(), and multiNormal::sample().

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ invIncGamma()

 Foam::scalar invIncGamma ( const scalar a, const scalar P )

Inverse of regularised lower incomplete gamma function.

Parameters
 a Real-number argument. Domain: (0, infty] P Real-number argument. Domain: [0,1]

Definition at line 91 of file invIncGamma.C.

Referenced by massRosinRammler::sample().

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ incGammaRatio_Q()

 Foam::scalar incGammaRatio_Q ( const scalar a, const scalar x )

Regularised upper incomplete gamma function.

Parameters
 a Real-number argument. Domain: (0, infty] x Real-number argument. Domain: [0, infty]

Definition at line 199 of file incGamma.C.

Referenced by incGamma_Q(), incGammaRatio_P(), and LuoSvendsen::LuoSvendsen().

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ incGammaRatio_P()

 Foam::scalar incGammaRatio_P ( const scalar a, const scalar x )

Regularised lower incomplete gamma function.

Parameters
 a Real-number argument. Domain: (0, infty] x Real-number argument. Domain: [0, infty]

Definition at line 437 of file incGamma.C.

References incGammaRatio_Q(), and x.

Referenced by incGamma_P().

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ incGamma_Q()

 Foam::scalar incGamma_Q ( const scalar a, const scalar x )

Upper incomplete gamma function.

Parameters
 a Real-number argument. Domain: (0, infty] x Real-number argument. Domain: [0, infty]

Definition at line 443 of file incGamma.C.

References incGammaRatio_Q(), and x.

Here is the call graph for this function:

## ◆ incGamma_P()

 Foam::scalar incGamma_P ( const scalar a, const scalar x )

Lower incomplete gamma function.

Parameters
 a Real-number argument. Domain: (0, infty] x Real-number argument. Domain: [0, infty]

Definition at line 449 of file incGamma.C.

References incGammaRatio_P(), and x.

Referenced by RosinRammler::meanValue(), and massRosinRammler::sample().

Here is the call graph for this function:
Here is the caller graph for this function: