chombo-discharge
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
LevelTiles Class Reference

Class for storing the AMR hierarchy as a collection of tiles. More...

#include <CD_LevelTiles.H>

Classes

struct  TileComparator
 For lexicographically comparing tiles. More...
 

Public Types

using BoxIDs = std::pair< unsigned int, unsigned int >
 

Public Member Functions

 LevelTiles () noexcept
 Weak constructor. Must subsequently call the define function.
 
 LevelTiles (const DisjointBoxLayout &a_grids, const int a_blockingFactor) noexcept
 Full constructor - puts object in usable state. More...
 
virtual ~LevelTiles () noexcept
 Destructor (does nothing)
 
virtual void define (const DisjointBoxLayout &a_grids, const int a_blockingFactor) noexcept
 Define function. Puts object in usable state. More...
 
virtual const std::map< IntVect, unsigned int, TileComparator > & getMyTiles () const noexcept
 Get the tiles own by this rank. More...
 
virtual const std::map< IntVect, BoxIDs, TileComparator > & getOtherTiles () const noexcept
 Get the tiles own by this rank. More...
 
virtual const std::map< unsigned int, DataIndex > & getMyGrids () const noexcept
 Get the tiles own by this rank. More...
 

Protected Attributes

bool m_isDefined
 Is defined or not.
 
std::map< IntVect, unsigned int, TileComparatorm_myTiles
 "Tiles" owned by this rank
 
std::map< IntVect, BoxIDs, TileComparatorm_otherTiles
 Grids owned by other ranks.
 
std::map< unsigned int, DataIndex > m_myGrids
 Mapping of grid index to DataIndex.
 

Detailed Description

Class for storing the AMR hierarchy as a collection of tiles.

This class only makes sense in terms of a grid which uses constant-size grid, which is a restriction we happily accept when using particles. This class decomposes the AMR hierarchy into such tiles, each tile being the cells spanned by the blockingFactor^SpaceDim grid patch.

Constructor & Destructor Documentation

◆ LevelTiles()

LevelTiles::LevelTiles ( const DisjointBoxLayout &  a_grids,
const int  a_blockingFactor 
)
noexcept

Full constructor - puts object in usable state.

Parameters
[in]a_dblGrids
[in]a_blockingFactorGrid size.

Member Function Documentation

◆ define()

void LevelTiles::define ( const DisjointBoxLayout &  a_grids,
const int  a_blockingFactor 
)
virtualnoexcept

Define function. Puts object in usable state.

Parameters
[in]a_dblGrids
[in]a_blockingFactorGrid size.

◆ getMyGrids()

const std::map< unsigned int, DataIndex > & LevelTiles::getMyGrids ( ) const
virtualnoexcept

Get the tiles own by this rank.

Returns
m_myGridIndices

◆ getMyTiles()

const std::map< IntVect, unsigned int, LevelTiles::TileComparator > & LevelTiles::getMyTiles ( ) const
virtualnoexcept

Get the tiles own by this rank.

Returns
m_myTiles

◆ getOtherTiles()

const std::map< IntVect, LevelTiles::BoxIDs, LevelTiles::TileComparator > & LevelTiles::getOtherTiles ( ) const
virtualnoexcept

Get the tiles own by this rank.

Returns
m_otherTiles

The documentation for this class was generated from the following files: