4 #include <AMReX_Config.H>
113 [[nodiscard]] Long
size () const noexcept {
return m_lbox.size(); }
115 [[nodiscard]] std::size_t
capacity () const noexcept {
return m_lbox.capacity(); }
129 [[nodiscard]]
bool ok () const noexcept;
#define BL_ASSERT(EX)
Definition: AMReX_BLassert.H:39
A collection of Boxes stored in an Array.
Definition: AMReX_BoxArray.H:549
A List of Disjoint Boxes.
Definition: AMReX_BoxDomain.H:67
A class for managing a List of Boxes that share a common IndexType. This class implements operations ...
Definition: AMReX_BoxList.H:52
BoxList & shiftHalf(const IntVect &iv)
Applies Box::shiftHalf(IntVect) to each Box in BoxList.
bool ok() const noexcept
True if this BoxList is valid; i.e. all the Boxes are valid and they all have the same IndexType....
BoxList(const Box &bx)
Make a boxList consisting of a single Box.
bool contains(const BoxList &bl) const
True if all Boxes in bl are contained in this BoxList.
BoxList & surroundingNodes() noexcept
Applies surroundingNodes(Box) to each Box in BoxArray. See the documentation of Box for details.
const_iterator cend() const noexcept
Definition: AMReX_BoxList.H:123
bool isDisjoint() const
True if the set of intersecting Boxes is empty.
void clear()
Remove all Boxes from this BoxList.
BoxList(IndexType _btype)
Construct an empty BoxList with IndexType _btype.
BoxList & complementIn(const Box &b, const BoxArray &ba)
BoxList & intersect(const Box &b)
Modify this BoxList to contain only its intersection with Box b.
IndexType ixType() const noexcept
Returns the IndexType of Boxes in this BoxList.
Definition: AMReX_BoxList.H:194
const_iterator cbegin() const noexcept
Definition: AMReX_BoxList.H:119
BoxList(const Box &bx, const IntVect &tilesize)
Make a boxList consisting of non-overlapping tile box from a single Box.
BoxList()
Construct an empty BoxList with IndexType::TheCellType().
const_iterator end() const noexcept
Definition: AMReX_BoxList.H:122
Vector< Box > & data() noexcept
Returns a reference to the Vector<Box>.
Definition: AMReX_BoxList.H:215
BoxList & coarsen(int ratio)
Coarsen each Box in the BoxList by the ratio.
BoxList & accrete(int sz)
Grow each Box in the BoxList by size sz.
BoxList(Vector< Box > &&bxs)
Construct a boxlist from a rvalue Vector<Box>.
iterator end() noexcept
Definition: AMReX_BoxList.H:121
BoxList & removeEmpty()
Remove empty Boxes from this BoxList.
BoxList & convert(IndexType typ) noexcept
Applies Box::convert(IndexType) to each Box in the BoxList.
BoxList & parallelComplementIn(const Box &b, BoxList &&bl)
void catenate(BoxList &blist)
Catenate the BoxList to ourselves. Removes entries from blist.
BoxList(const Box &bx, int nboxes)
Make a BoxList consisting of nboxes Boxes from a single Box.
bool isEmpty() const noexcept
Is this BoxList empty?
Definition: AMReX_BoxList.H:135
void set(IndexType ixtyp) noexcept
Set the type of the BoxList. It's an error if the BoxList isn't empty.
Definition: AMReX_BoxList.H:196
BoxList & refine(const IntVect &ratio)
Refine each Box in the BoxList by the ratio.
BoxList(const BoxList &rhs)=default
std::size_t capacity() const noexcept
Definition: AMReX_BoxList.H:115
const Box & front() const noexcept
Definition: AMReX_BoxList.H:101
BoxList(BoxList &&rhs)=default
bool isNotEmpty() const noexcept
Is this BoxList not empty?
Definition: AMReX_BoxList.H:137
BoxList & operator=(const BoxList &rhs)=default
IndexType btype
The IndexType of Boxes in the BoxList.
Definition: AMReX_BoxList.H:233
BoxList & shift(int dir, int nzones)
Applies Box::shift(int,int) to each Box in the BoxList.
BoxList & complementIn(const Box &b, const BoxList &bl)
void reserve(std::size_t n)
Definition: AMReX_BoxList.H:90
BoxList & parallelComplementIn(const Box &b, const BoxArray &ba)
int simplify(bool best=false)
Merge adjacent Boxes in this BoxList. Return the number of Boxes merged. If "best" is specified we do...
const_iterator begin() const noexcept
Definition: AMReX_BoxList.H:118
BoxList & refine(int ratio)
Refine each Box in the BoxList by the ratio.
BoxList & maxSize(int chunk)
Forces each Box in the BoxList to have sides of length <= chunk.
BoxList & complementIn(const Box &b, BoxList &&bl)
void swap(BoxList &rhs) noexcept
Definition: AMReX_BoxList.H:219
BoxList & enclosedCells() noexcept
Applies Box::enclosedCells() to each Box in the BoxList.
BoxList & intersect(const BoxList &bl)
Modify this BoxList to contain only its intersection with BoxList bl.
BoxList & coarsen(const IntVect &ratio)
Coarsen each Box in the BoxList by the ratio.
BoxList(const BoxArray &ba)
Construct a BoxList from a BoxArray.
int simplify_doit(int depth)
Core simplify routine.
void push_back(const Box &bn)
Append a Box to this BoxList.
Definition: AMReX_BoxList.H:93
Box & front() noexcept
Definition: AMReX_BoxList.H:99
const Vector< Box > & data() const noexcept
Returns a constant reference to the Vector<Box>.
Definition: AMReX_BoxList.H:217
int ordered_simplify()
Assuming the boxes are nicely ordered.
iterator begin() noexcept
Definition: AMReX_BoxList.H:117
BoxList & shiftHalf(int dir, int num_halfs)
Applies Box::shiftHalf(int,int) to each Box in the BoxList.
Long size() const noexcept
The number of Boxes in this BoxList.
Definition: AMReX_BoxList.H:113
BoxList & maxSize(const IntVect &chunk)
Forces each Box in the BoxList to have dimth side of length <= chunk[dim].
Box minimalBox() const
Returns smallest Box that contains all Boxes in this BoxList.
Vector< Box >::iterator iterator
Definition: AMReX_BoxList.H:57
BoxList & parallelComplementIn(const Box &b, const BoxList &bl)
Vector< Box > m_lbox
The list of Boxes.
Definition: AMReX_BoxList.H:231
Vector< Box >::const_iterator const_iterator
Definition: AMReX_BoxList.H:58
BoxList & accrete(const IntVect &sz)
void join(const Vector< Box > &barr)
Join the Array of Boxes to ourselves.
void join(const BoxList &blist)
Join the BoxList to ourselves.
BoxList(const Box &bx, int nboxes, Direction dir)
Make a BoxList consisting of nboxes Boxes chopped in dir-direction from a single Box.
AMREX_GPU_HOST_DEVICE IndexTypeND< dim > ixType() const noexcept
Returns the indexing type.
Definition: AMReX_Box.H:127
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition: AMReX_Vector.H:27
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void swap(T &a, T &b) noexcept
Definition: AMReX_algoim_K.H:113
Definition: AMReX_Amr.cpp:49
void accrete(BoxDomain &dest, const BoxDomain &fin, int sz)
Grow each Box in BoxDomain fin by size sz and place the result into BoxDomain dest.
Definition: AMReX_BoxDomain.cpp:45
BoxArray intersect(const BoxArray &ba, const Box &b, int ng=0)
Make a BoxArray from the intersection of Box b and BoxArray(+ghostcells).
BoxList boxDiff(const Box &b1in, const Box &b2)
Returns BoxList defining the compliment of b2 in b1in.
BoxArray complementIn(const Box &b, const BoxArray &ba)
Make a BoxArray from the complement of BoxArray ba in Box b.
Direction
Definition: AMReX_Orientation.H:14
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE BoxND< dim > refine(const BoxND< dim > &b, int ref_ratio) noexcept
Definition: AMReX_Box.H:1342
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE BoxND< dim > coarsen(const BoxND< dim > &b, int ref_ratio) noexcept
Coarsen BoxND by given (positive) refinement ratio. NOTE: if type(dir) = CELL centered: lo <- lo/rati...
Definition: AMReX_Box.H:1304
std::ostream & operator<<(std::ostream &os, AmrMesh const &amr_mesh)
Definition: AMReX_AmrMesh.cpp:1236
BoxList removeOverlap(const BoxList &bl)
Return BoxList which covers the same area but has no overlapping boxes.