|
| TortuosityMLMG & | operator= (const TortuosityMLMG &)=delete |
| bool | solve () override |
| | Solve the masked voxel equations and populate m_mf_solution.
|
| | TortuosityMLMG (const amrex::Geometry &geom, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm, const amrex::iMultiFab &mf_phase_input, const amrex::Real vf, const int phase, const OpenImpala::Direction dir, const std::string &resultspath, const amrex::Real vlo=0.0, const amrex::Real vhi=1.0, int verbose=0, bool write_plotfile=false, amrex::Real eps=1.0e-8, int maxiter=200, int max_coarsening_level=30, const std::map< int, amrex::Real > &phase_coeffs={}) |
| | Construct a new MLMG tortuosity solver.
|
| | TortuosityMLMG (const TortuosityMLMG &)=delete |
| | ~TortuosityMLMG () override=default |
| void | buildDiffusionCoeffField () |
| amrex::iMultiFab | buildTraversableMask () |
| void | computePlaneFluxes (const amrex::MultiFab &mf_soln) |
| void | generateActivityMask (const amrex::iMultiFab &phaseFab, int phaseID, OpenImpala::Direction dir) |
| amrex::Real | getActiveVolumeFraction () const |
| amrex::Real | getEffectiveDiffusivity () const |
| amrex::Real | getFinalRelativeResidualNorm () const |
| amrex::Real | getFluxIn () const |
| amrex::Real | getFluxOut () const |
| const amrex::Geometry & | getGeometry () const |
| const std::map< int, amrex::Real > & | getPhaseCoeffMap () const |
| const std::vector< amrex::Real > & | getPlaneFluxes () const |
| amrex::Real | getPlaneFluxMaxDeviation () const |
| const amrex::MultiFab & | getSolutionField () const |
| bool | getSolverConverged () const |
| int | getSolverIterations () const |
| void | globalFluxes () |
| bool | isMultiPhase () const |
| TortuositySolverBase & | operator= (const TortuositySolverBase &)=delete |
| void | parallelFloodFill (amrex::iMultiFab &reachabilityMask, const amrex::iMultiFab &phaseFab, int phaseID, const amrex::Vector< amrex::IntVect > &seedPoints) |
| void | preconditionPhaseFab () |
| | TortuositySolverBase (const amrex::Geometry &geom, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm, const amrex::iMultiFab &mf_phase_input, const amrex::Real vf, const int phase, const OpenImpala::Direction dir, const std::string &resultspath, const amrex::Real vlo, const amrex::Real vhi, int verbose, bool write_plotfile, const std::map< int, amrex::Real > &phase_coeffs={}) |
| | Construct common solver infrastructure.
|
| | TortuositySolverBase (const TortuositySolverBase &)=delete |
| amrex::Real | value (const bool refresh=false) override |
| | Template method: solve, compute flux, return tortuosity.
|
| void | writeSolutionPlotfile (const std::string &label) |
| | ~TortuositySolverBase () override=default |
| virtual | ~Tortuosity ()=default |
| | Virtual destructor (essential for base classes with virtual functions). Ensures proper cleanup when derived classes are deleted via a base class pointer.
|
Computes tortuosity using AMReX's native matrix-free MLMG solver.
Solves div(D * grad(phi)) = 0 with Dirichlet BCs at inlet/outlet and zero-flux Neumann on lateral faces. The diffusion coefficient D is set per-cell from the phase map (harmonic-mean face averaging is handled internally by AMReX's MLABecLaplacian operator).
Inherits from TortuositySolverBase which provides shared infrastructure: phase preconditioning, diffusion coefficient field construction, activity mask generation, flux integration, and tortuosity calculation.
| OpenImpala::TortuosityMLMG::TortuosityMLMG |
( |
const amrex::Geometry & | geom, |
|
|
const amrex::BoxArray & | ba, |
|
|
const amrex::DistributionMapping & | dm, |
|
|
const amrex::iMultiFab & | mf_phase_input, |
|
|
const amrex::Real | vf, |
|
|
const int | phase, |
|
|
const OpenImpala::Direction | dir, |
|
|
const std::string & | resultspath, |
|
|
const amrex::Real | vlo = 0.0, |
|
|
const amrex::Real | vhi = 1.0, |
|
|
int | verbose = 0, |
|
|
bool | write_plotfile = false, |
|
|
amrex::Real | eps = 1.0e-8, |
|
|
int | maxiter = 200, |
|
|
int | max_coarsening_level = 30, |
|
|
const std::map< int, amrex::Real > & | phase_coeffs = {} ) |
Construct a new MLMG tortuosity solver.
- Parameters
-
| geom | AMReX Geometry defining the domain. |
| ba | AMReX BoxArray defining grid patch layout. |
| dm | AMReX DistributionMapping for processor assignment. |
| mf_phase_input | Input iMultiFab of phase IDs (1 component, >=1 ghost). |
| vf | Total volume fraction of the target phase (reference). |
| phase | Phase ID to solve for. |
| dir | Flow direction (X, Y, or Z). |
| resultspath | Output directory for results files. |
| vlo | Dirichlet potential at inlet face. Default 0.0. |
| vhi | Dirichlet potential at outlet face. Default 1.0. |
| verbose | Verbosity level (0=silent). Default 0. |
| write_plotfile | Write AMReX plotfile of solution. Default false. |
| eps | Solver relative tolerance. Default 1e-8. |
| maxiter | Max V-cycles before giving up. Default 200. |
| max_coarsening_level | Deepest MG level. Default 30 (i.e. unlimited in practice — bounded by the grid). |
Explicit params are the starting values; a [mlmg] block in the inputs file (mlmg.eps, mlmg.maxiter, mlmg.max_coarsening_level, mlmg.use_gmres, mlmg.gmres_restart) can still override at runtime.