|
|
| LevelTiles () noexcept |
| | Weak constructor. Must subsequently call the define function.
|
| |
| | LevelTiles (const DisjointBoxLayout &a_dbl, const int a_minBlockSize) noexcept |
| | Full constructor - puts object in usable state.
|
| |
|
virtual | ~LevelTiles () noexcept |
| | Destructor (does nothing)
|
| |
| virtual void | define (const DisjointBoxLayout &a_dbl, const int a_minBlockSize) noexcept |
| | Define function. Puts object in usable state.
|
| |
| virtual const std::unordered_map< IntVect, unsigned int, TileHasher > & | getMyTiles () const noexcept |
| | Get the tiles owned by this rank.
|
| |
| virtual const std::unordered_map< IntVect, BoxIDs, TileHasher > & | getOtherTiles () const noexcept |
| | Get the tiles owned by other ranks.
|
| |
| virtual const std::unordered_map< unsigned int, DataIndex > & | getMyGrids () const noexcept |
| | Get the mapping of grid index to DataIndex.
|
| |
Class for storing the AMR hierarchy as a collection of tiles.
This class decomposes the AMR hierarchy into uniform tiles, each tile being the cells spanned by a minBlockSize^SpaceDim grid patch, and maps each tile to the grid box that contains it. Boxes may be larger than one tile (variable-sized/anisotropic boxes that are unions of aligned minBlockSize tiles): such a box is registered under every tile it covers, so the tile->box map stays uniform and a point->tile->box lookup is O(1). When minBlockSize == maxBlockSize every box is exactly one tile (the one-tile-per-box fast path).
| static LevelAndBox LevelTiles::findDestination |
( |
const RealVect & |
a_pos, |
|
|
const RealVect & |
a_probLo, |
|
|
const Vector< RealVect > & |
a_dx, |
|
|
const int |
a_minBlockSize, |
|
|
const Vector< RefCountedPtr< LevelTiles > > & |
a_levelTiles, |
|
|
const int |
a_finestLevel |
|
) |
| |
|
inlinestaticnoexcept |
Map a physical position to its owning (level, grid index, rank) via the finest containing tile.
Shared, header-inlined point->block core used by both ParticleContainer::findDestination (the per-particle remap hot path) and Realm::getLevelAndBox. The position is mapped to a min-block-size tile by integer division, then looked up in each level's tile->box hash, finest level first. It is O(1) per level (a tile computation plus an unordered_map lookup), never a linear scan over patches, and works for variable-sized/anisotropic boxes because every box is registered under all the min tiles it covers.
- Parameters
-
| [in] | a_pos | Physical position to locate. |
| [in] | a_probLo | Lower-left corner of the domain. |
| [in] | a_dx | Per-level grid spacing, indexed [level][dir] (isotropic per level). |
| [in] | a_minBlockSize | Tile size in cells (min_block_size). |
| [in] | a_levelTiles | Per-level tile->box maps (the single source of truth). |
| [in] | a_finestLevel | Finest AMR level to search. |
- Returns
- {level, gridIndex, rank, valid}; valid==false (other fields unspecified) if no tile owns the cell.