![]() |
Block-Structured AMR Software Framework
|
Integer-lattice boxes and helpers for defining index-space regions. More...
#include <AMReX_Config.H>#include <AMReX_Algorithm.H>#include <AMReX_ArrayLim.H>#include <AMReX_BoxIterator.H>#include <AMReX_ccse-mpi.H>#include <AMReX_IntVect.H>#include <AMReX_IndexType.H>#include <AMReX_Orientation.H>#include <AMReX_SPACE.H>#include <AMReX_Array.H>#include <AMReX_Array4.H>#include <AMReX_Vector.H>#include <AMReX_GpuQualifiers.H>#include <AMReX_GpuControl.H>#include <AMReX_Math.H>#include <iosfwd>Go to the source code of this file.
Classes | |
| class | amrex::BoxND< dim > |
| A Rectangular Domain on an Integer Lattice. More... | |
| class | amrex::BoxConverter |
| struct | amrex::BoxIndexerND< dim > |
| Utility that maps flattened point indices back to IntVectND coordinates. More... | |
| struct | amrex::BoxIndexerND< 1 > |
| Specialization for the 1D case where no fast-division table is needed. More... | |
Namespaces | |
| namespace | amrex |
Typedefs | |
| using | amrex::BoxIndexer = BoxIndexerND< 3 > |
Functions | |
| void | amrex::AllGatherBoxes (Vector< Box > &bxs, int n_extra_reserve=0) |
Gather boxes from all MPI ranks into bxs. | |
| 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> | |
| std::ostream & | amrex::operator<< (std::ostream &os, const BoxND< dim > &bx) |
Write an ASCII representation of bx to os. | |
| template<int dim> | |
| std::istream & | amrex::operator>> (std::istream &is, BoxND< dim > &bx) |
Read a BoxND from is. | |
| template<int d, int... dims> | |
| __host__ __device__ constexpr BoxND< detail::get_sum< d, dims... >()> | amrex::BoxCat (const BoxND< d > &bx, const BoxND< dims > &...boxes) noexcept |
| Concatenate boxes along their dimensions. | |
| template<int d, int... dims> | |
| __host__ __device__ constexpr GpuTuple< BoxND< d >, BoxND< dims >... > | amrex::BoxSplit (const BoxND< detail::get_sum< d, dims... >()> &bx) noexcept |
Split bx into boxes whose dimensions match the template arguments. | |
| template<int new_dim, int old_dim> | |
| __host__ __device__ constexpr BoxND< new_dim > | amrex::BoxShrink (const BoxND< old_dim > &bx) noexcept |
Shrink bx to its first new_dim directions. | |
| template<int new_dim, int old_dim> | |
| __host__ __device__ constexpr BoxND< new_dim > | amrex::BoxExpand (const BoxND< old_dim > &bx) noexcept |
Expand bx to new_dim directions, padding with zeros. | |
| template<int new_dim, int old_dim> | |
| __host__ __device__ constexpr BoxND< new_dim > | amrex::BoxResize (const BoxND< old_dim > &bx) noexcept |
Resize bx to new_dim directions via shrink or expand. | |
| template<int dim> | |
| __host__ __device__ IntVectND< dim > | amrex::lbound_iv (BoxND< dim > const &box) noexcept |
Return the inclusive lower corner of box as an IntVectND. | |
| template<int dim> | |
| __host__ __device__ IntVectND< dim > | amrex::ubound_iv (BoxND< dim > const &box) noexcept |
Return the inclusive upper corner of box as an IntVectND. | |
| template<int dim> | |
| __host__ __device__ IntVectND< dim > | amrex::begin_iv (BoxND< dim > const &box) noexcept |
Return the iterator begin IntVectND for box. | |
| template<int dim> | |
| __host__ __device__ IntVectND< dim > | amrex::end_iv (BoxND< dim > const &box) noexcept |
Return the iterator end IntVectND for box. | |
| template<int dim> | |
| __host__ __device__ IntVectND< dim > | amrex::length_iv (BoxND< dim > const &box) noexcept |
Return the side lengths of box as an IntVectND. | |
| template<int dim> | |
| __host__ __device__ IntVectND< dim > | amrex::max_lbound_iv (BoxND< dim > const &b1, BoxND< dim > const &b2) noexcept |
| Return the component-wise maximum of the lower corners of two boxes. | |
| template<int dim> | |
| __host__ __device__ IntVectND< dim > | amrex::max_lbound_iv (BoxND< dim > const &b1, IntVectND< dim > const &lo) noexcept |
Return the component-wise maximum of the lower corner of b1 and lo. | |
| template<int dim> | |
| __host__ __device__ IntVectND< dim > | amrex::min_ubound_iv (BoxND< dim > const &b1, BoxND< dim > const &b2) noexcept |
| Return the component-wise minimum of the upper corners of two boxes. | |
| template<int dim> | |
| __host__ __device__ IntVectND< dim > | amrex::min_ubound_iv (BoxND< dim > const &b1, IntVectND< dim > const &hi) noexcept |
Return the component-wise minimum of the upper corner of b1 and hi. | |
| template<int dim> requires ( 1<=dim && dim<=3 ) | |
| __host__ __device__ Dim3 | amrex::lbound (BoxND< dim > const &box) noexcept |
Return the inclusive lower corner of box padded to Dim3. | |
| template<int dim> requires ( 1<=dim && dim<=3 ) | |
| __host__ __device__ Dim3 | amrex::ubound (BoxND< dim > const &box) noexcept |
Return the inclusive upper corner of box padded to Dim3. | |
| template<int dim> requires ( 1<=dim && dim<=3 ) | |
| __host__ __device__ Dim3 | amrex::begin (BoxND< dim > const &box) noexcept |
Return the iterator begin coordinate of box as Dim3. | |
| template<int dim> requires ( 1<=dim && dim<=3 ) | |
| __host__ __device__ Dim3 | amrex::end (BoxND< dim > const &box) noexcept |
Return the iterator end coordinate of box as Dim3. | |
| template<int dim> requires ( 1<=dim && dim<=3 ) | |
| __host__ __device__ Dim3 | amrex::length (BoxND< dim > const &box) noexcept |
Return the side lengths of box as Dim3. | |
| template<int dim> requires ( 1<=dim && dim<=3 ) | |
| __host__ __device__ Dim3 | amrex::max_lbound (BoxND< dim > const &b1, BoxND< dim > const &b2) noexcept |
| Return the Dim3 maximum of the lower corners of two boxes. | |
| template<int dim> requires ( 1<=dim && dim<=3 ) | |
| __host__ __device__ Dim3 | amrex::max_lbound (BoxND< dim > const &b1, Dim3 const &lo) noexcept |
Return the Dim3 maximum of the lower corner of b1 and lo. | |
| template<int dim> requires ( 1<=dim && dim<=3 ) | |
| __host__ __device__ Dim3 | amrex::min_ubound (BoxND< dim > const &b1, BoxND< dim > const &b2) noexcept |
| Return the Dim3 minimum of the upper corners of two boxes. | |
| template<int dim> requires ( 1<=dim && dim<=3 ) | |
| __host__ __device__ Dim3 | amrex::min_ubound (BoxND< dim > const &b1, Dim3 const &hi) noexcept |
Return the Dim3 minimum of the upper corner of b1 and hi. | |
| template<int dim> | |
| BoxND< dim > | amrex::getIndexBounds (BoxND< dim > const &b1) noexcept |
| 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<class T , class ... Ts> | |
| auto | amrex::getIndexBounds (T const &b1, T const &b2, Ts const &... b3) noexcept |
| Return the minimal index-space box covering all inputs. | |
| template<int dim> | |
| __host__ __device__ IntVectND< dim > | amrex::getCell (BoxND< dim > const *boxes, int nboxes, Long icell) noexcept |
Return the point coordinate corresponding to the flattened index icell. | |
| template<int dim> | |
| __host__ __device__ BoxND< dim > | amrex::makeSlab (BoxND< dim > const &b, int direction, int slab_index) noexcept |
Return a copy of b collapsed to a slab perpendicular to direction. | |
| 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. | |
Integer-lattice boxes and helpers for defining index-space regions.