Chombo + EB + MF  3.2
Classes | Namespaces | Macros | Typedefs | Functions
CHArray.H File Reference

A multi-dimensional array class for Chombo. More...

#include <iomanip>
#include "CHArray_fwd.H"
#include <cassert>
Include dependency graph for CHArray.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  IntVect
 An integer Vector in SpaceDim-dimensional space. More...
 
class  Box
 A Rectangular Domain on an Integer Lattice. More...
 
class  Misc::TypeTr< T >
 Test for class type. More...
 
struct  Misc::TypeTr< T >::Two
 
struct  CHRange
 Defines a range of subscripts. More...
 
struct  ArSp::AllocRawPolicy< T, IsClass >
 
struct  ArSp::AllocRawPolicy< T, true >
 If elements are class type, allocate using placement new. More...
 
struct  ArSp::AllocRawPolicy< T, false >
 If element are not class type, just assign the address. More...
 
struct  ArSp::ReleaseRawPolicy< T, IsClass >
 
struct  ArSp::ReleaseRawPolicy< T, true >
 If elements are class type, invoke destructor on each element. More...
 
struct  ArSp::ReleaseRawPolicy< T, false >
 If elements are not class type, do nothing. More...
 
class  ArSp::DefaultArrayAlloc< T >
 Default allocator. More...
 
class  ArSp::IndexerData< Rank, DimT >
 Any rank and a zero-based subscript. More...
 
class  ArSp::IndexerData< Rank, CHRange >
 Any rank and a subscript range. More...
 
class  ArSp::IndexerData< 1, DimT >
 Rank 1 and a zero-based subscript (no data) More...
 
class  ArSp::IndexerData< 1, CHRange >
 Rank 1 and a subscript range. More...
 
class  ArSp::RSIndexer< Rank, DimT >
 Rank > 2 for zero-based subscripts and > 1 for subscript ranges. More...
 
class  ArSp::RSIndexer< 1, DimT >
 Specialization for Rank 1 (any type of subscript) More...
 
class  ArSp::RSIndexer< 2, USz_t >
 Full specialization for Rank 2 and zero-based subscripts. More...
 
class  ArSp::CSIndexer< Rank, DimT >
 Rank > 2 for zero-based subscripts and > 1 for subscript ranges. More...
 
class  ArSp::CSIndexer< 1, DimT >
 Specialization for Rank 1 (any type of subscript) More...
 
class  ArSp::CSIndexer< 2, USz_t >
 Full specialization for Rank 2 and zero-based subscripts. More...
 
struct  ArSp::ArTr< Rank, ArConf >
 
struct  ArSp::ArTr< Rank, ArZeroRow >
 
struct  ArSp::ArTr< Rank, ArZeroCol >
 
struct  ArSp::ArTr< Rank, ArRangeRow >
 
struct  ArSp::ArTr< Rank, ArRangeCol >
 
class  CHArray< T, Rank, ArConf, Alloc >
 Multidimensional array class. More...
 
struct  CHArray< T, Rank, ArConf, Alloc >::Array_impl
 
class  ArSp::NewArrayAlloc< T >
 Allocator that only permits allocation by new. More...
 
class  ArSp::ArrayOfVectorAlloc
 Allocator for an array of vectors contiguous in memory. More...
 
class  ArSp::ArrayOfMatrixAlloc
 Allocator for an array of matrices contiguous in memory. More...
 

Namespaces

 Misc
 
 ArSp
 

Macros

#define _CHARRAY_H_
 
#define CH_assert(cond)   assert(cond)
 
#define SpaceDim   2
 
#define D_DECL6(a, b, c, d, e, f)   a,b
 
#define D_TERM6(a, b, c, d, e, f)   a b
 
#define D_DEFIV
 
#define D_DEFBOX
 
#define D_IXIV
 

Typedefs

typedef double Real
 
typedef CHArray< Real, 1, ArZeroCol, ArSp::DefaultArrayAlloc< Real > > CHVector
 Vector definition. More...
 
