4#include <AMReX_Config.H>
25 void boxDiff (BoxList& bl_diff,
const Box& b1in,
const Box& b2);
28 BoxList
refine (
const BoxList& bl,
int ratio);
31 BoxList
coarsen (
const BoxList& bl,
int ratio);
37 BoxList
accrete (
const BoxList& bl,
int sz);
44 std::ostream&
operator<< (std::ostream& os,
const BoxList& blist);
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;
131 bool operator== (const
BoxList& rhs) const;
133 bool operator!= (const
BoxList& rhs) const;
220 std::swap(
m_lbox, rhs.m_lbox);
221 std::swap(
btype, rhs.btype);
#define BL_ASSERT(EX)
Definition AMReX_BLassert.H:39
A collection of Boxes stored in an Array.
Definition AMReX_BoxArray.H:551
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
bool ok() const noexcept
True if this BoxList is valid; i.e. all the Boxes are valid and they all have the same IndexType....
Definition AMReX_BoxList.cpp:237
bool contains(const BoxList &bl) const
True if all Boxes in bl are contained in this BoxList.
Definition AMReX_BoxList.cpp:254
const_iterator cend() const noexcept
Definition AMReX_BoxList.H:123
bool isDisjoint() const
True if the set of intersecting Boxes is empty.
Definition AMReX_BoxList.cpp:244
BoxList & convert(IndexType typ) noexcept
Applies Box::convert(IndexType) to each Box in the BoxList.
Definition AMReX_BoxList.cpp:867
BoxList & refine(int ratio)
Refine each Box in the BoxList by the ratio.
Definition AMReX_BoxList.cpp:505
void clear()
Remove all Boxes from this BoxList.
Definition AMReX_BoxList.cpp:65
BoxList & shiftHalf(int dir, int num_halfs)
Applies Box::shiftHalf(int,int) to each Box in the BoxList.
Definition AMReX_BoxList.cpp:575
BoxList & coarsen(int ratio)
Coarsen each Box in the BoxList by the ratio.
Definition AMReX_BoxList.cpp:525
const Box & front() const noexcept
Definition AMReX_BoxList.H:101
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()
Construct an empty BoxList with IndexType::TheCellType().
Definition AMReX_BoxList.cpp:148
const_iterator end() const noexcept
Definition AMReX_BoxList.H:122
BoxList & intersect(const Box &b)
Modify this BoxList to contain only its intersection with Box b.
Definition AMReX_BoxList.cpp:267
iterator end() noexcept
Definition AMReX_BoxList.H:121
Vector< Box > & data() noexcept
Returns a reference to the Vector<Box>.
Definition AMReX_BoxList.H:215
const Vector< Box > & data() const noexcept
Returns a constant reference to the Vector<Box>.
Definition AMReX_BoxList.H:217
void catenate(BoxList &blist)
Catenate the BoxList to ourselves. Removes entries from blist.
Definition AMReX_BoxList.cpp:85
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(const BoxList &rhs)=default
std::size_t capacity() const noexcept
Definition AMReX_BoxList.H:115
void Bcast()
Definition AMReX_BoxList.cpp:910
BoxList(BoxList &&rhs)=default
bool isNotEmpty() const noexcept
Is this BoxList not empty?
Definition AMReX_BoxList.H:137
IndexType btype
The IndexType of Boxes in the BoxList.
Definition AMReX_BoxList.H:233
void reserve(std::size_t n)
Definition AMReX_BoxList.H:90
int simplify(bool best=false)
Merge adjacent Boxes in this BoxList. Return the number of Boxes merged. If "best" is specified we do...
Definition AMReX_BoxList.cpp:654
const_iterator begin() const noexcept
Definition AMReX_BoxList.H:118
BoxList & surroundingNodes() noexcept
Applies surroundingNodes(Box) to each Box in BoxArray. See the documentation of Box for details.
Definition AMReX_BoxList.cpp:827
BoxList & enclosedCells() noexcept
Applies Box::enclosedCells() to each Box in the BoxList.
Definition AMReX_BoxList.cpp:847
Box & front() noexcept
Definition AMReX_BoxList.H:99
void swap(BoxList &rhs) noexcept
Definition AMReX_BoxList.H:219
BoxList & accrete(int sz)
Grow each Box in the BoxList by size sz.
Definition AMReX_BoxList.cpp:545
BoxList & parallelComplementIn(const Box &b, const BoxList &bl)
Definition AMReX_BoxList.cpp:399
BoxList & maxSize(int chunk)
Forces each Box in the BoxList to have sides of length <= chunk.
Definition AMReX_BoxList.cpp:821
int simplify_doit(int depth)
Core simplify routine.
Definition AMReX_BoxList.cpp:680
void push_back(const Box &bn)
Append a Box to this BoxList.
Definition AMReX_BoxList.H:93
int ordered_simplify()
Assuming the boxes are nicely ordered.
Definition AMReX_BoxList.cpp:670
iterator begin() noexcept
Definition AMReX_BoxList.H:117
BoxList & removeEmpty()
Remove empty Boxes from this BoxList.
Definition AMReX_BoxList.cpp:93
Long size() const noexcept
The number of Boxes in this BoxList.
Definition AMReX_BoxList.H:113
Box minimalBox() const
Returns smallest Box that contains all Boxes in this BoxList.
Definition AMReX_BoxList.cpp:749
Vector< Box >::iterator iterator
Definition AMReX_BoxList.H:57
BoxList & complementIn(const Box &b, const BoxList &bl)
Definition AMReX_BoxList.cpp:307
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 & shift(int dir, int nzones)
Applies Box::shift(int,int) to each Box in the BoxList.
Definition AMReX_BoxList.cpp:565
BoxList & operator=(const BoxList &rhs)=default
void join(const BoxList &blist)
Join the BoxList to ourselves.
Definition AMReX_BoxList.cpp:71
__host__ __device__ IndexTypeND< dim > ixType() const noexcept
Returns the indexing type.
Definition AMReX_Box.H:130
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition AMReX_Vector.H:28
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)
Make a BoxArray from the intersection of Box b and BoxArray(+ghostcells).
Definition AMReX_BoxArray.cpp:1705
__host__ __device__ 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:1322
BoxND< 3 > Box
Definition AMReX_BaseFwd.H:27
BoxList boxDiff(const Box &b1in, const Box &b2)
Returns BoxList defining the compliment of b2 in b1in.
Definition AMReX_BoxList.cpp:599
BoxArray complementIn(const Box &b, const BoxArray &ba)
Make a BoxArray from the complement of BoxArray ba in Box b.
Definition AMReX_BoxArray.cpp:1698
Direction
Definition AMReX_Orientation.H:14
__host__ __device__ BoxND< dim > refine(const BoxND< dim > &b, int ref_ratio) noexcept
Definition AMReX_Box.H:1360
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.
Definition AMReX_BoxList.cpp:135