#include "CH_assert.H"
#include "REAL.H"
#include <cmath>
#include "BaseNamespaceHeader.H"
#include "BaseNamespaceFooter.H"
Go to the source code of this file.
|
template<class T > |
T | Min (const T &a_a, const T &a_b) |
|
template<class T > |
T | Max (const T &a_a, const T &a_b) |
|
template<class T > |
T | Abs (const T &a_a) |
|
template<class T > |
void | Swap (T &a_a, T &a_b) |
|
template<unsigned int P> |
constexpr int | ipow (int M) |
|
template<> |
constexpr int | ipow< 0 > (int M) |
|
int | ipow (int a, int b) |
|
Real | ipow (const Real &a, const int &b) |
|
bool | Misc::isPower2 (const int a_i) |
| Test if integer is a power of 2. More...
|
|
◆ _MISC_H_
◆ Min()
template<class T >
T Min |
( |
const T & |
a_a, |
|
|
const T & |
a_b |
|
) |
| |
|
inline |
◆ Max()
template<class T >
T Max |
( |
const T & |
a_a, |
|
|
const T & |
a_b |
|
) |
| |
|
inline |
Returns a copy of the maximum of the two values. Will work with any type T that supplies a T::operator>(const T, const T), or an equivalent construct, as well as a copy constructor. In particular, it will work with any integral or floating-point intrinsic type.
Referenced by AMRMultiGrid< LevelData< MFCellFAB > >::computeAMRResidual(), LSProblem< dim >::computeBounds(), MultilevelLinearOp< T >::create(), MultilevelLinearOp< T >::define(), EBPatchAdvect::floorPrimitives(), BaseIFFAB< FaceStencil >::getLocalVecIndex(), RealVect::max(), IntVect::max(), CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > >::NewtonRaphson(), MultilevelLinearOp< T >::setToZero(), FASMultiGrid< T >::solve(), and MultiGrid< T >::solve().
◆ Abs()
Returns a copy of the absolute value of the value. Will work with any type T that can be compared against zero with T::operator>(const T, const T), or an equivalent construct, as well as a copy constructor, and an T::operator-() or equivalent. In particular, it will work with any integral or floating-point intrinsic type.
Referenced by abscompare(), DivNormalRefinement< dim >::approximateDivNormal(), RootSolver::Brent(), IFData< dim >::BrentRootFinder(), ComputeCutCellMoments< dim >::computeResiduals(), PolyGeom::getTangentVectors(), LSProblem< dim >::invertNormalEq(), CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > >::NewtonRaphson(), ourcoarsen(), POW(), RK4DenseOutput< Soln, Rhs, EXOP >::resetDt(), ARK4DenseOutput< Soln, Rhs, IMEXOp >::resetDt(), ARK4< X, FI, FE, dX >::resetDt(), BiCGStabSolver< LevelData< T > >::solve(), and GMRESSolver< T >::UpdateGMRESHessenberg().
◆ Swap()
template<class T >
void Swap |
( |
T & |
a_a, |
|
|
T & |
a_b |
|
) |
| |
|
inline |
Swaps the two values. Type T must have a copy constructor and an assignment operator.
◆ ipow() [1/3]
template<unsigned int P>
constexpr int ipow |
( |
int |
M | ) |
|
|
inline |
◆ ipow< 0 >()
template<>
constexpr int ipow< 0 > |
( |
int |
M | ) |
|
|
inline |
◆ ipow() [2/3]
int ipow |
( |
int |
a, |
|
|
int |
b |
|
) |
| |
|
inline |
◆ ipow() [3/3]
Real ipow |
( |
const Real & |
a, |
|
|
const int & |
b |
|
) |
| |
|
inline |