2 #ifndef AMREX_Cluster_H_
3 #define AMREX_Cluster_H_
4 #include <AMReX_Config.H>
60 [[nodiscard]] const
Box&
box () const noexcept {
return m_bx; }
65 [[nodiscard]]
bool ok () const noexcept {
return m_ar !=
nullptr &&
m_len > 0; }
77 [[nodiscard]] Long
numTag (
const Box& b)
const noexcept;
116 [[nodiscard]] Real
eff () const noexcept {
170 [[nodiscard]]
int length ()
const {
return static_cast<int>(lst.size()); }
194 [[nodiscard]]
BoxList boxList()
const;
201 void boxList (
BoxList& blst)
const;
#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
AMREX_GPU_HOST_DEVICE double d_numPts() const noexcept
Returns the number of points contained in the BoxND. This is intended for use only in diagnostic mess...
Definition: AMReX_Box.H:366
A list of Cluster objects.
Definition: AMReX_Cluster.H:141
std::list< Cluster * > lst
The data.
Definition: AMReX_Cluster.H:230
ClusterList(ClusterList &&)=delete
ClusterList(const ClusterList &)=delete
void append(Cluster *c)
Add cluster to end of list.
Definition: AMReX_Cluster.H:177
ClusterList()=default
The default constructor.
int length() const
Return number of clusters in list.
Definition: AMReX_Cluster.H:170
A cluster of tagged cells.
Definition: AMReX_Cluster.H:24
Cluster & operator=(const Cluster &)=delete
Cluster * new_chop()
This version of chop has slightly different logic - in this case if a cut results in two boxes with t...
Definition: AMReX_Cluster.cpp:337
IntVect * m_ar
Definition: AMReX_Cluster.H:130
Long m_len
Definition: AMReX_Cluster.H:131
Long numTag() const noexcept
Returns number of tagged points in cluster.
Definition: AMReX_Cluster.H:70
Real eff() const noexcept
Compute ratio of tagged to total number of points in cluster.
Definition: AMReX_Cluster.H:116
Cluster() noexcept=default
The default constructor – builds invalid Cluster.
Box m_bx
The data.
Definition: AMReX_Cluster.H:129
void distribute(ClusterList &clst, const BoxDomain &bd)
Constructs a list of cluster objects obtained by intersecting this cluster with each box in bl....
Definition: AMReX_Cluster.cpp:98
bool ok() const noexcept
Does cluster contain any points?
Definition: AMReX_Cluster.H:65
Cluster * chop()
This operation splits a cluster into two pieces by selecting a cutting plane with certain optimal cha...
Definition: AMReX_Cluster.cpp:261
void minBox() noexcept
Compute and store minimal box containing tagged points.
Definition: AMReX_Cluster.cpp:129
const Box & box() const noexcept
Return minimal box containing all tagged points.
Definition: AMReX_Cluster.H:60
Definition: AMReX_Amr.cpp:49
BoxArray intersect(const BoxArray &ba, const Box &b, int ng=0)
Make a BoxArray from the intersection of Box b and BoxArray(+ghostcells).
BoxArray const & boxArray(FabArrayBase const &fa)