typedef CHArray< Real, 2, ArZeroCol, ArSp::DefaultArrayAlloc< Real > > CHMatrix
 Matrix defined with column-ordered storage. More...
 

Functions

template<typename T >
USz_t ArSp::sizeOfDim (const T &dim)
 Get the size of a dimension. More...
 
template<>
USz_t ArSp::sizeOfDim< CHRange > (const CHRange &dim)
 
template<typename T , unsigned Rank, int ArConf, typename Alloc >
std::ostream & operator<< (std::ostream &os, const CHArray< T, Rank, ArConf, Alloc > &A)
 Output of an array. More...
 
template<>
std::ostream & operator<< (std::ostream &os, const CHMatrix &M)
 Pretty output of a matrix (should be in .cpp) More...
 
Support for describing dimensions by a range of subscripts
ArSp::USz_t operator* (const CHRange &a, const CHRange &b)
 Multiply two dimensions. More...
 
ArSp::USz_t operator* (const ArSp::USz_t &i, const CHRange &a)
 
ArSp::USz_t operator* (const CHRange &a, const ArSp::USz_t &i)
 

Detailed Description

A multi-dimensional array class for Chombo.

Macro Definition Documentation

◆ _CHARRAY_H_

#define _CHARRAY_H_

◆ CH_assert

#define CH_assert (   cond)    assert(cond)

