Labels connected components of a phase using parallel flood-fill.
More...
#include <ConnectedComponents.H>
|
| const std::vector< long long > & | componentVolumes () const |
| | Volume (cell count) of each component, indexed by label (1-based).
|
| | ConnectedComponents (const amrex::Geometry &geom, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm, const amrex::iMultiFab &mf_phase, int phase_id, int verbose=0) |
| | Construct and run connected component labeling.
|
| amrex::IntVect | findNextUnlabeled (const amrex::iMultiFab &labelMF, const amrex::iMultiFab &phaseFab, int phaseID) const |
| const amrex::Geometry & | getGeometry () const |
| | Geometry associated with the label field.
|
| const amrex::iMultiFab & | labelField () const |
| | The label field (each cell labeled 0 or 1..N).
|
| int | numComponents () const |
| | Number of connected components found.
|
| void | run (const amrex::iMultiFab &mf_phase, int phase_id) |
Labels connected components of a phase using parallel flood-fill.
Each contiguous region of the target phase (6-connectivity) is assigned a unique positive integer label. Cells not belonging to the target phase are labeled 0.
The algorithm uses iterative global flood-fill (similar to PercolationCheck) with sequential seed discovery: each unlabeled cell found globally is used as a seed to flood-fill one component at a time.
- Note
- Requires >= 1 ghost cell in the input iMultiFab.
◆ ConnectedComponents()
| OpenImpala::ConnectedComponents::ConnectedComponents |
( |
const amrex::Geometry & | geom, |
|
|
const amrex::BoxArray & | ba, |
|
|
const amrex::DistributionMapping & | dm, |
|
|
const amrex::iMultiFab & | mf_phase, |
|
|
int | phase_id, |
|
|
int | verbose = 0 ) |
Construct and run connected component labeling.
- Parameters
-
| geom | AMReX Geometry. |
| ba | BoxArray for domain decomposition. |
| dm | DistributionMapping. |
| mf_phase | iMultiFab containing phase IDs (>= 1 ghost cell). |
| phase_id | Phase to label components for. |
| verbose | Verbosity level (default 0). |
◆ componentVolumes()
| const std::vector< long long > & OpenImpala::ConnectedComponents::componentVolumes |
( |
| ) |
const |
|
inline |
Volume (cell count) of each component, indexed by label (1-based).
◆ findNextUnlabeled()
| amrex::IntVect OpenImpala::ConnectedComponents::findNextUnlabeled |
( |
const amrex::iMultiFab & | labelMF, |
|
|
const amrex::iMultiFab & | phaseFab, |
|
|
int | phaseID ) const |
◆ getGeometry()
| const amrex::Geometry & OpenImpala::ConnectedComponents::getGeometry |
( |
| ) |
const |
|
inline |
Geometry associated with the label field.
◆ labelField()
| const amrex::iMultiFab & OpenImpala::ConnectedComponents::labelField |
( |
| ) |
const |
|
inline |
The label field (each cell labeled 0 or 1..N).
◆ numComponents()
| int OpenImpala::ConnectedComponents::numComponents |
( |
| ) |
const |
|
inline |
Number of connected components found.
◆ run()
| void OpenImpala::ConnectedComponents::run |
( |
const amrex::iMultiFab & | mf_phase, |
|
|
int | phase_id ) |
The documentation for this class was generated from the following files: