4#include <AMReX_Config.H>
39 void coarsen (BoxDomain& dest,
const BoxDomain& fin,
int ratio);
48 void refine (BoxDomain& dest,
82std::ostream&
operator<< (std::ostream& os,
const BoxDomain& bd);
132 [[nodiscard]]
bool ok ()
const;
A list of Boxes sharing a common IndexType.
Integer-lattice boxes and helpers for defining index-space regions.
A list of disjoint boxes built on top of BoxList.
Definition AMReX_BoxDomain.H:95
bool operator==(const BoxDomain &rhs) const
Return true if both domains cover identical regions.
Definition AMReX_BoxDomain.cpp:88
BoxDomain & coarsen(int ratio)
Coarsen every box by the supplied ratio.
Definition AMReX_BoxDomain.cpp:218
BoxDomain & refine(int ratio)
Refine every box by the supplied ratio.
Definition AMReX_BoxDomain.cpp:28
BoxDomain & rmBox(const Box &b)
Erase the intersection between this domain and b.
Definition AMReX_BoxDomain.cpp:157
BoxDomain & accrete(int sz)
Grow each stored box by sz cells on all sides.
Definition AMReX_BoxDomain.cpp:208
bool operator!=(const BoxDomain &rhs) const
Logical negation of operator==.
Definition AMReX_BoxDomain.cpp:94
BoxDomain()
Construct an empty BoxDomain of IndexType::TheCellType().
Definition AMReX_BoxDomain.cpp:99
BoxDomain & complementIn(const Box &b, const BoxDomain &bl)
Replace this domain with the indices in b that are not present in bl.
Definition AMReX_BoxDomain.cpp:63
BoxDomain & intersect(const Box &b)
Restrict the domain to the overlap with box b.
Definition AMReX_BoxDomain.cpp:11
BoxList::const_iterator const_iterator
Definition AMReX_BoxDomain.H:99
const BoxList & boxList() const
Return a const reference to the underlying BoxList of this BoxDomain.
Definition AMReX_BoxDomain.cpp:82
bool ok() const
Returns true if this BoxDomain is valid (disjoint or empty).
Definition AMReX_BoxDomain.cpp:178
void add(const Box &b)
Insert a box into the domain, clipping it so the stored boxes remain disjoint.
Definition AMReX_BoxDomain.cpp:121
A list of Boxes sharing a common IndexType.
Definition AMReX_BoxList.H:109
bool contains(const BoxList &bl) const
True if all Boxes in bl are contained in this BoxList.
Definition AMReX_BoxList.cpp:252
void clear()
Remove all Boxes from this BoxList.
Definition AMReX_BoxList.cpp:65
BoxList & shiftHalf(int dir, int num_halfs)
Apply Box::shiftHalf(dir, num_halfs) to every Box in the list.
Definition AMReX_BoxList.cpp:573
IndexType ixType() const noexcept
Returns the IndexType of Boxes in this BoxList.
Definition AMReX_BoxList.H:342
iterator end() noexcept
Return an iterator past the last Box.
Definition AMReX_BoxList.H:186
bool isEmpty() const noexcept
Is this BoxList empty?
Definition AMReX_BoxList.H:202
bool isNotEmpty() const noexcept
Is this BoxList not empty?
Definition AMReX_BoxList.H:204
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:652
iterator begin() noexcept
Return an iterator to the first Box.
Definition AMReX_BoxList.H:179
Long size() const noexcept
The number of Boxes in this BoxList.
Definition AMReX_BoxList.H:173
Box minimalBox() const
Returns smallest Box that contains all Boxes in this BoxList.
Definition AMReX_BoxList.cpp:747
Vector< Box >::const_iterator const_iterator
Definition AMReX_BoxList.H:115
BoxList & shift(int dir, int nzones)
Apply Box::shift(dir, nzones) to every Box in the list.
Definition AMReX_BoxList.cpp:563
A list of Cluster objects.
Definition AMReX_Cluster.H:146
__host__ __device__ BoxND< dim > coarsen(const BoxND< dim > &b, int ref_ratio) noexcept
Return a copy of b coarsened by the isotropic ratio ref_ratio.
Definition AMReX_Box.H:1469
__host__ __device__ BoxND< dim > refine(const BoxND< dim > &b, int ref_ratio) noexcept
Return a copy of b refined by the isotropic ratio ref_ratio.
Definition AMReX_Box.H:1510
Definition AMReX_Amr.cpp:50
std::ostream & operator<<(std::ostream &os, AmrMesh const &amr_mesh)
Stream helper; forwards to the friend declared inside AmrMesh.
Definition AMReX_AmrMesh.cpp:1306
void accrete(BoxDomain &dest, const BoxDomain &fin, int sz)
Grow each Box in BoxDomain fin by size sz.
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:1717
BoxND< 3 > Box
Box is an alias for amrex::BoxND instantiated with AMREX_SPACEDIM.
Definition AMReX_BaseFwd.H:35
BoxArray complementIn(const Box &b, const BoxArray &ba)
Make a BoxArray from the complement of ba within the Box b.
Definition AMReX_BoxArray.cpp:1710