Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::MLNodeLaplacianT< MF > Class Template Reference

#include <AMReX_MLNodeLaplacian.H>

Inheritance diagram for amrex::MLNodeLaplacianT< MF >:
amrex::MLNodeLinOpT< MF > amrex::MLLinOpT< MF >

Public Types

using FAB = typename MLNodeLinOpT<MF>::FAB
using RT = typename MLNodeLinOpT<MF>::RT
using BCMode = typename MLNodeLinOpT<MF>::BCMode
using StateMode = typename MLNodeLinOpT<MF>::StateMode
using Location = typename MLNodeLinOpT<MF>::Location
using CoarseningStrategy = typename MLNodeLinOpT<MF>::CoarseningStrategy
Public Types inherited from amrex::MLNodeLinOpT< MF >
using FAB = typename MLLinOpT<MF>::FAB
using RT = typename MLLinOpT<MF>::RT
using BCType = typename MLLinOpT<MF>::BCType
using BCMode = typename MLLinOpT<MF>::BCMode
using StateMode = typename MLLinOpT<MF>::StateMode
using Location = typename MLLinOpT<MF>::Location
using CoarseningStrategy = MLNodeLinOpCoarseningStrategy
Public Types inherited from amrex::MLLinOpT< MF >
using MFType = MF
using FAB = typename FabDataType<MF>::fab_type
using RT = typename FabDataType<MF>::value_type
using BCType = LinOpBCType
using BCMode = LinOpEnumType::BCMode
using StateMode = LinOpEnumType::StateMode
using Location = LinOpEnumType::Location

Public Member Functions

 MLNodeLaplacianT ()=default
 Construct an empty operator; call define() before solving.
 MLNodeLaplacianT (const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo(), const Vector< FabFactory< FAB > const * > &a_factory={}, RT a_const_sigma=RT(0.0))
 Convenience constructor without EB factories.
 MLNodeLaplacianT (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, RT a_const_sigma=RT(0.0))
 Convenience constructor that accepts embedded-boundary factories.
 ~MLNodeLaplacianT () override=default
 MLNodeLaplacianT (const MLNodeLaplacianT &)=delete
 MLNodeLaplacianT (MLNodeLaplacianT &&)=delete
MLNodeLaplacianT & operator= (const MLNodeLaplacianT &)=delete
MLNodeLaplacianT & operator= (MLNodeLaplacianT &&)=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< FAB > const * > &a_factory={}, RT a_const_sigma=RT(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, RT a_const_sigma=RT(0.0))
std::string name () const override
bool supportsMixedPrecision () const override
void setRZCorrection (bool rz) noexcept
 Enable cylindrical (RZ) metric terms.
void setBoundaryDivuCorrection (bool on) noexcept
 Second-order nodal divergence at nodes on Neumann and inflow domain faces.
void setNormalizationThreshold (RT t) noexcept
 Threshold for normalization (prevents dividing by tiny averages).
void setSigma (int amrlev, const MF &a_sigma)
 Provide per-level conductivity (cell-centered MultiFab). A multi-component input also triggers mapped-coordinate mode.
void spForwardSigma ()
void compDivergence (const Vector< MF * > &rhs, const Vector< MF * > &vel)
 Compute rhs = div(vel) on nodal grids (used for projections).
void compRHS (const Vector< MF * > &rhs, const Vector< MF * > &vel, const Vector< const MF * > &rhnd, const Vector< MF * > &rhcc)
 Assemble RHS including nodal/cell-centered forcing terms.
void updateVelocity (const Vector< MF * > &vel, const Vector< MF const * > &sol) const
 Update velocities using the Poisson solution (projection correction).
void compSyncResidualCoarse (MF &sync_resid, const MF &phi, const MF &vold, const MF *rhcc, const BoxArray &fine_grids, const IntVect &ref_ratio)
 Build coarse-level sync residuals for multilevel projections.
void compSyncResidualFine (MF &sync_resid, const MF &phi, const MF &vold, const MF *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, MF &crse, MF &fine) const final
 Restrict nodal data from fine grids to coarse MG level cmglev.
void interpolation (int amrlev, int fmglev, MF &fine, const MF &crse) const final
 Add the prolongation of coarse data onto the fine grid (fine += prolong(crse)).
void averageDownSolutionRHS (int camrlev, MF &crse_sol, MF &crse_rhs, const MF &fine_sol, const MF &fine_rhs) final
 Average solution/RHS pairs from fine AMR levels onto (camrlev).
void interpCoarseFineSolution (int famrlev, MF &fine_sol, const MF &crse_sol) const final
 Set the coarse/fine nodes of fine AMR level famrlev (Dirichlet mask set, not on a Dirichlet domain face) to the interpolated coarse solution, so that the composite solution does not depend on the initial guess there. Known nodes of an overset mask are kept.
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 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, MF &out, const MF &in) const final
 Apply the nodal Laplacian to in at (amrlev,mglev).
void Fsmooth (int amrlev, int mglev, MF &sol, const MF &rhs) const final
 Execute the smoother on (amrlev,mglev).
void normalize (int amrlev, int mglev, MF &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< MF *, 3 > > &a_flux, const Vector< MF * > &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< MF * > &a_flux, const Vector< MF * > &a_sol) const final
 Compute face-centered fluxes given nodal solutions.
void unimposeNeumannBC (int amrlev, MF &rhs) const final
 Remove Neumann contributions previously imposed on rhs.
Vector< RT > getSolvabilityOffset (int amrlev, int mglev, MF const &rhs) const override
 Compute component-wise offsets needed for solvability enforcement.
void fixSolvabilityByOffset (int amrlev, int mglev, MF &rhs, Vector< RT > const &offset) const override
 Subtract solvability offsets from rhs.
void compGrad (int amrlev, const Array< MF *, 3 > &grad, MF &sol, Location loc) const final
 Unsupported flux-style gradient extractor (kept for interface completeness).
void compGrad (int amrlev, MF &grad, MF &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, MF &crhs, MF &frhs) const
 Restrict interior-node RHS from fine to coarse when syncing.
void FillBoundaryCoeff (MF &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 MF &eb_vel)
bool supportsAlgMG () const override
 True if makeAlgMG is implemented for this operator.
void fillAlgMatrix (int mglev, MFIter const &mfi, Array4< Long const > const &gid, Array4< int const > const &lid, Long *ncols, Long *cols, Real *mat) const override
 Fill the matrix rows of one box for the algebraic solver.
void fillRHS (int mglev, MFIter const &mfi, Array4< int const > const &lid, Real *rhs, Array4< Real const > const &bfab) const override
 Fill the right-hand side of the rows of one box on MG level mglev.
template<typename AlgInt, typename AlgGid>
void fillMatrix_doit (int mglev, MFIter const &mfi, Array4< AlgGid const > const &gid, Array4< int const > const &lid, AlgInt *ncols, AlgInt *cols, Real *mat) const
template<typename AlgInt, typename AlgGid>
void fillMatrix_gpu (int mglev, MFIter const &mfi, Array4< AlgGid const > const &gid, Array4< int const > const &lid, AlgInt *ncols, AlgInt *cols, Real *mat) const
template<typename AlgInt, typename AlgGid>
void fillMatrix_cpu (int mglev, MFIter const &mfi, Array4< AlgGid const > const &gid, Array4< int const > const &lid, AlgInt *ncols, AlgInt *cols, Real *mat) const
Public Member Functions inherited from amrex::MLNodeLinOpT< MF >
 MLNodeLinOpT ()
 ~MLNodeLinOpT () override=default
 MLNodeLinOpT (const MLNodeLinOpT &)=delete
 MLNodeLinOpT (MLNodeLinOpT &&)=delete
MLNodeLinOpT & operator= (const MLNodeLinOpT &)=delete
MLNodeLinOpT & operator= (MLNodeLinOpT &&)=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< FAB > 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 MF *, const MF *=nullptr, const MF *=nullptr, const MF *=nullptr) final
 Set boundary conditions for given level. For cell-centered solves only.
void apply (int amrlev, int mglev, MF &out, MF &in, BCMode bc_mode, StateMode s_mode, const MLMGBndryT< MF > *bndry=nullptr) const final
 Apply the nodal operator with the requested BC/state modes.
void smooth (int amrlev, int mglev, MF &sol, const MF &rhs, bool skip_fillboundary, int niter) const override
 Invoke the nodal smoother on (amrlev,mglev).
void solutionResidual (int amrlev, MF &resid, MF &x, const MF &b, const MF *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, MF &resid, MF &x, const MF &b, BCMode bc_mode, const MF *crse_bcdata=nullptr) override
 Residual helper for correction solves (optionally homogeneous BCs) on (amrlev,mglev).
Vector< RT > getSolvabilityOffset (int amrlev, int mglev, MF const &rhs) const override
 Return component-wise solvability offsets for (amrlev,mglev, rhs).
void fixSolvabilityByOffset (int amrlev, int mglev, MF &rhs, Vector< RT > 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, MF &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?
RT xdoty (int amrlev, int mglev, const MF &x, const MF &y, bool local) const final
 Dot-product helper.
RT dotProductPrecond (Vector< MF const * > const &x, Vector< MF const * > const &y) const final
 Dot product used when the operator acts as a preconditioner.
RT norm2Precond (Vector< MF const * > const &x) const final
 L2 norm used when the operator acts as a preconditioner.
virtual void applyBC (int amrlev, int mglev, MF &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, MF &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.
void applyOverset (int amrlev, MF &mf) const override
 Zero mf at the known nodes of the overset mask.
RT normInf (int amrlev, MF const &mf, bool local) const override
 Infinity norm helper operating on level amrlev (set local to true to skip MPI reduction).
void avgDownResAmr (int, MF &, MF const &) const final
 Nodal average-down for residuals between AMR levels (no-op here).
void interpolationAmr (int famrlev, MF &fine, const MF &crse, IntVect const &nghost) const override
 Prolong AMR-level data during FMG initialization.
void averageDownAndSync (Vector< MF > &sol) const override
 Average nodal solutions down the AMR hierarchy and synchronize overlaps.
void interpAssign (int amrlev, int fmglev, MF &fine, MF &crse) const override
 Overwrite fine data with the prolongation of coarse data (fine = prolong(crse)).
std::unique_ptr< MLAlgMG > makeAlgMG (int mglev) const override
 Build the algebraic system of MG level mglev of AMR level 0 for the AlgMG solver. Operators that hypre supports implement this.
Public Member Functions inherited from amrex::MLLinOpT< MF >
 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
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 setPrintIndentation (std::string s)
 Prefix printed messages (e.g., to indent per level).
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 bool supportCustomBottomSolver () const
 Does this operator provide its own bottom solver (BottomSolver::custom)?
virtual void customBottomSolve (MLMGT< MF > *mlmg, MF &x, const MF &b, RT eps_rel, RT eps_abs, int maxiter)
 Bottom solve provided by the operator itself.
virtual int getNComp () const
 Return number of components.
virtual int getNGrow (int=0, int=0) const
virtual void prepareForFluxes (int amrlev, const MF *crse_bcdata=nullptr)
 Ensure BC caches are populated before flux extraction.
virtual void compFlux (int amrlev, const Array< MF *, 3 > &fluxes, MF &sol, Location loc) const
 Compute fluxes.
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 applyInhomogNeumannTerm (int amrlev, MF &rhs) const
 Add extra terms introduced when treating inhomogeneous Neumann BC as homogeneous.
virtual bool scaleRHS (int amrlev, MF *rhs) const
 Optionally scale the RHS to fix solvability.
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 getEBFluxes (const Vector< MF * > &a_flux, const Vector< MF * > &a_sol) const
 Extract embedded-boundary fluxes.
virtual bool supportsAnisotropicCoarsening () const
 True if the operator supports MG levels coarsened in any subset of directions. Then MLMG coarsens stretched cells only in their short directions until they are nearly cubic.
virtual GpuArray< Real, 3 > anisotropicCoarseningCellSize (Geometry const &geom) const
 Cell size used to pick the directions to coarsen when supportsAnisotropicCoarsening() is true. A direction with weaker coupling counts as having longer cells.
virtual bool supportNSolve () const
 Whether this operator supports NSolve.
bool isMixedPrecision () const noexcept
 True if this operator has a single precision copy for mixed precision.
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 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).

Protected Member Functions

void spCopySettings () override
void resizeMultiGrid (int new_size) final
void spUpdateScale () noexcept
EBFArrayBoxFactory const * ebFactory (int amrlev) const
Protected Member Functions inherited from amrex::MLNodeLinOpT< MF >
void spCopySettings () override
void resizeMultiGrid (int new_size) override
void buildMGHierarchy () override
 Build the MG levels of AMR level 0 below the finest one.
Protected Member Functions inherited from amrex::MLLinOpT< MF >
int spMetricExponent () const noexcept
Vector< Geometry > spGeom (const Vector< Geometry > &a_geom)
LPInfo dpInfo (LPInfo const &a_info) const
template<typename F>
void makeSPLinOp (LPInfo const &a_info, F const &f)
template<template< typename > class Op, typename F>
void spForward (F const &f)
const Vector< int > & AMRRefRatio () const noexcept
 Return AMR refinement ratios.
int AMRRefRatio (int amr_lev) const noexcept
 Return AMR refinement ratio at given AMR level.
IntVect AMRRefRatioVect (int amr_lev) const noexcept
 Return AMR refinement ratio as IntVect (1 in hidden direction).
FabFactory< FAB > const * Factory (int amr_lev, int mglev=0) const noexcept
GpuArray< BCType, 3 > LoBC (int icomp=0) const noexcept
GpuArray< BCType, 3 > HiBC (int icomp=0) const noexcept
bool hasBC (BCType bct) const noexcept
bool hasInhomogNeumannBC () const noexcept
bool hasRobinBC () const noexcept
virtual bool supportRobinBC () const noexcept
virtual bool supportInhomogNeumannBC () const noexcept
bool isBottomActive () const noexcept
MPI_Comm BottomCommunicator () const noexcept
MPI_Comm Communicator () const noexcept
void setCoarseFineBCLocation (const RealVect &cloc) noexcept
bool doAgglomeration () const noexcept
bool doConsolidation () const noexcept
bool doSemicoarsening () const noexcept
bool isCellCentered () const noexcept
virtual IntVect getNGrowVectRestriction () const
virtual void make (Vector< Vector< MF > > &mf, IntVect const &ng) const
virtual MF make (int amrlev, int mglev, IntVect const &ng) const
virtual MF make (int amrlev, int mglev, IntVect const &ng, MFInfo const &mf_info) const
 As above, with caller-selected allocation metadata for temporary storage.
virtual MF makeAlias (MF const &mf) const
virtual MF makeCoarseMG (int amrlev, int mglev, IntVect const &ng) const
 Allocate an MF on the next coarser MG level (mglev+1) with grow cells ng.
virtual MF makeCoarseMG (int amrlev, int mglev, IntVect const &ng, MFInfo const &mf_info) const
 As above, with caller-selected allocation metadata for temporary storage.
virtual MF makeCoarseAmr (int famrlev, IntVect const &ng) const
 Allocate an MF on the next coarser AMR level (famrlev-1) with grow cells ng.
virtual MF makeCoarseAmr (int famrlev, IntVect const &ng, MFInfo const &mf_info) const
 As above, with caller-selected allocation metadata for temporary storage.
virtual std::unique_ptr< FabFactory< FAB > > makeFactory (int, int) const
void prepareMGHierarchy ()
 Build the deferred MG levels of AMR level 0 once. See supportsAnisotropicCoarsening.
bool hasHiddenDimension () const noexcept
int hiddenDirection () const noexcept
Box compactify (Box const &b) const noexcept
template<typename T>
Array4< T > compactify (Array4< T > const &a) const noexcept
template<typename T>
T get_d0 (T const &dx, T const &dy, T const &) const noexcept
template<typename T>
T get_d1 (T const &, T const &dy, T const &dz) const noexcept

Static Protected Member Functions

static MF const * ebVolFrac (EBFArrayBoxFactory const *f)
 Volume fraction of EB factory f, or nullptr.
Static Protected Member Functions inherited from amrex::MLNodeLinOpT< MF >
static GpuArray< RT, 3 > toRT (GpuArray< Real, 3 > const &a) noexcept
 Convert a geometry array to RT.
Static Protected Member Functions inherited from amrex::MLLinOpT< MF >
static RT spScaleFor (RT x) noexcept
 The power of two p with p*x in [0.5,1), or 1 if x is zero or not finite.
static RT spDiagForScale (Vector< RT > const &diag) noexcept

Friends

class HypreMLNodeLap

Additional Inherited Members

Static Public Member Functions inherited from amrex::MLNodeLinOpT< MF >
static std::unique_ptr< iMultiFab > makeOwnerMask (const BoxArray &ba, const DistributionMapping &dm, const Geometry &geom)
 Build a nodal mask that marks points owned by this rank (used for sync).
Public Attributes inherited from amrex::MLLinOpT< MF >
Vector< Array< BCType, 3 > > m_lobc
Vector< Array< BCType, 3 > > m_hibc
Vector< Array< BCType, 3 > > m_lobc_orig
Vector< Array< BCType, 3 > > m_hibc_orig
Protected Attributes inherited from amrex::MLNodeLinOpT< MF >
std::unique_ptr< iMultiFab > m_owner_mask_top
std::unique_ptr< iMultiFab > m_owner_mask_bottom
Vector< Vector< std::unique_ptr< iMultiFab > > > m_dirichlet_mask
Vector< std::unique_ptr< iMultiFab > > m_cc_fine_mask
Vector< std::unique_ptr< iMultiFab > > m_nd_fine_mask
Vector< std::unique_ptr< LayoutData< int > > > m_has_fine_bndry
MF m_bottom_dot_mask
MF m_coarse_dot_mask
Vector< MF > m_precond_weight_mask
Vector< std::unique_ptr< iMultiFab > > m_norm_fine_mask
CoarseningStrategy m_coarsening_strategy = CoarseningStrategy::RAP
bool m_masks_built = false
bool m_overset_dirichlet_mask = false
int m_smooth_num_sweeps = 2
bool m_in_solution_mode = true
Protected Attributes inherited from amrex::MLLinOpT< MF >
int mg_box_min_width = 2
int mg_domain_min_width = 2
int mg_agg_no_split_direction = -1
bool mg_odd_coarsening = false
bool mg_independent_coarsening = false
LPInfo info
int verbose = 0
std::string print_ident
int maxorder = 3
bool enforceSingularSolvable = true
bool m_mg_deferred = false
 MG levels of AMR level 0 built at first solve.
bool m_mg_built = false
int m_num_amr_levels = 0
Vector< int > m_amr_ref_ratio
Vector< int > m_num_mg_levels
const MLLinOpT< MF > * m_parent = nullptr
IntVect m_ixtype
bool m_do_agglomeration = false
bool m_do_consolidation = false
bool m_do_semicoarsening = false
Vector< IntVect > mg_coarsen_ratio_vec
Vector< Vector< Geometry > > m_geom
 first Vector is for amr level and second is mg level
Vector< Vector< BoxArray > > m_grids
Vector< Vector< DistributionMapping > > m_dmap
Vector< Vector< std::unique_ptr< FabFactory< FAB > > > > m_factory
Vector< int > m_domain_covered
MPI_Comm m_default_comm = MPI_COMM_NULL
MPI_Comm m_bottom_comm = MPI_COMM_NULL
std::unique_ptr< CommContainer > m_raii_comm
Array< Real, 3 > m_domain_bloc_lo {{ 0._rt,0._rt,0._rt }}
Array< Real, 3 > m_domain_bloc_hi {{ 0._rt,0._rt,0._rt }}
bool m_needs_coarse_data_for_bc = false
LinOpBCType m_coarse_fine_bc_type = LinOpBCType::Dirichlet
IntVect m_coarse_data_crse_ratio = IntVect(-1)
RealVect m_coarse_bc_loc
const MF * m_coarse_data_for_bc = nullptr
MF m_coarse_data_for_bc_raii
bool m_precond_mode = false
std::unique_ptr< MLLinOpT< fMultiFab > > m_sp_linop
int m_sp_linop_count = 0
RT m_sp_scale = RT(1.0)
Real m_sp_length_scale = Real(1.0)
Static Protected Attributes inherited from amrex::MLLinOpT< MF >
static constexpr int mg_coarsen_ratio = 2
static constexpr bool mixed_precision_capable

Member Typedef Documentation

◆ BCMode

template<typename MF>
using amrex::MLNodeLaplacianT< MF >::BCMode = typename MLNodeLinOpT<MF>::BCMode

◆ CoarseningStrategy

template<typename MF>
using amrex::MLNodeLaplacianT< MF >::CoarseningStrategy = typename MLNodeLinOpT<MF>::CoarseningStrategy

◆ FAB

template<typename MF>
using amrex::MLNodeLaplacianT< MF >::FAB = typename MLNodeLinOpT<MF>::FAB

◆ Location

template<typename MF>
using amrex::MLNodeLaplacianT< MF >::Location = typename MLNodeLinOpT<MF>::Location

◆ RT

template<typename MF>
using amrex::MLNodeLaplacianT< MF >::RT = typename MLNodeLinOpT<MF>::RT

◆ StateMode

template<typename MF>
using amrex::MLNodeLaplacianT< MF >::StateMode = typename MLNodeLinOpT<MF>::StateMode

Constructor & Destructor Documentation

◆ MLNodeLaplacianT() [1/5]

template<typename MF>
amrex::MLNodeLaplacianT< MF >::MLNodeLaplacianT ( )
default

Construct an empty operator; call define() before solving.

◆ MLNodeLaplacianT() [2/5]

template<typename MF>
amrex::MLNodeLaplacianT< MF >::MLNodeLaplacianT ( const Vector< Geometry > & a_geom,
const Vector< BoxArray > & a_grids,
const Vector< DistributionMapping > & a_dmap,
const LPInfo & a_info = LPInfo(),
const Vector< FabFactory< FAB > const * > & a_factory = {},
RT a_const_sigma = RT(0.0) )

Convenience constructor without EB factories.

Parameters
a_geomPer-level geometries.
a_gridsPer-level grids.
a_dmapDistribution mappings.
a_infoLPInfo overrides.
a_factoryOptional nodal factories per level.
a_const_sigmaUniform conductivity. Zero selects variable conductivity; setSigma() must then supply nonzero coefficients.

◆ MLNodeLaplacianT() [3/5]

template<typename MF>
amrex::MLNodeLaplacianT< MF >::MLNodeLaplacianT ( 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,
RT a_const_sigma = RT(0.0) )

Convenience constructor that accepts embedded-boundary factories.

◆ ~MLNodeLaplacianT()

template<typename MF>
amrex::MLNodeLaplacianT< MF >::~MLNodeLaplacianT ( )
overridedefault

◆ MLNodeLaplacianT() [4/5]

template<typename MF>
amrex::MLNodeLaplacianT< MF >::MLNodeLaplacianT ( const MLNodeLaplacianT< MF > & )
delete

◆ MLNodeLaplacianT() [5/5]

template<typename MF>
amrex::MLNodeLaplacianT< MF >::MLNodeLaplacianT ( MLNodeLaplacianT< MF > && )
delete

Member Function Documentation

◆ averageDownCoeffs()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::averageDownCoeffs ( )

Average conductivity down across all AMR and MG levels.

◆ averageDownCoeffsSameAmrLevel()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::averageDownCoeffsSameAmrLevel ( int amrlev)

Average coefficients across MG levels within AMR level amrlev.

◆ averageDownCoeffsToCoarseAmrLevel()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::averageDownCoeffsToCoarseAmrLevel ( int flev)

Average coefficients from fine AMR level flev to coarse AMR level flev-1.

◆ averageDownSolutionRHS()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::averageDownSolutionRHS ( int camrlev,
MF & crse_sol,
MF & crse_rhs,
const MF & fine_sol,
const MF & fine_rhs )
finalvirtual

Average solution/RHS pairs from fine AMR levels onto (camrlev).

Reimplemented from amrex::MLLinOpT< MF >.

◆ buildIntegral()

template<typename MF>
template void amrex::MLNodeLaplacianT< MF >::buildIntegral ( )

◆ buildStencil()

template<typename MF>
template void amrex::MLNodeLaplacianT< MF >::buildStencil ( )

Build nodal operator stencils reflecting current sigma and metrics.

◆ buildSurfaceIntegral()

template<typename MF>
template void amrex::MLNodeLaplacianT< MF >::buildSurfaceIntegral ( )

◆ compDivergence()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::compDivergence ( const Vector< MF * > & rhs,
const Vector< MF * > & vel )

Compute rhs = div(vel) on nodal grids (used for projections).

◆ compGrad() [1/2]

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::compGrad ( int amrlev,
const Array< MF *, 3 > & grad,
MF & sol,
Location loc ) const
inlinefinalvirtual

Unsupported flux-style gradient extractor (kept for interface completeness).

Parameters
amrlevAMR level index (ignored).
gradDestination MultiFabs (ignored).
solSolution hierarchy (ignored).
locRequested location (ignored).

Reimplemented from amrex::MLLinOpT< MF >.

◆ compGrad() [2/2]

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::compGrad ( int amrlev,
MF & grad,
MF & sol ) const

Compute gradients of sol into nodal MultiFab grad on AMR level amrlev.

Parameters
amrlevAMR level index.
gradDestination gradient MultiFab.
solSolution supplying nodal values.

◆ compRHS()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::compRHS ( const Vector< MF * > & rhs,
const Vector< MF * > & vel,
const Vector< const MF * > & rhnd,
const Vector< MF * > & rhcc )

Assemble RHS including nodal/cell-centered forcing terms.

◆ compSyncResidualCoarse()

template<typename MF>
template void amrex::MLNodeLaplacianT< MF >::compSyncResidualCoarse ( MF & sync_resid,
const MF & phi,
const MF & vold,
const MF * rhcc,
const BoxArray & fine_grids,
const IntVect & ref_ratio )

Build coarse-level sync residuals for multilevel projections.

◆ compSyncResidualFine()

template<typename MF>
template void amrex::MLNodeLaplacianT< MF >::compSyncResidualFine ( MF & sync_resid,
const MF & phi,
const MF & vold,
const MF * rhcc )

Build fine-level sync residuals for multilevel projections.

◆ define() [1/2]

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::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,
RT a_const_sigma = RT(0.0) )

◆ define() [2/2]

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::define ( const Vector< Geometry > & a_geom,
const Vector< BoxArray > & a_grids,
const Vector< DistributionMapping > & a_dmap,
const LPInfo & a_info = LPInfo(),
const Vector< FabFactory< FAB > const * > & a_factory = {},
RT a_const_sigma = RT(0.0) )

Bind the nodal operator (no EB data).

Parameters
a_geomPer-level geometries.
a_gridsPer-level grids.
a_dmapDistribution mappings.
a_infoLPInfo overrides.
a_factoryOptional nodal factories per level.
a_const_sigmaUniform conductivity. Zero selects variable conductivity; setSigma() must then supply nonzero coefficients.

◆ ebFactory()

template<typename MF>
EBFArrayBoxFactory const * amrex::MLNodeLaplacianT< MF >::ebFactory ( int amrlev) const
inlinenodiscardprotected

EB factory of AMR level amrlev, or nullptr. EB data are double precision, so the float operator never has one.

◆ ebVolFrac()

template<typename MF>
MF const * amrex::MLNodeLaplacianT< MF >::ebVolFrac ( EBFArrayBoxFactory const * f)
inlinestaticnodiscardprotected

Volume fraction of EB factory f, or nullptr.

◆ Fapply()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::Fapply ( int amrlev,
int mglev,
MF & out,
const MF & in ) const
finalvirtual

Apply the nodal Laplacian to in at (amrlev,mglev).

Implements amrex::MLNodeLinOpT< MF >.

◆ fillAlgMatrix()

template<typename MF>
template void amrex::MLNodeLaplacianT< MF >::fillAlgMatrix ( int ,
MFIter const & ,
Array4< Long const > const & ,
Array4< int const > const & ,
Long * ,
Long * ,
Real *  ) const
overridevirtual

Fill the matrix rows of one box for the algebraic solver.

Same packed layout as the Hypre version: ncols[lid] entries per row, diagonal first, neighbors without a row dropped. The MG level is on AMR level 0. Global row ids are numeric_limits<Long>::max() and local ids negative where there is no row.

Reimplemented from amrex::MLNodeLinOpT< MF >.

◆ FillBoundaryCoeff()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::FillBoundaryCoeff ( MF & sigma,
const Geometry & geom )

Fill ghost cells of sigma using geom for BC inference.

◆ fillMatrix_cpu()

template<typename MF>
template<typename AlgInt, typename AlgGid>
void amrex::MLNodeLaplacianT< MF >::fillMatrix_cpu ( int mglev,
MFIter const & mfi,
Array4< AlgGid const > const & gid,
Array4< int const > const & lid,
AlgInt * ncols,
AlgInt * cols,
Real * mat ) const

◆ fillMatrix_doit()

template<typename MF>
template<typename AlgInt, typename AlgGid>
void amrex::MLNodeLaplacianT< MF >::fillMatrix_doit ( int mglev,
MFIter const & mfi,
Array4< AlgGid const > const & gid,
Array4< int const > const & lid,
AlgInt * ncols,
AlgInt * cols,
Real * mat ) const

◆ fillMatrix_gpu()

template<typename MF>
template<typename AlgInt, typename AlgGid>
void amrex::MLNodeLaplacianT< MF >::fillMatrix_gpu ( int mglev,
MFIter const & mfi,
Array4< AlgGid const > const & gid,
Array4< int const > const & lid,
AlgInt * ncols,
AlgInt * cols,
Real * mat ) const

◆ fillRHS()

template<typename MF>
template void amrex::MLNodeLaplacianT< MF >::fillRHS ( int ,
MFIter const & ,
Array4< int const > const & ,
Real * ,
Array4< Real const > const &  ) const
overridevirtual

Fill the right-hand side of the rows of one box on MG level mglev.

Reimplemented from amrex::MLNodeLinOpT< MF >.

◆ fixSolvabilityByOffset()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::fixSolvabilityByOffset ( int amrlev,
int mglev,
MF & rhs,
Vector< RT > const & offset ) const
overridevirtual

Subtract solvability offsets from rhs.

Reimplemented from amrex::MLLinOpT< MF >.

◆ fixUpResidualMask()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::fixUpResidualMask ( int amrlev,
iMultiFab & resmsk )
finalvirtual

Adjust residual masks so EB Dirichlet nodes remain constrained.

Reimplemented from amrex::MLNodeLinOpT< MF >.

◆ Fsmooth()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::Fsmooth ( int amrlev,
int mglev,
MF & sol,
const MF & rhs ) const
finalvirtual

Execute the smoother on (amrlev,mglev).

Parameters
amrlevAMR level index.
mglevMultigrid level index.
solCorrection updated in place.
rhsRHS supplied to the smoother.

Implements amrex::MLNodeLinOpT< MF >.

◆ getDefaultBottomSolver()

template<typename MF>
BottomSolver amrex::MLNodeLaplacianT< MF >::getDefaultBottomSolver ( ) const
inlinenodiscardfinalvirtual

Reimplemented from amrex::MLLinOpT< MF >.

◆ getFluxes() [1/2]

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::getFluxes ( const Vector< Array< MF *, 3 > > & a_flux,
const Vector< MF * > & a_sol,
Location a_loc ) const
inlinefinalvirtual

This overload is unused for nodal Laplacians (only cell-centered flux extraction is supported).

Parameters
a_fluxDestination arrays (ignored).
a_solSolution hierarchy (ignored).
a_locRequested location (ignored).

Reimplemented from amrex::MLLinOpT< MF >.

◆ getFluxes() [2/2]

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::getFluxes ( const Vector< MF * > & a_flux,
const Vector< MF * > & a_sol ) const
finalvirtual

Compute face-centered fluxes given nodal solutions.

Reimplemented from amrex::MLLinOpT< MF >.

◆ getSolvabilityOffset()

template<typename MF>
auto amrex::MLNodeLaplacianT< MF >::getSolvabilityOffset ( int amrlev,
int mglev,
MF const & rhs ) const
overridevirtual

Compute component-wise offsets needed for solvability enforcement.

Reimplemented from amrex::MLLinOpT< MF >.

◆ interpCoarseFineSolution()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::interpCoarseFineSolution ( int famrlev,
MF & fine_sol,
const MF & crse_sol ) const
finalvirtual

Set the coarse/fine nodes of fine AMR level famrlev (Dirichlet mask set, not on a Dirichlet domain face) to the interpolated coarse solution, so that the composite solution does not depend on the initial guess there. Known nodes of an overset mask are kept.

Parameters
famrlevFine AMR level index.
fine_solFine solution, modified at the coarse/fine nodes.
crse_solCoarse solution.

Reimplemented from amrex::MLLinOpT< MF >.

◆ interpolation()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::interpolation ( int amrlev,
int fmglev,
MF & fine,
const MF & crse ) const
finalvirtual

Add the prolongation of coarse data onto the fine grid (fine += prolong(crse)).

Implements amrex::MLLinOpT< MF >.

◆ name()

template<typename MF>
std::string amrex::MLNodeLaplacianT< MF >::name ( ) const
inlinenodiscardoverridevirtual

Reimplemented from amrex::MLLinOpT< MF >.

◆ needsUpdate()

template<typename MF>
bool amrex::MLNodeLaplacianT< MF >::needsUpdate ( ) const
inlinenodiscardfinalvirtual

True if sigma-derived data need to be refreshed before reuse.

Reimplemented from amrex::MLLinOpT< MF >.

◆ normalize()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::normalize ( int amrlev,
int mglev,
MF & mf ) const
finalvirtual

Divide mf by the diagonal of the operator (used by CG-family bottom solvers).

Reimplemented from amrex::MLLinOpT< MF >.

◆ operator=() [1/2]

template<typename MF>
MLNodeLaplacianT & amrex::MLNodeLaplacianT< MF >::operator= ( const MLNodeLaplacianT< MF > & )
delete

◆ operator=() [2/2]

template<typename MF>
MLNodeLaplacianT & amrex::MLNodeLaplacianT< MF >::operator= ( MLNodeLaplacianT< MF > && )
delete

◆ prepareForSolve()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::prepareForSolve ( )
finalvirtual

Finalize metric terms, sigma averages, and BC caches before solving.

Implements amrex::MLLinOpT< MF >.

◆ reflux()

template<typename MF>
template void amrex::MLNodeLaplacianT< MF >::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
finalvirtual

Flux register reflux coupling coarse/fine nodal solves (updates res using the solution and RHS arrays on both levels).

Reimplemented from amrex::MLLinOpT< MF >.

◆ resizeMultiGrid()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::resizeMultiGrid ( int new_size)
finalprotectedvirtual

Reimplemented from amrex::MLLinOpT< MF >.

◆ restrictInteriorNodes()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::restrictInteriorNodes ( int camrlev,
MF & crhs,
MF & frhs ) const

Restrict interior-node RHS from fine to coarse when syncing.

◆ restriction()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::restriction ( int amrlev,
int cmglev,
MF & crse,
MF & fine ) const
finalvirtual

Restrict nodal data from fine grids to coarse MG level cmglev.

Implements amrex::MLLinOpT< MF >.

◆ setBoundaryDivuCorrection()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::setBoundaryDivuCorrection ( bool on)
inlinenoexcept

Second-order nodal divergence at nodes on Neumann and inflow domain faces.

By default, compRHS is first order at these nodes (walls and inflow faces): it takes the tangential velocity, and the cell-centered source, of the first layer of cells as constant over the node's half control volume. After a projection, the normal velocity in the cells next to the face is then off by (h^2/8) d^2u_n/dn^2. A cell-centered viscous operator (MLABecLaplacian, MLTensorOp) with a Dirichlet condition on the face turns this into an O(1) error in the normal component. With this option, both terms are taken a quarter cell from the face instead, extrapolated linearly from the first two layers of cells, in each such direction at domain edges and corners. The ghost cells must hold the normal velocity on the face, as compRHS already assumes.

Not supported with RZ (compRHS aborts if setRZCorrection(true) is also set). Not applied at coarse/fine nodes or in the sync residual. With EB, applied only at nodes whose nearby cells (two layers and the ghost cells, on both sides) are all regular. Without a source the discrete volume balance is unchanged; with one, the corrected right-hand side differs from the integral of the source by O(h^2). See Tests/LinearSolvers/NodalProjectionWall.

Parameters
onfalse (the default): the original stencil. true: the correction.

◆ setCoarseningStrategy()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::setCoarseningStrategy ( CoarseningStrategy cs)
inlinenoexcept

Pick between sigma-weighted or RAP coarsening (ignored if sigma constant).

Parameters
csDesired coarsening strategy enum.

◆ setEBInflowVelocity()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::setEBInflowVelocity ( int amrlev,
const MF & eb_vel )

◆ setGaussSeidel()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::setGaussSeidel ( bool flag)
inlinenoexcept

Choose red-black Gauss-Seidel instead of Jacobi smoothing.

Parameters
flagTrue selects Gauss-Seidel.

◆ setHarmonicAverage()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::setHarmonicAverage ( bool flag)
inlinenoexcept

Toggle harmonic averaging when coarsening sigma.

Parameters
flagTrue enables harmonic averaging.

◆ setMapped()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::setMapped ( bool flag)
inlinenoexcept

Enable mapped-coordinate metrics (non-orthogonal grids).

Parameters
flagTrue enables mapped-coordinate support.

◆ setNormalizationThreshold()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::setNormalizationThreshold ( RT t)
inlinenoexcept

Threshold for normalization (prevents dividing by tiny averages).

Parameters
tMinimum average magnitude allowed before rescaling.

◆ setRZCorrection()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::setRZCorrection ( bool rz)
inlinenoexcept

Enable cylindrical (RZ) metric terms.

Parameters
rzTrue activates RZ corrections.

◆ setSigma()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::setSigma ( int amrlev,
const MF & a_sigma )

Provide per-level conductivity (cell-centered MultiFab). A multi-component input also triggers mapped-coordinate mode.

Parameters
amrlevAMR level receiving the coefficients.
a_sigmaCell-centered MultiFab containing nonzero conductivity coefficients.

◆ spCopySettings()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::spCopySettings ( )
inlineoverrideprotectedvirtual

Mixed precision: give a new single precision copy the settings made on this operator before define, which define keeps.

Reimplemented from amrex::MLLinOpT< MF >.

◆ spForwardSigma()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::spForwardSigma ( )

Mixed precision: send sigma, scaled, to the single precision copy. Public for CUDA.

◆ spUpdateScale()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::spUpdateScale ( )
inlineprotectednoexcept

Mixed precision: the copy's sigma is m_sp_sigma_scale times ours and its lengths m_sp_length_scale times ours. The RZ terms do not depend on the length.

◆ supportsAlgMG()

template<typename MF>
bool amrex::MLNodeLaplacianT< MF >::supportsAlgMG ( ) const
inlinenodiscardoverridevirtual

True if makeAlgMG is implemented for this operator.

Reimplemented from amrex::MLLinOpT< MF >.

◆ supportsMixedPrecision()

template<typename MF>
bool amrex::MLNodeLaplacianT< MF >::supportsMixedPrecision ( ) const
inlinenodiscardoverridevirtual

Mixed precision: true only for the exact operator types that build a single precision copy of themselves, not for classes derived from them.

Reimplemented from amrex::MLLinOpT< MF >.

◆ unimposeNeumannBC()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::unimposeNeumannBC ( int amrlev,
MF & rhs ) const
finalvirtual

Remove Neumann contributions previously imposed on rhs.

Reimplemented from amrex::MLLinOpT< MF >.

◆ update()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::update ( )
finalvirtual

Refresh sigma averages/stencils and clear the dirty flag.

Reimplemented from amrex::MLLinOpT< MF >.

◆ updateVelocity()

template<typename MF>
void amrex::MLNodeLaplacianT< MF >::updateVelocity ( const Vector< MF * > & vel,
const Vector< MF const * > & sol ) const

Update velocities using the Poisson solution (projection correction).

◆ HypreMLNodeLap

template<typename MF>
friend class HypreMLNodeLap
friend

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