Misc.H File Reference

#include "CH_assert.H"
#include "REAL.H"
#include <cmath>
#include "BaseNamespaceHeader.H"
#include "BaseNamespaceFooter.H"

Include dependency graph for Misc.H:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class T>
Min (const T &a_a, const T &a_b)
template<class T>
Max (const T &a_a, const T &a_b)
template<class T>
Abs (const T &a_a)
template<class T>
void Swap (T &a_a, T &a_b)
int ipow (int a, int b)
Real ipow (const Real &a, const int &b)


Function Documentation

template<class T>
T Min ( const T &  a_a,
const T &  a_b 
) [inline]

Returns a copy of the minimum 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 IFData< dim >::BrentRootFinder(), LSProblem< dim >::computeBounds(), EBPatchAdvect::floorPrimitives(), RealVect::min(), and IntVect::min().

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< T >::computeAMRResidual(), LSProblem< dim >::computeBounds(), MultilevelLinearOp< T >::create(), MultilevelLinearOp< T >::define(), EBPatchAdvect::floorPrimitives(), BaseIFFAB< T >::getLocalVecIndex(), RealVect::max(), IntVect::max(), CoefficientInterpolator< LevelData_, SolutionLevelData_ >::NewtonRaphson(), MultilevelLinearOp< T >::setToZero(), and MultiGrid< T >::solve().

template<class T>
T Abs ( const T &  a_a  )  [inline]

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 DivNormalRefinement< dim >::approximateDivNormal(), IFData< dim >::BrentRootFinder(), ComputeCutCellMoments< dim >::computeResiduals(), LSProblem< dim >::invertNormalEq(), CoefficientInterpolator< LevelData_, SolutionLevelData_ >::NewtonRaphson(), and BiCGStabSolver< T >::solve().

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.

int ipow ( int  a,
int  b 
) [inline]

References CH_assert.

Real ipow ( const Real a,
const int &  b 
) [inline]


Generated on Fri Mar 22 03:41:35 2019 for Chombo + EB by  doxygen 1.5.5