|
| __host__ __device__ constexpr | BoxND () noexcept |
| | Default constructor creates an invalid box (use ok() to test).
|
| |
| __host__ __device__ constexpr | BoxND (const IntVectND< dim > &small, const IntVectND< dim > &big) noexcept |
| | Construct a cell-centered box spanning small through big.
|
| |
| __host__ __device__ | BoxND (const IntVectND< dim > &small, const int *vec_len) noexcept |
| | Construct a box with lower corner small and lengths vec_len.
|
| |
| __host__ __device__ | BoxND (const IntVectND< dim > &small, const IntVectND< dim > &big, const IntVectND< dim > &typ) noexcept |
| | Construct a box with explicit nodal/cell flags per direction.
|
| |
| __host__ __device__ | BoxND (const IntVectND< dim > &small, const IntVectND< dim > &big, IndexTypeND< dim > t) noexcept |
| | Construct a box with the given index type descriptor.
|
| |
template<typename T >
requires ( 1<=dim && dim<=3 ) |
| __host__ __device__ | BoxND (Array4< T > const &a) noexcept |
| | Construct a box from an Array4 view (bounds are inferred from begin/end).
|
| |
| __host__ __device__ const IntVectND< dim > & | smallEnd () const &noexcept |
| | Return the inclusive lower bound of the box.
|
| |
| __host__ __device__ int | smallEnd (int dir) const &noexcept |
| | Return the inclusive lower bound in the given direction.
|
| |
| __host__ __device__ const IntVectND< dim > & | bigEnd () const &noexcept |
| | Return the inclusive upper bound of the box.
|
| |
| __host__ __device__ int | bigEnd (int dir) const noexcept |
| | Return the inclusive upper bound in the given direction.
|
| |
| __host__ __device__ IndexTypeND< dim > | ixType () const noexcept |
| | Return the indexing type.
|
| |
| __host__ __device__ IntVectND< dim > | type () const noexcept |
| | Return the indexing type.
|
| |
| __host__ __device__ IndexType::CellIndex | type (int dir) const noexcept |
| | Return the indexing type in the specified direction.
|
| |
| __host__ __device__ IntVectND< dim > | size () const noexcept |
| | Return the length of the BoxND.
|
| |
| __host__ __device__ IntVectND< dim > | length () const noexcept |
| | Return the length of the BoxND.
|
| |
| __host__ __device__ int | length (int dir) const noexcept |
| | Return the length of the BoxND in given direction.
|
| |
| __host__ __device__ GpuArray< int, 3 > | length3d () const noexcept |
| | Return lengths padded to 3D (missing dims default to 1).
|
| |
| __host__ __device__ GpuArray< int, 3 > | loVect3d () const noexcept |
| | Return low-end coordinates padded to 3D (missing dims default to 0).
|
| |
| __host__ __device__ GpuArray< int, 3 > | hiVect3d () const noexcept |
| | Return high-end coordinates padded to 3D (missing dims default to 0).
|
| |
| __host__ __device__ const int * | loVect () const &noexcept |
| | Return a pointer to the low-end coordinates (useful for Fortran calls).
|
| |
| __host__ __device__ const int * | loVect () &&=delete |
| |
| __host__ __device__ const int * | hiVect () const &noexcept |
| | Return a pointer to the high-end coordinates (useful for Fortran calls).
|
| |
| __host__ __device__ const int * | hiVect () &&=delete |
| |
| __host__ __device__ int | operator[] (Orientation face) const noexcept |
| | Return the coordinate normal to the given face.
|
| |
| __host__ __device__ bool | isEmpty () const noexcept |
| | Checks if it is an empty BoxND.
|
| |
| __host__ __device__ bool | ok () const noexcept |
| | Return true if high bounds are >= low bounds and the index type is valid.
|
| |
| __host__ __device__ bool | contains (const IntVectND< dim > &p) const noexcept |
| | Return true if argument is contained within BoxND.
|
| |
| __host__ __device__ bool | contains (const Dim3 &p) const noexcept |
| | Return true if argument is contained within BoxND.
|
| |
| __host__ __device__ bool | contains (int i, int j, int k) const noexcept |
| | Return true if argument is contained within BoxND.
|
| |
| __host__ __device__ bool | contains (const BoxND &b) const noexcept |
| | Return true if argument is contained within BoxND. It is an error if the Boxes have different types.
|
| |
| __host__ __device__ bool | strictly_contains (const IntVectND< dim > &p) const noexcept |
| | Return true if argument is strictly contained within BoxND.
|
| |
| __host__ __device__ bool | strictly_contains (const BoxND &b) const noexcept |
| | Return true if argument is strictly contained within BoxND. It is an error if the Boxes have different types.
|
| |
| __host__ __device__ bool | strictly_contains (const Dim3 &p) const noexcept |
| | Return true if argument is strictly contained within BoxND.
|
| |
| __host__ __device__ bool | strictly_contains (int i, int j, int k) const noexcept |
| | Return true if argument is strictly contained within BoxND.
|
| |
| __host__ __device__ bool | intersects (const BoxND &b) const noexcept |
| | Return true if Boxes have non-null intersections. It is an error if the Boxes have different types.
|
| |
| __host__ __device__ bool | sameSize (const BoxND &b) const noexcept |
| | Return true is Boxes same size, ie translates of each other,. It is an error if they have different types.
|
| |
| __host__ __device__ bool | sameType (const BoxND &b) const noexcept |
| | Return true if Boxes have same type.
|
| |
| __host__ __device__ bool | operator== (const BoxND &b) const noexcept |
| | Return true if Boxes are identical (including type).
|
| |
| __host__ __device__ bool | operator!= (const BoxND &b) const noexcept |
| | Return true if Boxes differ (including type).
|
| |
| __host__ __device__ bool | operator< (const BoxND &rhs) const noexcept |
| | Lexicographic ordering (type, then lower, then upper corners).
|
| |
| __host__ __device__ bool | operator<= (const BoxND &rhs) const noexcept |
| | Return true if this box is <= rhs in the lexicographic ordering.
|
| |
| __host__ __device__ bool | operator> (const BoxND &rhs) const noexcept |
| | Return true if this box is > rhs in the lexicographic ordering.
|
| |
| __host__ __device__ bool | operator>= (const BoxND &rhs) const noexcept |
| | Return true if this box is >= rhs in the lexicographic ordering.
|
| |
| __host__ __device__ bool | cellCentered () const noexcept |
| | Return true if BoxND is cell-centered in all indexing directions.
|
| |
| __host__ __device__ Long | numPts () const noexcept |
| | Return the number of points contained in the BoxND.
|
| |
| __host__ __device__ double | d_numPts () const noexcept |
| | Return the number of points contained in the BoxND. This is intended for use only in diagnostic messages.
|
| |
| __host__ __device__ Long | volume () const noexcept |
| | Return the volume, in indexing space, of region enclosed by this BoxND. This is identical to numPts() for CELL centered BoxND; otherwise, numPts() > volume().
|
| |
| __host__ __device__ int | longside (int &dir) const noexcept |
| | Return length of longest side. dir is modified to give direction with longest side: 0...dim-1. Ignores type.
|
| |
| __host__ __device__ int | longside () const noexcept |
| | Return length of longest side. Ignores type.
|
| |
| __host__ __device__ int | shortside (int &dir) const noexcept |
| | Return length of shortest side. dir is modified to give direction with shortest side: 0...dim-1. Ignores type.
|
| |
| __host__ __device__ int | shortside () const noexcept |
| | Return length of shortest side. Ignores type.
|
| |
| __host__ __device__ Long | index (const IntVectND< dim > &v) const noexcept |
| | Return offset of point from smallend; i.e. index(smallend) -> 0, bigend would return numPts()-1. Is used in accessing FArrayBox.
|
| |
| __host__ __device__ IntVectND< dim > | atOffset (Long offset) const noexcept |
| | Given the offset, compute IntVectND<dim>
|
| |
template<int N = dim>
requires (1 <= N && N <= 3) |
| __host__ __device__ GpuArray< int, 3 > | atOffset3d (Long offset) const noexcept |
| |
| __host__ __device__ BoxND & | setSmall (const IntVectND< dim > &sm) noexcept |
| |
| __host__ __device__ BoxND & | setSmall (int dir, int sm_index) noexcept |
| | Redefine the small end of the BoxND.
|
| |
| __host__ __device__ BoxND & | setBig (const IntVectND< dim > &bg) noexcept |
| | Redefine the big end of the BoxND.
|
| |
| __host__ __device__ BoxND & | setBig (int dir, int bg_index) noexcept |
| | Redefine the big end of the BoxND.
|
| |
| __host__ __device__ BoxND & | setRange (int dir, int sm_index, int n_cells=1) noexcept |
| | Set the entire range in a given direction, starting at sm_index with length n_cells. NOTE: This will yield an illegal BoxND if n_cells <= 0.
|
| |
| __host__ __device__ BoxND & | setType (const IndexTypeND< dim > &t) noexcept |
| | Set indexing type.
|
| |
| __host__ __device__ BoxND & | shift (int dir, int nzones) noexcept |
| | Shift this BoxND nzones indexing positions in coordinate direction dir.
|
| |
| __host__ __device__ BoxND & | shift (const IntVectND< dim > &iv) noexcept |
| | Equivalent to b.shift(0,iv[0]).shift(1,iv[1]) ....
|
| |
| __host__ __device__ BoxND & | shiftHalf (int dir, int num_halfs) noexcept |
| | This member shifts the BoxND by "half" indices, thereby converting the BoxND from type CELL to NODE and visa-versa. b.shiftHalf(0,1) shifts b to the right by 1/2 cells. b.shiftHalf(1,-3) shifts b in the -j direction by 3/2 cells. NOTE: If num_halfs is EVEN the shift is num_halfs/2 full zones and hence will not change the type. This is: b.shifthalf(4) == b.shift(2).
|
| |
| __host__ __device__ BoxND & | shiftHalf (const IntVectND< dim > &iv) noexcept |
| | Equivalent to b.shiftHalf(0,iv[0]).shiftHalf(1,iv[1]) ...
|
| |
| __host__ __device__ BoxND & | convert (IndexTypeND< dim > typ) noexcept |
| | Convert the BoxND from the current type into the argument type. This may change the BoxND coordinates: type CELL -> NODE : increase coordinate by one on high end type NODE -> CELL : reduce coordinate by one on high end other type mappings make no change.
|
| |
| __host__ __device__ BoxND & | convert (const IntVectND< dim > &typ) noexcept |
| | Convert the BoxND from the current type into the argument type. This may change the BoxND coordinates: type CELL -> NODE : increase coordinate by one on high end type NODE -> CELL : reduce coordinate by one on high end other type mappings make no change.
|
| |
| __host__ __device__ BoxND & | surroundingNodes () noexcept |
| | Convert to NODE type in all directions.
|
| |
| __host__ __device__ BoxND & | surroundingNodes (int dir) noexcept |
| | Convert to NODE type in given direction.
|
| |
| __host__ __device__ BoxND & | surroundingNodes (Direction d) noexcept |
| | Convert to NODE type in given direction.
|
| |
| __host__ __device__ BoxND & | enclosedCells () noexcept |
| | Convert to CELL type in all directions.
|
| |
| __host__ __device__ BoxND & | enclosedCells (int dir) noexcept |
| | Convert to CELL type in given direction.
|
| |
| __host__ __device__ BoxND & | enclosedCells (Direction d) noexcept |
| | Convert to CELL type in given Direction d.
|
| |
| __host__ __device__ BoxND | operator& (const BoxND &rhs) const noexcept |
| | Return BoxND that is intersection of this BoxND and argument. The Boxes MUST be of same type.
|
| |
| __host__ __device__ BoxND & | operator&= (const BoxND &rhs) noexcept |
| | Intersect this BoxND with its argument. The Boxes MUST be of the same type.
|
| |
| __host__ __device__ BoxND & | minBox (const BoxND &b) noexcept |
| | Modify BoxND to that of the minimum BoxND containing both the original BoxND and the argument. Both Boxes must have identical type.
|
| |
| __host__ __device__ BoxND & | operator+= (const IntVectND< dim > &v) noexcept |
| | Shift BoxND (relative) by given IntVectND<dim>.
|
| |
| __host__ __device__ BoxND | operator+ (const IntVectND< dim > &v) const noexcept |
| | Shift BoxND (relative) by given IntVectND<dim>.
|
| |
| __host__ __device__ BoxND & | operator-= (const IntVectND< dim > &v) noexcept |
| | Shift BoxND (relative) by given IntVectND<dim>.
|
| |
| __host__ __device__ BoxND | operator- (const IntVectND< dim > &v) const noexcept |
| | Shift BoxND (relative) by given IntVectND<dim>.
|
| |
| __host__ __device__ BoxND | chop (int dir, int chop_pnt) noexcept |
| | Chop the BoxND at chop_pnt in the dir direction return one BoxND and modify the object BoxND. The union of the two is the original BoxND. The modified BoxND is the low end, the returned BoxND is the high end. If type(dir) = CELL, the Boxes are disjoint with the chop_pnt included in the high end (new BoxND). It is an ERROR if chop_pnt is the low end of the orig BoxND. If type(dir) = NODE, the chop_pnt is included in both Boxes but is the only point in common. It is also an error if the chop_pnt is an end node of the BoxND.
|
| |
| __host__ __device__ BoxND & | grow (int i) noexcept |
| | Grow in all directions by i cells (negative shrinks).
|
| |
| __host__ __device__ BoxND & | grow (const IntVectND< dim > &v) noexcept |
| | Grow in each direction by the supplied amount (negative shrinks).
|
| |
| __host__ __device__ BoxND & | grow (int idir, int n_cell) noexcept |
| | Grow on both ends in direction idir by n_cell cells (negative shrinks).
|
| |
| __host__ __device__ BoxND & | grow (Direction d, int n_cell) noexcept |
| | Grow on both ends in direction d by n_cell cells (negative shrinks).
|
| |
| __host__ __device__ BoxND & | growLo (int idir, int n_cell=1) noexcept |
| | Grow on the low end by n_cell cells in direction idir (negative shrinks).
|
| |
| __host__ __device__ BoxND & | growLo (Direction d, int n_cell=1) noexcept |
| | Grow on the low end by n_cell cells in direction d (negative shrinks).
|
| |
| __host__ __device__ BoxND & | growHi (int idir, int n_cell=1) noexcept |
| | Grow on the high end by n_cell cells in direction idir (negative shrinks).
|
| |
| __host__ __device__ BoxND & | growHi (Direction d, int n_cell=1) noexcept |
| | Grow on the high end by n_cell cells in direction d (negative shrinks).
|
| |
| __host__ __device__ BoxND & | grow (Orientation face, int n_cell=1) noexcept |
| | Grow in the direction of the given face.
|
| |
| __host__ __device__ BoxND & | refine (int ref_ratio) noexcept |
| | Refine BoxND by given (positive) refinement ratio. NOTE: if type(dir) = CELL centered: lo <- lo*ratio and hi <- (hi+1)*ratio - 1. NOTE: if type(dir) = NODE centered: lo <- lo*ratio and hi <- hi*ratio.
|
| |
| __host__ __device__ BoxND & | refine (const IntVectND< dim > &ref_ratio) noexcept |
| | Refine BoxND by given (positive) refinement ratio. NOTE: if type(dir) = CELL centered: lo <- lo*ratio and hi <- (hi+1)*ratio - 1. NOTE: if type(dir) = NODE centered: lo <- lo*ratio and hi <- hi*ratio.
|
| |
| __host__ __device__ BoxND & | coarsen (int ref_ratio) noexcept |
| | Coarsen BoxND by given (positive) refinement ratio. NOTE: if type(dir) = CELL centered: lo <- lo/ratio and hi <- hi/ratio. NOTE: if type(dir) = NODE centered: lo <- lo/ratio and hi <- hi/ratio + ((hiratio)==0 ? 0 : 1). That is, refinement of coarsened BoxND must contain the original BoxND.
|
| |
| __host__ __device__ BoxND & | coarsen (const IntVectND< dim > &ref_ratio) noexcept |
| | Coarsen BoxND by given (positive) refinement ratio. NOTE: if type(dir) = CELL centered: lo <- lo/ratio and hi <- hi/ratio. NOTE: if type(dir) = NODE centered: lo <- lo/ratio and hi <- hi/ratio + ((hiratio)==0 ? 0 : 1). That is, refinement of coarsened BoxND must contain the original BoxND.
|
| |
| __host__ __device__ void | next (IntVectND< dim > &) const noexcept |
| | Step through the rectangle. It is a runtime error to give a point not inside rectangle. Iteration may not be efficient.
|
| |
| __host__ __device__ bool | isSquare () const noexcept |
| |
| __host__ __device__ bool | coarsenable (const IntVectND< dim > &refrat, const IntVectND< dim > &min_width) const noexcept |
| | Return whether this Box is coarsenable.
|
| |
| __host__ __device__ bool | coarsenable (int refrat, int min_width=1) const noexcept |
| | Return whether this Box is coarsenable.
|
| |
| __host__ __device__ bool | coarsenable (const IntVectND< dim > &refrat, int min_width=1) const noexcept |
| | Return whether this Box is coarsenable.
|
| |
| __host__ __device__ void | normalize () noexcept |
| | Ensure each dimension has at least one cell or node by expanding empty directions.
|
| |
| __host__ __device__ BoxND & | makeSlab (int direction, int slab_index) noexcept |
| | Collapse the box to a single slab at coordinate slab_index along direction.
|
| |
| BoxIteratorND< dim > | iterator () const noexcept |
| | Return a BoxIteratorND that can be used to loop over the IntVects contained by the BoxND.
|
| |
| template<int new_dim> |
| __host__ __device__ BoxND< new_dim > | shrink () const noexcept |
| | Return a new BoxND of dimension new_dim and assigns the first new_dim dimension of this BoxND to it.
|
| |
| template<int new_dim> |
| __host__ __device__ BoxND< new_dim > | expand () const noexcept |
| | Return a new BoxND of size new_dim and assigns all values of this BoxND to it and (small=0, big=0, typ=CELL) to the remaining elements.
|
| |
| template<int new_dim> |
| __host__ __device__ BoxND< new_dim > | resize () const noexcept |
| | Return a new BoxND of size new_dim by either shrinking or expanding this BoxND.
|
| |