|
|
| TiledMeshRefine ()=delete |
| | Default constructor – deleted because we never need it.
|
| |
| | TiledMeshRefine (const ProblemDomain &a_coarsestDomain, const Vector< int > &a_refRatios, const IntVect &a_tileSize, const IntVect &a_maxBlockSize) noexcept |
| | Constructor.
|
| |
|
virtual | ~TiledMeshRefine () noexcept |
| | Destructor (does nothing)
|
| |
| virtual int | regrid (Vector< Vector< Box > > &a_newGrids, const Vector< IntVectSet > &a_tagsLevel) const noexcept |
| | Regrid using the tile clustering algorithm.
|
| |
|
| std::uint64_t | encodeSuper (const IntVect &a_super) const noexcept |
| | Pack a super-tile index into a 64-bit key (21 bits per direction).
|
| |
| IntVect | decodeSuper (const std::uint64_t a_key) const noexcept |
| | Unpack a 64-bit super-tile key into a super-tile index.
|
| |
| int | subIndex (const IntVect &a_sub) const noexcept |
| | Linear sub-tile index of a sub-position within a super-tile.
|
| |
| void | addFineTile (SuperTiles &a_tiles, const IntVect &a_fineTile) const noexcept |
| | Add a fine tile (tile coordinates) to the representation by setting its sub-tile bit.
|
| |
| void | classify (SuperTiles &a_tiles) const noexcept |
| | Promote every partial super-tile whose bitmask is full to the full set.
|
| |
| void | gatherSuperTiles (SuperTiles &a_tiles) const noexcept |
| | Gather the (per-rank-local) super-tile representation onto all ranks.
|
| |
| void | nestFrom (SuperTiles &a_tiles, const SuperTiles &a_finer, const int a_refToFine, const Box &a_thisTileBox) const noexcept |
| | Inject the proper-nesting buffer into a level from the (classified) finer level.
|
| |
| virtual void | makeLevelTiles (SuperTiles &a_tiles, const SuperTiles &a_fineTiles, const IntVectSet &a_coarTags, const ProblemDomain &a_domain, const int a_refToFine, const int a_refToCoar) const noexcept |
| | Make the super-tile representation on the current level from tags and finer-level nesting.
|
| |
| virtual void | makeBoxesFromTiles (Vector< Box > &a_boxes, const SuperTiles &a_tiles, const ProblemDomain &a_domain) const noexcept |
| | Turn the super-tile representation into boxes.
|
| |
| void | packTiles (std::vector< IntVect > &a_tiles, const IntVect &a_maxTile, const IntVect &a_probLo, Vector< Box > &a_boxes) const noexcept |
| | Pack a set of tiles into variable-sized (anisotropic) boxes via recursive Berger-Rigoutsos bisection. This is the single shared box packer, called per partial super-tile.
|
| |
Class for generating AMR boxes using a tiling algorithm.
This class provides a scalable method for grid generation where the grids are generated in a pre-set tile pattern, by flagging min_block_size tiles rather than cells for refinement.
Generation is top-down over a grid of super-tiles, where a super-tile is a max_block_size block of min_block_size tiles. Each level is represented compactly as the set of fully-tagged super-tiles plus, for partially-tagged super-tiles, a bitmask of which sub-tiles are tagged. Fine tiles are therefore materialized only at the boundary of the refined region (inside partial super-tiles), and only that compact representation is gathered across MPI ranks – the intermediate memory scales with the refined surface plus the box count, not the refined volume. Full super-tiles become one (max_block_size) box each; partial super-tiles are packed into variable-sized boxes by packTiles. When max_block_size == min_block_size every super-tile is a single tile and the output is one box per tile (legacy behaviour).
| void TiledMeshRefine::gatherSuperTiles |
( |
SuperTiles & |
a_tiles | ) |
const |
|
protectednoexcept |
Gather the (per-rank-local) super-tile representation onto all ranks.
Locally-full super-tiles are classified first and gathered as a single key each (a "full
marker", no bitmask); partial super-tiles are gathered as key + bitmask and OR-ed per key. Because tags partition the domain by rank, a super-tile's tagged sub-tiles are disjoint across ranks, so the OR is exact and a locally-full super-tile is globally full. The gathered data scales with the number of touched super-tiles (full ones costing just a key), not the number of fine tiles. Partial super-tiles that OR to all-ones across ranks are promoted by the caller's subsequent classify().
- Parameters
-
| [in,out] | a_tiles | Local representation in; global representation out. |
| void TiledMeshRefine::nestFrom |
( |
SuperTiles & |
a_tiles, |
|
|
const SuperTiles & |
a_finer, |
|
|
const int |
a_refToFine, |
|
|
const Box & |
a_thisTileBox |
|
) |
| const |
|
protectednoexcept |
Inject the proper-nesting buffer into a level from the (classified) finer level.
Reproduces the legacy "grow each finer tile by one and coarsen" buffer exactly, but from the compact finer representation: full finer super-tiles contribute coarsen(grow(block,1)) in bulk, partial ones contribute coarsen(grow(tile,1)) per tagged sub-tile. Adds tiles to a_tiles; the caller reclassifies.
- Parameters
-
| [in,out] | a_tiles | Level being built (this level). |
| [in] | a_finer | Classified finer-level representation. |
| [in] | a_refToFine | Refinement ratio from this level to the finer level. |
| [in] | a_thisTileBox | Tile-coordinate bounding box of this level (for clipping). |
| void TiledMeshRefine::packTiles |
( |
std::vector< IntVect > & |
a_tiles, |
|
|
const IntVect & |
a_maxTile, |
|
|
const IntVect & |
a_probLo, |
|
|
Vector< Box > & |
a_boxes |
|
) |
| const |
|
protectednoexcept |
Pack a set of tiles into variable-sized (anisotropic) boxes via recursive Berger-Rigoutsos bisection. This is the single shared box packer, called per partial super-tile.
Recursive longest-extent bisection over the tile bounding box. At each node: if the node is fully tagged and within the per-direction cap it is emitted as one box; otherwise it is split. The split is tag-driven (Berger-Rigoutsos): cut at an empty slab (a zero-tag gap) in any direction if one exists, else at the strongest signature inflection, else at the longest-axis midpoint; a node over the cap is split at a cap multiple first. Deterministic (fixed axis/plane tie-breaks) and exact (a box is emitted only when fully tagged, so no untagged cells are covered).
- Parameters
-
| [in,out] | a_tiles | Tiles to pack, in tile coordinates; reordered in place. |
| [in] | a_maxTile | Per-direction cap in tile units (= max_block_size / tile_size). |
| [in] | a_probLo | Cell-space origin of the level (added when forming the cell boxes). |
| [out] | a_boxes | Boxes (cell coordinates) appended for these tiles. |