Referenced by List< P >::addAfter(), List< P >::addBefore(), MGLevelOp< LevelData< MFCellFAB > >::addCoarserObserver(), AMRMultiGrid< LevelData< MFCellFAB > >::addInspector(), BinFab< T >::addItemsDestructive(), ComputeCutCellMoments< dim >::addMomentMaps(), RK4DenseOutput< Soln, Rhs, EXOP >::advance(), ARK4DenseOutput< Soln, Rhs, IMEXOp >::advance(), ARK4< X, FI, FE, dX >::advance(), IFid::aggregate(), ArSp::DefaultArrayAlloc< T >::allocate(), ArSp::NewArrayAlloc< T >::allocate(), ArSp::ArrayOfVectorAlloc::allocate(), ArSp::ArrayOfMatrixAlloc::allocate(), AMRMultiGrid< LevelData< MFCellFAB > >::AMRVCycle(), MultilevelLinearOp< T >::assign(), BaseEBCellFAB< Real >::assign(), BASISV(), BASISV_TM(), binomial(), LevelGridMetrics::blockDomain(), BoundaryIterator::box(), BoxLayoutData< BaseFab< int > >::BoxLayoutData(), RootSolver::Brent(), CHRange::CHRange(), GraphNode::clear(), IndexTM< Real, GLOBALDIM >::coarsen(), IntVect::coarsen(), coarsen(), AMRMultiGrid< LevelData< MFCellFAB > >::computeAMROperator(), AMRMultiGrid< LevelData< MFCellFAB > >::computeAMRResidualLevel(), ComputeCutCellMoments< dim >::computeMoments(), MinimalCCCM< dim >::computeMomentsRecursively(), Box::contains(), Box::convert(), IVSFAB< T >::copy(), BaseIFFAB< FaceStencil >::copy(), MiniIFFAB< Real >::copy(), BaseIVFAB< Real >::copy(), BaseEBCellFAB< Real >::copy(), CodimBox< S >::copy(), BaseEBFaceFAB< Real >::copy(), BaseFab< Real >::copy(), LevelData< BaseFab< int > >::copyTo(), AliasDataFactory< T >::create(), PetscSolver< LevelData< FArrayBox > >::create_mat_vec(), FourthOrderMappedFineInterp::CrFnNumGhost(), GMRESSolver< T >::CycleGMRES(), IVSFAB< T >::dataPtr(), BaseIFFAB< FaceStencil >::dataPtr(), MiniIFFAB< Real >::dataPtr(), BaseIVFAB< Real >::dataPtr(), BaseFab< Real >::dataPtr(), CoDimCopyManager< T >::define(), ListBox< T >::define(), MultilevelLinearOp< T >::define(), BaseIFFAB< FaceStencil >::define(), LayoutData< Vector< IntVectSet > >::define(), PetscSolver< LevelData< FArrayBox > >::define(), MiniIVFAB< Real >::define(), LevelData< BaseFab< int > >::define(), CodimBox< S >::define(), MiniIFFAB< Real >::define(), BaseIVFAB< Real >::define(), BaseEBCellFAB< Real >::define(), BaseEBFaceFAB< Real >::define(), IVSFAB< T >::define(), BoxLayoutData< BaseFab< int > >::define(), BaseFab< Real >::define(), RK4DenseOutput< Soln, Rhs, EXOP >::denseOutputCoefs(), ARK4DenseOutput< Soln, Rhs, IMEXOp >::denseOutputCoefs(), BaseIF::derivative(), BaseEBFaceFAB< Real >::direction(), MultilevelLinearOp< T >::dotProduct(), EBNormalizeByVolumeFraction::EBNormalizeByVolumeFraction(), MultiBlockLevelCopier::extraCells(), factorial(), TupleKeyMap< TupleTypenames, ValueT >::fetch(), BaseEBCellFAB< Real >::fill(), List< P >::firstElement(), EBPatchAdvect::floorPrimitives(), FortranArrayIndex(), BoxLayoutData< BaseFab< int > >::generalCopyTo(), BoxLayout::get(), BaseEBFaceFAB< Real >::getCellRegion(), EBLevelGrid::getCFIVS(), QuadCFStencil::getCoarIVS(), LevelFluxRegister::getCoarseLocations(), EBLevelGrid::getCoveringIVS(), EBLevelGrid::getDBL(), CodimBox< S >::getDirection(), CodimBox< S >::getDirections(), EBLevelGrid::getDomain(), EBLevelGrid::getEBIS(), EBLevelGrid::getEBISL(), QuadCFStencil::getFineIVS(), EBLevelGrid::getGhost(), CubedSphereShellPanelCS::getHeight(), MiniIVFAB< Real >::getIndex(), IVSFAB< T >::getIndex(), MiniIFFAB< Real >::getIndex(), BaseIVFAB< Real >::getIndex(), ListBox< T >::getInvalid(), ListBox< T >::getInvalidDestructive(), ListBox< T >::getItems(), ListBox< T >::getItemsDestructive(), MappedLevelData::getJUExchangeCopier(), MappedLevelData::getJUOld(), BaseIFFAB< FaceStencil >::getLocalVecIndex(), EBLevelGrid::getMaxCoarseningRatio(), EBLevelGrid::getMaxRefinementRatio(), BaseEBCellFAB< Real >::getMultiCells(), BaseEBCellFAB< Real >::getMultiValuedFAB(), BaseEBFaceFAB< Real >::getMultiValuedFAB(), CodimBox< S >::getNumOrient(), getOffsets(), CubedSphereSolidBlockCS::getR0(), CubedSphereSolidBlockCS::getR1(), CubedSphereShellPanelCS::getRadius(), BaseEBCellFAB< Real >::getRegion(), BaseEBFaceFAB< Real >::getRegion(), CodimBox< S >::getSequential(), BaseEBCellFAB< Real >::getSingleValuedFAB(), BaseEBFaceFAB< Real >::getSingleValuedFAB(), PolyGeom::getTangentVectors(), MappedLevelData::getUExchangeCopier(), BaseFab< Real >::getVal(), CubedSphereShellPanelCS::getVerticalMap(), MultiBlockLevelExchange::ghostCells(), MBAggLevelExchange::ghostCells(), EBFluxRegister::incrementCoarse(), EBFluxRegister::incrementFine(), GraphNodeImplem::index(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::indexOf(), TupleKeyMap< TupleTypenames, ValueT >::insert(), IndexTM< Real, GLOBALDIM >::integer_factorial(), LevelGridMetrics::interpolatorCrFnNumGhost(), BaseFab< Real >::interval(), IntVect::IntVect(), LevelGridMetrics::invalidateCr2ThisInterpolatorCrFnLevData(), ipow(), CFIVS::isEmpty(), QuadCFStencil::isEmpty(), CFIVS::isPacked(), ArSp::RSIndexer< Rank, DimT >::ixIndex1D(), ArSp::RSIndexer< 1, DimT >::ixIndex1D(), ArSp::RSIndexer< 2, USz_t >::ixIndex1D(), ArSp::CSIndexer< Rank, DimT >::ixIndex1D(), ArSp::CSIndexer< 1, DimT >::ixIndex1D(), ArSp::CSIndexer< 2, USz_t >::ixIndex1D(), List< P >::lastElement(), LayoutData< Vector< IntVectSet > >::LayoutData(), BaseIVFAB< Real >::linearIn(), IVSFAB< T >::linearIn(), BaseIFFAB< FaceStencil >::linearIn(), MiniIFFAB< Real >::linearIn(), CodimBox< S >::linearIn(), linearOut(), BaseIVFAB< Real >::linearOut(), BaseIFFAB< FaceStencil >::linearOut(), MiniIFFAB< Real >::linearOut(), IVSFAB< T >::linearOut(), CodimBox< S >::linearOut(), ListBox< T >::listItems(), LevelData< BaseFab< int > >::localCopyTo(), CHArray< Box, 1, ArZeroCol >::lowerBound(), NormalDerivativeNew< dim >::nChoosek(), nCk(), BaseEBCellFAB< Real >::nComp(), BaseEBFaceFAB< Real >::nComp(), BaseFab< Real >::nCompPtr(), MGLevelOp< LevelData< MFCellFAB > >::notifyObserversOfChange(), BaseFab< Real >::offset(), NeighborIterator::ok(), FASMultiGrid< T >::oneCycle(), LDaddNodeOp< T >::op(), NeighborIterator::operator()(), LayoutIterator::operator()(), ShiftIterator::operator()(), ListIterator< T >::operator()(), Scheduler::PeriodicFunctionLessThan::operator()(), MBStencilIterator::operator()(), MBVectorStencilIterator::operator()(), BoxIterator::operator()(), IVSFAB< T >::operator()(), CodimBox< S >::operator()(), BaseIFFAB< FaceStencil >::operator()(), MiniIFFAB< Real >::operator()(), BaseEBCellFAB< Real >::operator()(), BaseIVFAB< Real >::operator()(), BaseEBFaceFAB< Real >::operator()(), BaseFab< Real >::operator()(), BCFuncWrapper::operator()(), CopyIterator::operator()(), CHArray< Box, 1, ArZeroCol >::operator()(), ListIterator< T >::operator*(), DenseIntVectSetIterator::operator++(), operator<<(), RefCountedPtr< DataFactory< NodeFArrayBox > >::operator=(), CHArray< Box, 1, ArZeroCol >::operator=(), IFidTable::operator[](), Tuple< Real, SpaceDim *SpaceDim >::operator[](), LayoutData< Vector< IntVectSet > >::operator[](), BitSet::operator[](), RealVect::operator[](), IndexTM< Real, GLOBALDIM >::operator[](), BoxLayout::operator[](), Vector< LevelTGAHelmOp< LevelData< EBCellFAB >, EBFluxFAB > * >::operator[](), RefCountedPtr< DataFactory< NodeFArrayBox > >::operator[](), List< P >::operator[](), CopyIterator::operator[](), CodimBox< S >::orientBox(), CFIVS::packedBox(), BaseFab< Real >::performCopy(), BaseFab< Real >::performSetVal(), pfactorial(), MultilevelLinearOp< T >::preCond(), LevelGridMetrics::presetCr2ThisInterpolatorCrFnLevJU(), LevelGridMetrics::presetCr2ThisInterpolatorCrFnLevU(), FourthOrderMappedFineInterp::presetCrFnLevJU(), FourthOrderMappedFineInterp::presetCrFnLevU(), LevelGridMetrics::presetThis2FnInterpolatorCrFnLevU(), BoxLayout::procID(), MappedLevelData::rawJU(), MappedLevelData::rawU(), read(), read_vect_from_header(), RefCountedPtr< DataFactory< NodeFArrayBox > >::RefCountedPtr(), IndexTM< Real, GLOBALDIM >::reflect(), IntVect::reflect(), reflect(), EBFastFR::reflux(), AMRMultiGrid< LevelData< MFCellFAB > >::relaxOnlyHomogeneous(), List< P >::removeLink(), List< P >::replace(), RK4DenseOutput< Soln, Rhs, EXOP >::resetDt(), ARK4DenseOutput< Soln, Rhs, IMEXOp >::resetDt(), ARK4< X, FI, FE, dX >::resetDt(), MultilevelLinearOp< T >::residual(), GMRESSolver< T >::ResidualGMRES(), Box::sameSize(), CodimBox< S >::seq2bit(), Box::setBig(), AMRMultiGrid< LevelData< MFCellFAB > >::setBottomSolverEpsCushion(), BaseEBCellFAB< Real >::setCoveredCellVal(), BaseEBFaceFAB< Real >::setCoveredFaceVal(), CubedSphereShellPanelCS::setHeight(), EBLevelGrid::setMaxCoarseningRatio(), EBLevelGrid::setMaxRefinementRatio(), PetscSolver< LevelData< FArrayBox > >::setNull(), MGLevelOpObserver< LevelData< MFCellFAB > >::setObservee(), BitSetIterator::setpos(), BoxLayout::setProcID(), CubedSphereSolidBlockCS::setR0(), CubedSphereSolidBlockCS::setR1(), CubedSphereShellPanelCS::setRadius(), Box::setRange(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::setRegular(), GMRESSolver< T >::setRestartLen(), IndexedMoments< SpaceDim, CH_EBIS_ORDER >::setSize(), Box::setSmall(), PetscSolver< LevelData< FArrayBox > >::setup_solver(), IVSFAB< T >::setVal(), BaseIFFAB< FaceStencil >::setVal(), MiniIFFAB< Real >::setVal(), BaseIVFAB< Real >::setVal(), IntVect::setVal(), BaseEBCellFAB< Real >::setVal(), IndexTM< Real, GLOBALDIM >::setVal(), IndexTM< Real, GLOBALDIM >::shift(), BaseFab< Real >::shift(), IntVect::shift(), BaseFab< Real >::shiftHalf(), SimpleEllipsoidIF::SimpleEllipsoidIF(), BaseIVFAB< Real >::size(), BaseIFFAB< FaceStencil >::size(), MiniIFFAB< Real >::size(), CHArray< Box, 1, ArZeroCol >::size(), BiCGStabSolver< LevelData< T > >::solve(), RelaxSolver< T >::solve(), PetscSolver< LevelData< FArrayBox > >::solve_mfree_private(), PetscSolver< LevelData< FArrayBox > >::solve_private(), AMRFASMultiGrid< T >::solveNoInit(), AMRMultiGrid< LevelData< MFCellFAB > >::solveNoInitResid(), RK4DenseOutput< Soln, Rhs, EXOP >::start0end1(), ARK4DenseOutput< Soln, Rhs, IMEXOp >::start0end1(), MultiBlockLevelExchange::stencils(), MBAggLevelExchange::stencils(), MultiBlockLevelCopier::stencils(), BaseLevelHeatSolver< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::timeInterp(), CHArray< Box, 1, ArZeroCol >::totalOffset(), BinFab< T >::transfer(), ListBox< T >::transfer(), List< P >::transfer(), IndicesTransformation::transform(), ListBox< T >::undefine(), BaseFab< Real >::undefine(), CHArray< Box, 1, ArZeroCol >::undefine(), BoxLayoutData< BaseFab< int > >::unpackReceivesToMe_append(), BaseLevelCrankNicolson< LevelData< EBCellFAB >, EBFluxFAB, EBFluxRegister >::updateSoln(), BaseLevelBackwardEuler< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::updateSoln(), BaseLevelTGA< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::updateSolnWithTimeDependentOp(), BaseLevelTGA< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::updateSolnWithTimeIndependentOp(), CHArray< Box, 1, ArZeroCol >::upperBound(), ListIterator< T >::value(), BaseIF::value(), MultiBlockLevelExchange::vectorstencils(), VarCoefStencil::weight(), VoFStencil::weight(), write(), write_vect_to_header(), WriteMultiData< T >::writeData(), and WriteMultiData< T >::WriteMultiData().

◆ SpaceDim

#define SpaceDim   2

◆ D_DECL6

#define D_DECL6 (   a,
  b,
  c,
  d,
  e,
 
)    a,b

◆ D_TERM6

#define D_TERM6 (   a,
  b,
  c,
  d,
  e,
 
)    a b

◆ D_DEFIV

#define D_DEFIV
Value:
D_DECL6(DimT(iv[Indexer::ixIV(0)]), \
DimT(iv[Indexer::ixIV(1)]), \
DimT(iv[Indexer::ixIV(2)]), \
DimT(iv[Indexer::ixIV(3)]), \
DimT(iv[Indexer::ixIV(4)]), \
DimT(iv[Indexer::ixIV(5)]))
#define D_DECL6(a, b, c, d, e, f)
Definition: CHArray.H:39

Referenced by CHArray< Box, 1, ArZeroCol >::define().

◆ D_DEFBOX

#define D_DEFBOX
Value:
D_DECL6(DimT(box.smallEnd(Indexer::ixIV(0)), \
box.bigEnd(Indexer::ixIV(0))), \
DimT(box.smallEnd(Indexer::ixIV(1)), \
box.bigEnd(Indexer::ixIV(1))), \
DimT(box.smallEnd(Indexer::ixIV(2)), \
box.bigEnd(Indexer::ixIV(2))), \
DimT(box.smallEnd(Indexer::ixIV(3)), \
box.bigEnd(Indexer::ixIV(3))), \
DimT(box.smallEnd(Indexer::ixIV(4)), \
box.bigEnd(Indexer::ixIV(4))), \
DimT(box.smallEnd(Indexer::ixIV(5)), \
box.bigEnd(Indexer::ixIV(5))))
#define D_DECL6(a, b, c, d, e, f)
Definition: CHArray.H:39
Definition: EBInterface.H:45

