![]() |
Block-Structured AMR Software Framework
|
Types and operations for discrete integer index space in AMReX. More...
Classes | |
| struct | amrex::Dim3 |
| A simple struct holding 3 int values for a 3D index. More... | |
| struct | amrex::CellIndexEnum |
| Type for defining CellIndex so that all IndexTypeND with different dimensions have the same CellIndex type. More... | |
| class | amrex::BoxND< dim > |
| A Rectangular Domain on an Integer Lattice. More... | |
| class | amrex::BoxIteratorND< dim > |
| Iterator over all IntVects in a Box. More... | |
| class | amrex::BoxList |
| A list of Boxes sharing a common IndexType. More... | |
| class | amrex::IndexTypeND< dim > |
| Cell-Based or Node-Based Indices. More... | |
| class | amrex::IntVectND< dim > |
| An Integer Vector in dim-Dimensional Space. More... | |
Typedefs | |
| using | amrex::BoxIterator = BoxIteratorND< 3 > |
Functions | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::grow (const BoxND< dim > &b, int i) noexcept |
Return a copy of b grown uniformly by i cells in every direction. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::grow (const BoxND< dim > &b, const IntVectND< dim > &v) noexcept |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::grow (const BoxND< dim > &b, int idir, int n_cell) noexcept |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::grow (const BoxND< dim > &b, Direction d, int n_cell) noexcept |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::growLo (const BoxND< dim > &b, int idir, int n_cell) noexcept |
Return a copy of b with the low end grown by n_cell cells in direction idir. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::growLo (const BoxND< dim > &b, Direction d, int n_cell) noexcept |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::growHi (const BoxND< dim > &b, int idir, int n_cell) noexcept |
Return a copy of b with the high end grown by n_cell cells in direction idir. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::growHi (const BoxND< dim > &b, Direction d, int n_cell) noexcept |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::coarsen (const BoxND< dim > &b, int ref_ratio) noexcept |
Return a copy of b coarsened by the isotropic ratio ref_ratio. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::coarsen (const BoxND< dim > &b, const IntVectND< dim > &ref_ratio) noexcept |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::refine (const BoxND< dim > &b, int ref_ratio) noexcept |
Return a copy of b refined by the isotropic ratio ref_ratio. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::refine (const BoxND< dim > &b, const IntVectND< dim > &ref_ratio) noexcept |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::shift (const BoxND< dim > &b, int dir, int nzones) noexcept |
Return a copy of b shifted by nzones cells in direction dir. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::shift (const BoxND< dim > &b, const IntVectND< dim > &nzones) noexcept |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::surroundingNodes (const BoxND< dim > &b, int dir) noexcept |
Return a BoxND with NODE based coordinates in direction dir that encloses BoxND b. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::surroundingNodes (const BoxND< dim > &b, Direction d) noexcept |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::surroundingNodes (const BoxND< dim > &b) noexcept |
Return a BoxND with NODE based coordinates in all directions that encloses BoxND b. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::convert (const BoxND< dim > &b, const IntVectND< dim > &typ) noexcept |
Return a copy of b converted to the nodal flags typ. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::convert (const BoxND< dim > &b, const IndexTypeND< dim > &typ) noexcept |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::enclosedCells (const BoxND< dim > &b, int dir) noexcept |
Return a BoxND with CELL based coordinates in direction dir that is enclosed by b. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::enclosedCells (const BoxND< dim > &b, Direction d) noexcept |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::enclosedCells (const BoxND< dim > &b) noexcept |
Return a BoxND with CELL based coordinates in all directions that is enclosed by b. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::bdryLo (const BoxND< dim > &b, int dir, int len=1) noexcept |
Return the BoxND of length len on the low boundary of b along coordinate direction dir. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::bdryHi (const BoxND< dim > &b, int dir, int len=1) noexcept |
Return the BoxND of length len on the high boundary of b along coordinate direction dir. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::bdryNode (const BoxND< dim > &b, Orientation face, int len=1) noexcept |
Similar to bdryLo and bdryHi except that it operates on the given face of BoxND b. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::adjCellLo (const BoxND< dim > &b, int dir, int len=1) noexcept |
Return the BoxND of length len adjacent to b on the low end along coordinate direction dir. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::adjCellHi (const BoxND< dim > &b, int dir, int len=1) noexcept |
Return the BoxND of length len adjacent to b on the high end along coordinate direction dir. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::adjCell (const BoxND< dim > &b, Orientation face, int len=1) noexcept |
Similar to adjCellLo and adjCellHi except that it operates on the given face of BoxND b. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::minBox (const BoxND< dim > &b1, const BoxND< dim > &b2) noexcept |
Return the minimal BoxND containing both b1 and b2. | |
| template<int dim> | |
| BoxND< dim > | amrex::getIndexBounds (BoxND< dim > const &b1, BoxND< dim > const &b2) noexcept |
Return the minimal index-space box covering b1 and b2. | |
| template<int dim = 3> requires ( 1<=dim && dim<=3 ) | |
| __host__ __device__ BoxND< dim > | amrex::makeSingleCellBox (int i, int j, int k, IndexTypeND< dim > typ=IndexTypeND< dim >::TheCellType()) |
Create a single-cell box at coordinates (i,j,k). | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::makeSingleCellBox (IntVectND< dim > const &vect, IndexTypeND< dim > typ=IndexTypeND< dim >::TheCellType()) |
Create a single-cell box at vect. | |
Types and operations for discrete integer index space in AMReX.
These types define the integer space on which AMReX data structures are defined. They are independent of physical coordinates and units.
Central types include:
Common operations include:
| using amrex::BoxIterator = typedef BoxIteratorND<3> |
Alias for BoxIteratorND<AMREX_SPACEDIM>.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| b | Box to coarsen. |
| ref_ratio | Direction-wise positive refinement ratios. |
b after coarsening.
|
inlinenoexcept |
Return a copy of b coarsened by the isotropic ratio ref_ratio.
Refinement of the coarsened box is guaranteed to contain the original box (taking nodal types into account). The two are equal only when the original box is coarsenable.
| b | Box to coarsen. |
| ref_ratio | Positive refinement ratio applied to every direction. |
b after coarsening.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| b | Box to convert. |
| typ | Target index type descriptor. |
b after conversion.
|
inlinenoexcept |
Return a copy of b converted to the nodal flags typ.
| b | Box to convert. |
| typ | Direction-wise nodal flags (0 cell, 1 node). |
b after conversion.
|
inlinenoexcept |
Return a BoxND with CELL based coordinates in all directions that is enclosed by b.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinenoexcept |
Return a BoxND with CELL based coordinates in direction dir that is enclosed by b.
|
inlinenoexcept |
Return the minimal index-space box covering b1 and b2.
The index types of b1 and b2 do not need to be the same. The result adopts the index type of b2.
| b1 | First box. |
| b2 | Second box (also supplies the target index type). |
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| b | Input Box. |
| v | Direction-wise cell counts to add (negative shrinks). |
b after the grow operation.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinenoexcept |
Return a copy of b grown uniformly by i cells in every direction.
Negative i values shrink the box by that many cells per direction.
| b | Input Box. |
| i | Number of cells to add (negative shrinks). |
b after the grow operation.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| b | Input Box. |
| idir | Coordinate direction to grow. |
| n_cell | Number of cells to add to the given direction (negative shrinks). |
b after the grow operation.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinenoexcept |
Return a copy of b with the high end grown by n_cell cells in direction idir.
Negative values shrink the high end of the returned box.
| b | Input Box. |
| idir | Coordinate direction to grow. |
| n_cell | Number of cells to add (negative shrinks). |
b after the asymmetric grow.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinenoexcept |
Return a copy of b with the low end grown by n_cell cells in direction idir.
Negative values shrink the low end of the returned box.
| b | Input Box. |
| idir | Coordinate direction to grow. |
| n_cell | Number of cells to add (negative shrinks). |
b after the asymmetric grow.
|
inline |
Create a single-cell box at coordinates (i,j,k).
| i | Cell index along x. |
| j | Cell index along y. |
| k | Cell index along z. |
| typ | Target index type (cell by default). |
|
inline |
Create a single-cell box at vect.
| vect | Cell indices of the single cell. |
| typ | Target index type (cell by default). |
|
inlinenoexcept |
Return the minimal BoxND containing both b1 and b2.
The boxes must share the same index type.
| b1 | First box. |
| b2 | Second box. |
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| b | Box to refine. |
| ref_ratio | Direction-wise positive refinement ratios. |
b after refinement.
|
inlinenoexcept |
Return a copy of b refined by the isotropic ratio ref_ratio.
Each direction is scaled by ref_ratio while respecting whether the box is cell-centered or nodal so that coarsening by the same ratio recovers the original extent.
| b | Box to refine. |
| ref_ratio | Positive refinement ratio applied to every direction. |
b after refinement.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| b | Box to shift. |
| nzones | Direction-wise signed cell offsets. |
b after shifting.
|
inlinenoexcept |
Return a copy of b shifted by nzones cells in direction dir.
| b | Box to shift. |
| dir | Coordinate direction to shift. |
| nzones | Signed number of cells to shift by. |
b after shifting.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.