12 #ifndef CD_LevelTiles_H
13 #define CD_LevelTiles_H
21 #include <DisjointBoxLayout.H>
22 #include <DataIndex.H>
25 #include <CD_NamespaceHeader.H>
35 using BoxIDs = std::pair<unsigned int, unsigned int>;
45 operator()(
const IntVect& a,
const IntVect& b)
const
47 D_TERM6(
if (a[0] > b[0])
return true;
else if (a[0] < b[0])
return false;,
if (a[1] > b[1])
return true;
48 else if (a[1] < b[1])
return false;
49 ,
if (a[2] > b[2])
return true;
50 else if (a[2] < b[2])
return false;
51 ,
if (a[3] > b[3])
return true;
52 else if (a[3] < b[3])
return false;
53 ,
if (a[4] > b[4])
return true;
54 else if (a[4] < b[4])
return false;
55 ,
if (a[5] > b[5])
return true;
56 else if (a[5] < b[5])
return false;);
71 LevelTiles(const DisjointBoxLayout& a_grids, const
int a_blockingFactor) noexcept;
84 define(const DisjointBoxLayout& a_grids, const
int a_blockingFactor) noexcept;
104 virtual const std::map<
unsigned int, DataIndex>&
129 #include <CD_NamespaceFooter.H>
Class for storing the AMR hierarchy as a collection of tiles.
Definition: CD_LevelTiles.H:33
bool m_isDefined
Is defined or not.
Definition: CD_LevelTiles.H:111
virtual const std::map< IntVect, unsigned int, TileComparator > & getMyTiles() const noexcept
Get the tiles own by this rank.
Definition: CD_LevelTiles.cpp:80
LevelTiles() noexcept
Weak constructor. Must subsequently call the define function.
Definition: CD_LevelTiles.cpp:21
virtual const std::map< IntVect, BoxIDs, TileComparator > & getOtherTiles() const noexcept
Get the tiles own by this rank.
Definition: CD_LevelTiles.cpp:92
virtual const std::map< unsigned int, DataIndex > & getMyGrids() const noexcept
Get the tiles own by this rank.
Definition: CD_LevelTiles.cpp:100
std::map< IntVect, BoxIDs, TileComparator > m_otherTiles
Grids owned by other ranks.
Definition: CD_LevelTiles.H:121
std::map< IntVect, unsigned int, TileComparator > m_myTiles
"Tiles" owned by this rank
Definition: CD_LevelTiles.H:116
virtual void define(const DisjointBoxLayout &a_grids, const int a_blockingFactor) noexcept
Define function. Puts object in usable state.
Definition: CD_LevelTiles.cpp:41
std::map< unsigned int, DataIndex > m_myGrids
Mapping of grid index to DataIndex.
Definition: CD_LevelTiles.H:126
For lexicographically comparing tiles.
Definition: CD_LevelTiles.H:43