Chombo + EB + MF
3.2
|
#include "MayDay.H"
#include "RealVect.H"
#include "IndexTM.H"
#include "NamespaceHeader.H"
#include "NamespaceFooter.H"
Go to the source code of this file.
Macros | |
#define | _FACTORIAL_H_ |
Functions | |
Real | factorial (const int n) |
Calculates factorial for an integer. More... | |
Real | POW (const Real &a_x, const int &a_p) |
computes x^p More... | |
Real | nCk (const int n, const int k) |
Calculates the binomial coefficient, "n choose k". More... | |
template<int Dim> | |
Real | pfactorial (const IndexTM< int, Dim > p) |
Calculates factorials for a multinomial. More... | |
template<int Dim> | |
Real | pCk (const IndexTM< int, Dim > &p, const IndexTM< int, Dim > &k) |
Calculates the multinomial coefficient, "p choose k". More... | |
template<int Dim> | |
Real | power (const IndexTM< Real, Dim > &a_x, const IndexTM< int, Dim > &a_p) |
calculate x^p More... | |
#define _FACTORIAL_H_ |
|
inline |
Calculates factorial for an integer.
These helper functions calculate factorials, binomial coeff, etc. for multinomials.
References CH_assert.
Referenced by CutCellMoments< dim >::changeMomentCoordinates(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::divideByFactorial(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::multiplyByFactorial(), nCk(), and pfactorial().
computes x^p
References Abs().
Referenced by MinimalCCCM< dim >::computeRhs(), LSProblem< dim >::momentBounds(), LSProblem< dim >::monoMaxMin(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::setRegular(), and IndexedMoments< SpaceDim, CH_EBIS_ORDER >::shift().
|
inline |
Calculates the binomial coefficient, "n choose k".
References CH_assert, and factorial().
Referenced by pCk().
Calculates factorials for a multinomial.
References CH_assert, and factorial().
Referenced by IndexedMoments< SpaceDim, CH_EBIS_ORDER >::divideByFactorial(), and IndexedMoments< SpaceDim, CH_EBIS_ORDER >::multiplyByFactorial().
Calculates the multinomial coefficient, "p choose k".
References nCk().