Block-Structured AMR Software Framework
amrex::Cluster Class Reference

A cluster of tagged cells. More...

#include <AMReX_Cluster.H>

Public Member Functions

 Cluster () noexcept=default
 The default constructor – builds invalid Cluster. More...
 
 Cluster (IntVect *a, Long len) noexcept
 Construct a cluster from an array of IntVects. The Cluster object does NOT take over memory management of array; i.e. that's the user's ultimate responsibility. More...
 
 Cluster (Cluster &c, const Box &b)
 Construct new cluster by removing all points from c that lie in box b. Cluster c is modified and may become invalid. More...
 
 ~Cluster ()=default
 
 Cluster (const Cluster &)=delete
 
 Cluster (Cluster &&)=delete
 
Clusteroperator= (const Cluster &)=delete
 
Clusteroperator= (Cluster &&)=delete
 
const Boxbox () const noexcept
 Return minimal box containing all tagged points. More...
 
bool ok () const noexcept
 Does cluster contain any points? More...
 
Long numTag () const noexcept
 Returns number of tagged points in cluster. More...
 
Long numTag (const Box &b) const noexcept
 Return number of tagged points in intersection of cluster and Box b. More...
 
Clusterchop ()
 This operation splits a cluster into two pieces by selecting a cutting plane with certain optimal characteristics then dividing the tagged points into clusters on either side of the plane. One cluster is returned as a new object the other is the modified calling object. This is called by chop(eff) More...
 
Clusternew_chop ()
 This version of chop has slightly different logic - in this case if a cut results in two boxes with the same grid efficiency as the original box then the cut is reverted and a cut in a different direction is chosen This is called by new_chop(eff) More...
 
void distribute (ClusterList &clst, const BoxDomain &bd)
 Constructs a list of cluster objects obtained by intersecting this cluster with each box in bl. The list is returned in the argument clst. For each intersection that includes tagged points, construct a new cluster by removing those points from this object. Empty intersections or those that contain no tagged points will not generate a new cluster. Note that this cluster will be modified and possibly become invalid in the process. More...
 
Real eff () const noexcept
 Compute ratio of tagged to total number of points in cluster. More...
 

Private Member Functions

void minBox () noexcept
 Compute and store minimal box containing tagged points. More...
 

Private Attributes

Box m_bx
 The data. More...
 
IntVectm_ar = nullptr
 
Long m_len = 0
 

Detailed Description

A cluster of tagged cells.

Utility class for tagging error cells.

Constructor & Destructor Documentation

◆ Cluster() [1/5]

amrex::Cluster::Cluster ( )
defaultnoexcept

The default constructor – builds invalid Cluster.

◆ Cluster() [2/5]

amrex::Cluster::Cluster ( IntVect a,
Long  len 
)
noexcept

Construct a cluster from an array of IntVects. The Cluster object does NOT take over memory management of array; i.e. that's the user's ultimate responsibility.

Parameters
a
len

◆ Cluster() [3/5]

amrex::Cluster::Cluster ( Cluster c,
const Box b 
)

Construct new cluster by removing all points from c that lie in box b. Cluster c is modified and may become invalid.

Parameters
c
b

◆ ~Cluster()

amrex::Cluster::~Cluster ( )
default

◆ Cluster() [4/5]

amrex::Cluster::Cluster ( const Cluster )
delete

◆ Cluster() [5/5]

amrex::Cluster::Cluster ( Cluster &&  )
delete

Member Function Documentation

◆ box()

const Box& amrex::Cluster::box ( ) const
inlinenoexcept

Return minimal box containing all tagged points.

◆ chop()

Cluster * amrex::Cluster::chop ( )

This operation splits a cluster into two pieces by selecting a cutting plane with certain optimal characteristics then dividing the tagged points into clusters on either side of the plane. One cluster is returned as a new object the other is the modified calling object. This is called by chop(eff)

◆ distribute()

void amrex::Cluster::distribute ( ClusterList clst,
const BoxDomain bd 
)

Constructs a list of cluster objects obtained by intersecting this cluster with each box in bl. The list is returned in the argument clst. For each intersection that includes tagged points, construct a new cluster by removing those points from this object. Empty intersections or those that contain no tagged points will not generate a new cluster. Note that this cluster will be modified and possibly become invalid in the process.

Parameters
clst
bd

◆ eff()

Real amrex::Cluster::eff ( ) const
inlinenoexcept

Compute ratio of tagged to total number of points in cluster.

◆ minBox()

void amrex::Cluster::minBox ( )
privatenoexcept

Compute and store minimal box containing tagged points.

◆ new_chop()

Cluster * amrex::Cluster::new_chop ( )

This version of chop has slightly different logic - in this case if a cut results in two boxes with the same grid efficiency as the original box then the cut is reverted and a cut in a different direction is chosen This is called by new_chop(eff)

◆ numTag() [1/2]

Long amrex::Cluster::numTag ( ) const
inlinenoexcept

Returns number of tagged points in cluster.

◆ numTag() [2/2]

Long amrex::Cluster::numTag ( const Box b) const
noexcept

Return number of tagged points in intersection of cluster and Box b.

Parameters
b

◆ ok()

bool amrex::Cluster::ok ( ) const
inlinenoexcept

Does cluster contain any points?

◆ operator=() [1/2]

Cluster& amrex::Cluster::operator= ( Cluster &&  )
delete

◆ operator=() [2/2]

Cluster& amrex::Cluster::operator= ( const Cluster )
delete

Member Data Documentation

◆ m_ar

IntVect* amrex::Cluster::m_ar = nullptr
private

◆ m_bx

Box amrex::Cluster::m_bx
private

The data.

◆ m_len

Long amrex::Cluster::m_len = 0
private

The documentation for this class was generated from the following files: