|
| | MLNodeLaplacian ()=default |
| | Construct an empty operator; call define() before solving.
|
| |
| | MLNodeLaplacian (const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo(), const Vector< FabFactory< FArrayBox > const * > &a_factory={}, Real a_const_sigma=Real(0.0)) |
| | Convenience constructor without EB factories.
|
| |
| | MLNodeLaplacian (const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info, const Vector< EBFArrayBoxFactory const * > &a_factory, Real a_const_sigma=Real(0.0)) |
| | Convenience constructor that accepts embedded-boundary factories.
|
| |
| | ~MLNodeLaplacian () override=default |
| |
| | MLNodeLaplacian (const MLNodeLaplacian &)=delete |
| |
| | MLNodeLaplacian (MLNodeLaplacian &&)=delete |
| |
| MLNodeLaplacian & | operator= (const MLNodeLaplacian &)=delete |
| |
| MLNodeLaplacian & | operator= (MLNodeLaplacian &&)=delete |
| |
| void | define (const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo(), const Vector< FabFactory< FArrayBox > const * > &a_factory={}, Real a_const_sigma=Real(0.0)) |
| | Bind the nodal operator (no EB data).
|
| |
| void | define (const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info, const Vector< EBFArrayBoxFactory const * > &a_factory, Real a_const_sigma=Real(0.0)) |
| |
| std::string | name () const override |
| |
| void | setRZCorrection (bool rz) noexcept |
| | Enable cylindrical (RZ) metric terms.
|
| |
| void | setNormalizationThreshold (Real t) noexcept |
| | Threshold for normalization (prevents dividing by tiny averages).
|
| |
| void | setSigma (int amrlev, const MultiFab &a_sigma) |
| | Provide per-level conductivity (cell-centered MultiFab). A multi-component input also triggers mapped-coordinate mode.
|
| |
| void | compDivergence (const Vector< MultiFab * > &rhs, const Vector< MultiFab * > &vel) |
| | Compute rhs = div(vel) on nodal grids (used for projections).
|
| |
| void | compRHS (const Vector< MultiFab * > &rhs, const Vector< MultiFab * > &vel, const Vector< const MultiFab * > &rhnd, const Vector< MultiFab * > &rhcc) |
| | Assemble RHS including nodal/cell-centered forcing terms.
|
| |
| void | updateVelocity (const Vector< MultiFab * > &vel, const Vector< MultiFab const * > &sol) const |
| | Update velocities using the Poisson solution (projection correction).
|
| |
| void | compSyncResidualCoarse (MultiFab &sync_resid, const MultiFab &phi, const MultiFab &vold, const MultiFab *rhcc, const BoxArray &fine_grids, const IntVect &ref_ratio) |
| | Build coarse-level sync residuals for multilevel projections.
|
| |
| void | compSyncResidualFine (MultiFab &sync_resid, const MultiFab &phi, const MultiFab &vold, const MultiFab *rhcc) |
| | Build fine-level sync residuals for multilevel projections.
|
| |
| void | setGaussSeidel (bool flag) noexcept |
| | Choose red-black Gauss-Seidel instead of Jacobi smoothing.
|
| |
| void | setHarmonicAverage (bool flag) noexcept |
| | Toggle harmonic averaging when coarsening sigma.
|
| |
| void | setMapped (bool flag) noexcept |
| | Enable mapped-coordinate metrics (non-orthogonal grids).
|
| |
| void | setCoarseningStrategy (CoarseningStrategy cs) noexcept |
| | Pick between sigma-weighted or RAP coarsening (ignored if sigma constant).
|
| |
| BottomSolver | getDefaultBottomSolver () const final |
| |
| void | restriction (int amrlev, int cmglev, MultiFab &crse, MultiFab &fine) const final |
| | Restrict nodal data from fine grids to coarse MG level cmglev.
|
| |
| void | interpolation (int amrlev, int fmglev, MultiFab &fine, const MultiFab &crse) const final |
| | Add the prolongation of coarse data onto the fine grid (fine += prolong(crse)).
|
| |
| void | averageDownSolutionRHS (int camrlev, MultiFab &crse_sol, MultiFab &crse_rhs, const MultiFab &fine_sol, const MultiFab &fine_rhs) final |
| | Average solution/RHS pairs from fine AMR levels onto (camrlev).
|
| |
| void | reflux (int crse_amrlev, MultiFab &res, const MultiFab &crse_sol, const MultiFab &crse_rhs, MultiFab &fine_res, MultiFab &fine_sol, const MultiFab &fine_rhs) const final |
| | Flux register reflux coupling coarse/fine nodal solves (updates res using the solution and RHS arrays on both levels).
|
| |
| void | prepareForSolve () final |
| | Finalize metric terms, sigma averages, and BC caches before solving.
|
| |
| bool | needsUpdate () const final |
| | True if sigma-derived data need to be refreshed before reuse.
|
| |
| void | update () final |
| | Refresh sigma averages/stencils and clear the dirty flag.
|
| |
| void | Fapply (int amrlev, int mglev, MultiFab &out, const MultiFab &in) const final |
| | Apply the nodal Laplacian to in at (amrlev,mglev).
|
| |
| void | Fsmooth (int amrlev, int mglev, MultiFab &sol, const MultiFab &rhs) const final |
| | Execute the smoother on (amrlev,mglev).
|
| |
| void | normalize (int amrlev, int mglev, MultiFab &mf) const final |
| | Divide mf by the diagonal of the operator (used by CG-family bottom solvers).
|
| |
| void | fixUpResidualMask (int amrlev, iMultiFab &resmsk) final |
| | Adjust residual masks so EB Dirichlet nodes remain constrained.
|
| |
| void | getFluxes (const Vector< Array< MultiFab *, 3 > > &a_flux, const Vector< MultiFab * > &a_sol, Location a_loc) const final |
| | This overload is unused for nodal Laplacians (only cell-centered flux extraction is supported).
|
| |
| void | getFluxes (const Vector< MultiFab * > &a_flux, const Vector< MultiFab * > &a_sol) const final |
| | Compute face-centered fluxes given nodal solutions.
|
| |
| void | unimposeNeumannBC (int amrlev, MultiFab &rhs) const final |
| | Remove Neumann contributions previously imposed on rhs.
|
| |
| Vector< Real > | getSolvabilityOffset (int amrlev, int mglev, MultiFab const &rhs) const override |
| | Compute component-wise offsets needed for solvability enforcement.
|
| |
| void | fixSolvabilityByOffset (int amrlev, int mglev, MultiFab &rhs, Vector< Real > const &offset) const override |
| | Subtract solvability offsets from rhs.
|
| |
| void | compGrad (int amrlev, const Array< MultiFab *, 3 > &grad, MultiFab &sol, Location loc) const final |
| | Unsupported flux-style gradient extractor (kept for interface completeness).
|
| |
| void | compGrad (int amrlev, MultiFab &grad, MultiFab &sol) const |
| | Compute gradients of sol into nodal MultiFab grad on AMR level amrlev.
|
| |
| void | averageDownCoeffs () |
| | Average conductivity down across all AMR and MG levels.
|
| |
| void | averageDownCoeffsToCoarseAmrLevel (int flev) |
| | Average coefficients from fine AMR level flev to coarse AMR level flev-1.
|
| |
| void | averageDownCoeffsSameAmrLevel (int amrlev) |
| | Average coefficients across MG levels within AMR level amrlev.
|
| |
| void | restrictInteriorNodes (int camrlev, MultiFab &crhs, MultiFab &frhs) const |
| | Restrict interior-node RHS from fine to coarse when syncing.
|
| |
| void | FillBoundaryCoeff (MultiFab &sigma, const Geometry &geom) |
| | Fill ghost cells of sigma using geom for BC inference.
|
| |
| void | buildStencil () |
| | Build nodal operator stencils reflecting current sigma and metrics.
|
| |
| void | buildIntegral () |
| |
| void | buildSurfaceIntegral () |
| |
| void | setEBInflowVelocity (int amrlev, const MultiFab &eb_vel) |
| |
| | MLNodeLinOp () |
| |
| | ~MLNodeLinOp () override=default |
| |
| | MLNodeLinOp (const MLNodeLinOp &)=delete |
| |
| | MLNodeLinOp (MLNodeLinOp &&)=delete |
| |
| MLNodeLinOp & | operator= (const MLNodeLinOp &)=delete |
| |
| MLNodeLinOp & | operator= (MLNodeLinOp &&)=delete |
| |
| void | define (const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo(), const Vector< FabFactory< FArrayBox > const * > &a_factory={}, int a_eb_limit_coarsening=-1) |
| | Bind the nodal operator to an AMR hierarchy.
|
| |
| void | setSmoothNumSweeps (int nsweeps) noexcept |
| | Control how many smoother passes are executed inside each Fsmooth call.
|
| |
| void | setLevelBC (int, const MultiFab *, const MultiFab *=nullptr, const MultiFab *=nullptr, const MultiFab *=nullptr) final |
| |
| void | apply (int amrlev, int mglev, MultiFab &out, MultiFab &in, BCMode bc_mode, StateMode s_mode, const MLMGBndry *bndry=nullptr) const final |
| | Apply the nodal operator with the requested BC/state modes.
|
| |
| void | smooth (int amrlev, int mglev, MultiFab &sol, const MultiFab &rhs, bool skip_fillboundary, int niter) const override |
| | Invoke the nodal smoother on (amrlev,mglev).
|
| |
| void | solutionResidual (int amrlev, MultiFab &resid, MultiFab &x, const MultiFab &b, const MultiFab *crse_bcdata=nullptr) override |
| | Residual helper that uses solution BCs and optional coarse data (operates on AMR level amrlev).
|
| |
| void | correctionResidual (int amrlev, int mglev, MultiFab &resid, MultiFab &x, const MultiFab &b, BCMode bc_mode, const MultiFab *crse_bcdata=nullptr) override |
| | Residual helper for correction solves (optionally homogeneous BCs) on (amrlev,mglev).
|
| |
| Vector< Real > | getSolvabilityOffset (int amrlev, int mglev, MultiFab const &rhs) const override |
| | Return component-wise solvability offsets for (amrlev,mglev, rhs).
|
| |
| void | fixSolvabilityByOffset (int amrlev, int mglev, MultiFab &rhs, Vector< Real > const &offset) const override |
| | Subtract offsets produced by getSolvabilityOffset() from rhs.
|
| |
| void | prepareForSolve () override |
| | Prepare BC caches, masks, and metadata prior to solving.
|
| |
| void | preparePrecond () override |
| | Prepare auxiliary data used when the operator acts as a preconditioner.
|
| |
| void | setDirichletNodesToZero (int amrlev, int mglev, MultiFab &mf) const override |
| | Zero Dirichlet nodes in mf before a correction or residual pass.
|
| |
| bool | isSingular (int amrlev) const override |
| | Is it singular on AMR level amrlev?
|
| |
| bool | isBottomSingular () const override |
| | Is the bottom of the multigrid hierarchy singular?
|
| |
| Real | xdoty (int amrlev, int mglev, const MultiFab &x, const MultiFab &y, bool local) const final |
| | Dot-product helper.
|
| |
| Real | dotProductPrecond (Vector< MultiFab const * > const &x, Vector< MultiFab const * > const &y) const final |
| | Dot product used when the operator acts as a preconditioner.
|
| |
| Real | norm2Precond (Vector< MultiFab const * > const &x) const final |
| | L2 norm used when the operator acts as a preconditioner.
|
| |
| virtual void | applyBC (int amrlev, int mglev, MultiFab &phi, BCMode bc_mode, StateMode state_mode, bool skip_fillboundary=false) const |
| | Apply physical BCs prior to smoothing/apply.
|
| |
| void | nodalSync (int amrlev, int mglev, MultiFab &mf) const |
| | Synchronize nodal values across box/partition boundaries on (amrlev,mglev).
|
| |
| void | buildMasks () |
| | Build Dirichlet/dot-product masks and determine bottom singularity.
|
| |
| void | setOversetMask (int amrlev, const iMultiFab &a_dmask) |
| | Mark nodes that belong to overset (known) regions.
|
| |
| Real | normInf (int amrlev, MultiFab const &mf, bool local) const override |
| | Infinity norm helper operating on level amrlev (set local to true to skip MPI reduction).
|
| |
| void | avgDownResAmr (int, MultiFab &, MultiFab const &) const final |
| | Nodal average-down for residuals between AMR levels (no-op here).
|
| |
| void | interpolationAmr (int famrlev, MultiFab &fine, const MultiFab &crse, IntVect const &nghost) const override |
| | Prolong AMR-level data during FMG initialization.
|
| |
| void | averageDownAndSync (Vector< MultiFab > &sol) const override |
| | Average nodal solutions down the AMR hierarchy and synchronize overlaps.
|
| |
| void | interpAssign (int amrlev, int fmglev, MultiFab &fine, MultiFab &crse) const override |
| | Overwrite fine data with the prolongation of coarse data (fine = prolong(crse)).
|
| |
| | MLLinOpT ()=default |
| |
| virtual | ~MLLinOpT ()=default |
| |
| | MLLinOpT (const MLLinOpT< MF > &)=delete |
| |
| | MLLinOpT (MLLinOpT< MF > &&)=delete |
| |
| MLLinOpT< MF > & | operator= (const MLLinOpT< MF > &)=delete |
| |
| MLLinOpT< MF > & | operator= (MLLinOpT< MF > &&)=delete |
| |
| void | define (const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info, const Vector< FabFactory< FAB > const * > &a_factory, bool eb_limit_coarsening=true) |
| | Initialize the operator hierarchy on a set of AMR levels.
|
| |
| void | setDomainBC (const Array< BCType, 3 > &lobc, const Array< BCType, 3 > &hibc) noexcept |
| | Boundary of the whole domain.
|
| |
| void | setDomainBC (const Vector< Array< BCType, 3 > > &lobc, const Vector< Array< BCType, 3 > > &hibc) |
| | Boundary of the whole domain.
|
| |
| void | setDomainBCLoc (const Array< Real, 3 > &lo_bcloc, const Array< Real, 3 > &hi_bcloc) noexcept |
| | Set location offsets for the physical domain boundaries.
|
| |
| bool | needsCoarseDataForBC () const noexcept |
| | Needs coarse data for bc?
|
| |
| void | setCoarseFineBC (const MF *crse, int crse_ratio, LinOpBCType bc_type=LinOpBCType::Dirichlet) noexcept |
| | Set coarse/fine boundary conditions. For cell-centered solves only.
|
| |
| void | setCoarseFineBC (const MF *crse, IntVect const &crse_ratio, LinOpBCType bc_type=LinOpBCType::Dirichlet) noexcept |
| |
template<typename AMF >
requires (!std::same_as<MF,AMF>) |
| void | setCoarseFineBC (const AMF *crse, int crse_ratio, LinOpBCType bc_type=LinOpBCType::Dirichlet) noexcept |
| |
template<typename AMF >
requires (!std::same_as<MF,AMF>) |
| void | setCoarseFineBC (const AMF *crse, IntVect const &crse_ratio, LinOpBCType bc_type=LinOpBCType::Dirichlet) noexcept |
| |
| virtual void | setLevelBC (int, const MF *, const MF *=nullptr, const MF *=nullptr, const MF *=nullptr)=0 |
| | Set boundary conditions for given level. For cell-centered solves only.
|
| |
template<MultiFabLike AMF>
requires (!std::same_as<MF,AMF>) |
| void | setLevelBC (int amrlev, const AMF *levelbcdata, const AMF *robinbc_a=nullptr, const AMF *robinbc_b=nullptr, const AMF *robinbc_f=nullptr) |
| |
| void | setVerbose (int v) noexcept |
| | Set verbosity.
|
| |
| void | setMaxOrder (int o) noexcept |
| | Set order of interpolation at coarse/fine boundary.
|
| |
| int | getMaxOrder () const noexcept |
| | Get order of interpolation at coarse/fine boundary.
|
| |
| void | setEnforceSingularSolvable (bool o) noexcept |
| | Control whether the solver should try to make singular problems solvable.
|
| |
| bool | getEnforceSingularSolvable () const noexcept |
| |
| virtual int | getNComp () const |
| | Return number of components.
|
| |
| virtual int | getNGrow (int=0, int=0) const |
| |
| virtual void | restriction (int amrlev, int cmglev, MF &crse, MF &fine) const =0 |
| | Restriction onto coarse MG level.
|
| |
| virtual void | interpolation (int amrlev, int fmglev, MF &fine, const MF &crse) const =0 |
| | Add interpolated coarse MG level data to fine MG level data.
|
| |
| virtual void | interpAssign (int amrlev, int fmglev, MF &fine, MF &crse) const |
| | Overwrite fine MG level data with interpolated coarse data.
|
| |
| virtual void | interpolationAmr (int famrlev, MF &fine, const MF &crse, IntVect const &nghost) const |
| | Interpolation between AMR levels.
|
| |
| virtual void | averageDownSolutionRHS (int camrlev, MF &crse_sol, MF &crse_rhs, const MF &fine_sol, const MF &fine_rhs) |
| | Average-down data from fine AMR level to coarse AMR level.
|
| |
| virtual void | apply (int amrlev, int mglev, MF &out, MF &in, BCMode bc_mode, StateMode s_mode, const MLMGBndryT< MF > *bndry=nullptr) const =0 |
| | Apply the linear operator, out = L(in)
|
| |
| virtual void | smooth (int amrlev, int mglev, MF &sol, const MF &rhs, bool skip_fillboundary, int niter) const =0 |
| | Smooth.
|
| |
| virtual void | normalize (int amrlev, int mglev, MF &mf) const |
| | Divide mf by the diagonal component of the operator. Used by the bottom solvers.
|
| |
| virtual void | solutionResidual (int amrlev, MF &resid, MF &x, const MF &b, const MF *crse_bcdata=nullptr)=0 |
| | Compute residual for solution.
|
| |
| virtual void | prepareForFluxes (int amrlev, const MF *crse_bcdata=nullptr) |
| | Ensure BC caches are populated before flux extraction.
|
| |
| virtual void | correctionResidual (int amrlev, int mglev, MF &resid, MF &x, const MF &b, BCMode bc_mode, const MF *crse_bcdata=nullptr)=0 |
| | Compute residual for the residual-correction form, resid = b - L(x)
|
| |
| virtual void | reflux (int crse_amrlev, MF &res, const MF &crse_sol, const MF &crse_rhs, MF &fine_res, MF &fine_sol, const MF &fine_rhs) const |
| | Reflux at AMR coarse/fine boundary.
|
| |
| virtual void | compFlux (int amrlev, const Array< MF *, 3 > &fluxes, MF &sol, Location loc) const |
| | Compute fluxes.
|
| |
| virtual void | compGrad (int amrlev, const Array< MF *, 3 > &grad, MF &sol, Location loc) const |
| | Compute gradients of the solution.
|
| |
| virtual void | applyMetricTerm (int amrlev, int mglev, MF &rhs) const |
| | Apply metric scaling to the RHS on (amrlev,mglev).
|
| |
| virtual void | unapplyMetricTerm (int amrlev, int mglev, MF &rhs) const |
| | Remove metric scaling previously applied via applyMetricTerm().
|
| |
| virtual void | unimposeNeumannBC (int amrlev, MF &rhs) const |
| | Undo Neumann contributions stored on the RHS.
|
| |
| virtual void | applyInhomogNeumannTerm (int amrlev, MF &rhs) const |
| | Add extra terms introduced when treating inhomogeneous Neumann BC as homogeneous.
|
| |
| virtual void | applyOverset (int amrlev, MF &rhs) const |
| | Overset-only hook for zeroing regions covered by masks.
|
| |
| virtual bool | scaleRHS (int amrlev, MF *rhs) const |
| | Optionally scale the RHS to fix solvability.
|
| |
| virtual Vector< RT > | getSolvabilityOffset (int amrlev, int mglev, MF const &rhs) const |
| | Compute offsets used to enforce solvability (per component).
|
| |
| virtual void | fixSolvabilityByOffset (int amrlev, int mglev, MF &rhs, Vector< RT > const &offset) const |
| | Subtract previously computed offsets from the RHS.
|
| |
| virtual void | setDirichletNodesToZero (int amrlev, int mglev, MF &mf) const |
| | Optional hook for masking out Dirichlet nodes or cells prior to GMRES solves; the default is a no-op with a warning.
|
| |
| virtual RT | xdoty (int amrlev, int mglev, const MF &x, const MF &y, bool local) const =0 |
| | Dot-product helper used by bottom solvers.
|
| |
| virtual RT | dotProductPrecond (Vector< MF const * > const &x, Vector< MF const * > const &y) const |
| | Dot product over the composite AMR hierarchy, excluding cells covered by finer levels. Used when the operator acts as a preconditioner.
|
| |
| virtual RT | norm2Precond (Vector< MF const * > const &x) const |
| | L2 norm over the composite AMR hierarchy, excluding cells covered by finer levels. Used when the operator acts as a preconditioner.
|
| |
| virtual std::unique_ptr< MLLinOpT< MF > > | makeNLinOp (int grid_size) const |
| | Create the NSolve counterpart of this operator with the requested grid size.
|
| |
| virtual void | getFluxes (const Vector< Array< MF *, 3 > > &a_flux, const Vector< MF * > &a_sol, Location a_loc) const |
| | Extract per-direction fluxes for each AMR level.
|
| |
| virtual void | getFluxes (const Vector< MF * > &a_flux, const Vector< MF * > &a_sol) const |
| | Extract fluxes when the operator stores them in single MultiFabs per level.
|
| |
| virtual void | getEBFluxes (const Vector< MF * > &a_flux, const Vector< MF * > &a_sol) const |
| | Extract embedded-boundary fluxes.
|
| |
| virtual bool | supportNSolve () const |
| | Whether this operator supports NSolve.
|
| |
| virtual void | copyNSolveSolution (MF &dst, MF const &src) const |
| | Copy an NSolve solution from src to dst.
|
| |
| virtual void | postSolve (Vector< MF * > const &sol) const |
| | Optional hook invoked after the main solve completes.
|
| |
| virtual RT | normInf (int amrlev, MF const &mf, bool local) const =0 |
| | Infinity norm helper used by residual reductions.
|
| |
| virtual void | averageDownAndSync (Vector< MF > &sol) const =0 |
| | Average the solution hierarchy down (fine to coarse) and synchronize interfaces.
|
| |
| virtual void | avgDownResAmr (int clev, MF &cres, MF const &fres) const |
| |
| virtual void | avgDownResMG (int clev, MF &cres, MF const &fres) const |
| | Average residuals from fine to coarse MG levels (FMG helper).
|
| |
| virtual void | beginPrecondBC () |
| | Called when the operator starts being used as a preconditioner.
|
| |
| virtual void | endPrecondBC () |
| | Called when the operator stops being used as a preconditioner.
|
| |
| bool | isMFIterSafe (int amrlev, int mglev1, int mglev2) const |
| | Check whether mixing MFIter loops for different MG levels is safe.
|
| |
| int | NAMRLevels () const noexcept |
| | Return the number of AMR levels.
|
| |
| int | NMGLevels (int amrlev) const noexcept |
| | Return the number of MG levels at given AMR level.
|
| |
| const Geometry & | Geom (int amr_lev, int mglev=0) const noexcept |
| | Geometry accessor for (amr_lev,mglev).
|
| |