OpenImpala
Image-based parallel transport property solver
Loading...
Searching...
No Matches
OpenImpala::PercolationCheck Class Reference

Checks whether a phase percolates across the domain in a given direction. More...

#include <PercolationCheck.H>

Public Member Functions

amrex::Real activeVolumeFraction () const
 Returns the volume fraction of the percolating (active) subset of the phase.
bool percolates () const
 Returns true if the phase percolates in the specified direction.
 PercolationCheck (const amrex::Geometry &geom, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm, const amrex::iMultiFab &mf_phase, int phase_id, OpenImpala::Direction dir, int verbose=0)
 Construct a percolation checker.
void run (const amrex::iMultiFab &mf_phase, int phase_id, OpenImpala::Direction dir)

Static Public Member Functions

static std::string directionString (OpenImpala::Direction dir)
 Returns a human-readable direction string ("X", "Y", or "Z").

Detailed Description

Checks whether a phase percolates across the domain in a given direction.

Uses a parallel flood fill algorithm (6-connectivity) to determine if a connected path exists from the inlet face (low boundary) to the outlet face (high boundary) in the specified direction. This is a lightweight check that does not require any solver setup (no HYPRE dependency).

Constructor & Destructor Documentation

◆ PercolationCheck()

OpenImpala::PercolationCheck::PercolationCheck ( const amrex::Geometry & geom,
const amrex::BoxArray & ba,
const amrex::DistributionMapping & dm,
const amrex::iMultiFab & mf_phase,
int phase_id,
OpenImpala::Direction dir,
int verbose = 0 )

Construct a percolation checker.

Parameters
geomAMReX Geometry (should be non-periodic in the check direction).
baBoxArray for the domain decomposition.
dmDistributionMapping for processor assignments.
mf_phaseiMultiFab containing phase IDs (>=1 ghost cell required).
phase_idThe phase ID to check percolation for.
dirDirection to check (X, Y, or Z).
verboseVerbosity level (0=silent, 1=basic, 2=detailed). Default 0.

Member Function Documentation

◆ activeVolumeFraction()

amrex::Real OpenImpala::PercolationCheck::activeVolumeFraction ( ) const
inline

Returns the volume fraction of the percolating (active) subset of the phase.

◆ directionString()

std::string OpenImpala::PercolationCheck::directionString ( OpenImpala::Direction dir)
static

Returns a human-readable direction string ("X", "Y", or "Z").

◆ percolates()

bool OpenImpala::PercolationCheck::percolates ( ) const
inline

Returns true if the phase percolates in the specified direction.

◆ run()

void OpenImpala::PercolationCheck::run ( const amrex::iMultiFab & mf_phase,
int phase_id,
OpenImpala::Direction dir )

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