Referenced by CHArray< Box, 1, ArZeroCol >::define().

◆ D_IXIV

#define D_IXIV
Value:
D_DECL6(iv[Indexer::ixIV(0)], \
iv[Indexer::ixIV(1)], \
iv[Indexer::ixIV(2)], \
iv[Indexer::ixIV(3)], \
iv[Indexer::ixIV(4)], \
iv[Indexer::ixIV(5)])
#define D_DECL6(a, b, c, d, e, f)
Definition: CHArray.H:39

Referenced by CHArray< Box, 1, ArZeroCol >::operator()().

Typedef Documentation

◆ Real

typedef double Real

◆ CHVector

Vector definition.

◆ CHMatrix

Matrix defined with column-ordered storage.

Function Documentation

◆ operator*() [1/3]

ArSp::USz_t operator* ( const CHRange a,
const CHRange b 
)
inline

Multiply two dimensions.

References ArSp::sizeOfDim().

◆ operator*() [2/3]

ArSp::USz_t operator* ( const ArSp::USz_t i,
const CHRange a 
)
inline

References ArSp::sizeOfDim().

◆ operator*() [3/3]

ArSp::USz_t operator* ( const CHRange a,
const ArSp::USz_t i 
)
inline

References ArSp::sizeOfDim().

◆ operator<<() [1/2]

template<typename T , unsigned Rank, int ArConf, typename Alloc >
std::ostream& operator<< ( std::ostream &  os,
const CHArray< T, Rank, ArConf, Alloc > &  A 
)

◆ operator<<() [2/2]

template<>
std::ostream& operator<< ( std::ostream &  os,
const CHMatrix M 
)
inline

Pretty output of a matrix (should be in .cpp)

References CH_assert, CHArray< T, Rank, ArConf, Alloc >::isAllocated(), M, and CHArray< T, Rank, ArConf, Alloc >::size().