Chombo + EB  3.2
Classes | Macros | Functions
IndexedMoments.H File Reference
#include "MayDay.H"
#include "IndexTM.H"
#include "Vector.H"
#include "SPACE.H"
#include "CH_EBIS_ORDER.H"
#include "NamespaceHeader.H"
#include "NamespaceFooter.H"
#include "IndexedMomentsImplem.H"
Include dependency graph for IndexedMoments.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  IndexedMoments< Dim, P >
 

Macros

#define _INDEXEDMOMENTS_H_
 
#define CH_IM_MAX_POWER   8
 

Functions

template<int Dim>
int getIndMomLinearIndex (const IndexTM< int, Dim > &a_index, const int &a_order)
 
template<int Dim>
const IndexTM< int, Dim > getIndMomMultiIndex (const int &a_index, const int &a_order)
 
template<int Dim>
int getIndMomSize (const int &a_order)
 
template<int Dim>
bool allEven (const IndexTM< int, Dim > &a_p)
 to see if all powers of p are even More...
 
template<int Dim>
Real POW (const Real &a_x, const IndexTM< int, Dim > a_p)
 computes x^p More...
 
template<int Dim, int ORDER>
void checkMoments (IndexedMoments< Dim, ORDER > &a_moments, Vector< IndexTM< int, Dim > > &a_bogusPowers, const Real &a_dx, const Real &a_tolerance, const bool &a_ebMoment, const bool &a_bindMoments)
 
template<int Dim>
bool allPositive (const IndexTM< int, Dim > &a_index)
 

Macro Definition Documentation

◆ _INDEXEDMOMENTS_H_

#define _INDEXEDMOMENTS_H_

◆ CH_IM_MAX_POWER

#define CH_IM_MAX_POWER   8

Function Documentation

◆ getIndMomLinearIndex()

template<int Dim>
int getIndMomLinearIndex ( const IndexTM< int, Dim > &  a_index,
const int &  a_order 
)

Calculate what linear index this multi-index is without the order stuff

References MayDay::Error(), and IndexedMoments< Dim, P >::indexOf().

◆ getIndMomMultiIndex()

template<int Dim>
const IndexTM<int,Dim> getIndMomMultiIndex ( const int &  a_index,
const int &  a_order 
)

◆ getIndMomSize()

template<int Dim>
int getIndMomSize ( const int &  a_order)

◆ allEven()

template<int Dim>
bool allEven ( const IndexTM< int, Dim > &  a_p)

to see if all powers of p are even

◆ POW()

template<int Dim>
Real POW ( const Real a_x,
const IndexTM< int, Dim >  a_p 
)

computes x^p

References allPositive(), and checkMoments().

◆ checkMoments()

template<int Dim, int ORDER>
void checkMoments ( IndexedMoments< Dim, ORDER > &  a_moments,
Vector< IndexTM< int, Dim > > &  a_bogusPowers,
const Real a_dx,
const Real a_tolerance,
const bool &  a_ebMoment,
const bool &  a_bindMoments 
)

Moments are centered at the center of the cell. For each of these moments I shift them to the lowest corner of the cell, where I know what the bounds of the integrals is (lower bound always zero, upper bound = dx^d dx^px dx^py dx^pz If the shifted moment is out of bounds, I bound it. The tolerance is about verbosity. If the moment is outside the tolerance then it gets included into a_bogusPowers. EBMoments do not get checked for maxvals.

Moments are centered at the center of the cell. For each of these moments I shift them to the lowest corner of the cell, where I know what the bounds of the integrals is (lower bound always zero, upper bound = dx^d dx^px dx^py dx^pz If the shifted moment is out of bounds, I bound it throw a message. tolerance is about verbosity.

References CH_IM_MAX_POWER, IndexedMoments< Dim, P >::getMoment(), MomentIterator< D, P >::ok(), MomentIterator< D, P >::reset(), IndexTM< T, N >::setAll(), IndexedMoments< Dim, P >::shift(), and IndexTM< T, N >::sum().

Referenced by POW().

◆ allPositive()

template<int Dim>
bool allPositive ( const IndexTM< int, Dim > &  a_index)

return true if all of a_index >= 0, false otherwise

References IndexedMoments< Dim, P >::indexOf().

Referenced by IndexedMoments< SpaceDim, CH_EBIS_ORDER >::indexOf(), and POW().