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

Abstract base class for multilevel linear operators used by MLMG and the bottom solvers. More...

#include <AMReX_MLLinOp.H>

Inheritance diagram for amrex::MLLinOpT< MF >:
amrex::MLCellLinOpT< MF > amrex::MLNodeLinOp amrex::MLCellABecLapT< MF > amrex::MLEBNodeFDLaplacian amrex::MLNodeABecLaplacian amrex::MLNodeLaplacian amrex::MLNodeTensorLaplacian amrex::MLABecLaplacianT< MF > amrex::MLALaplacianT< MF > amrex::MLEBABecLap amrex::MLPoissonT< MF > amrex::MLTensorOp amrex::MLEBTensorOp

Public Types

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

 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.
 
virtual std::string name () const
 
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 BottomSolver getDefaultBottomSolver () const
 
virtual int getNComp () const
 Return number of components.
 
virtual int getNGrow (int=0, int=0) const
 
virtual bool needsUpdate () const
 Does it need update if it's reused?
 
virtual void update ()
 Update for reuse.
 
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< RTgetSolvabilityOffset (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 prepareForSolve ()=0
 Finalize coefficients, masks, and BC data before iterative solves.
 
virtual void preparePrecond ()
 Prepare auxiliary data used when the operator acts as a preconditioner.
 
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 bool isSingular (int amrlev) const =0
 Is it singular on AMR level amrlev?
 
virtual bool isBottomSingular () const =0
 Is the bottom of the multigrid hierarchy singular?
 
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 GeometryGeom (int amr_lev, int mglev=0) const noexcept
 Geometry accessor for (amr_lev,mglev).
 

Public Attributes

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 Member Functions

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 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 makeCoarseAmr (int famrlev, IntVect const &ng) const
 Allocate an MF on the next coarser AMR level (famrlev-1) with grow cells ng.
 
virtual std::unique_ptr< FabFactory< FAB > > makeFactory (int, int) const
 
virtual void resizeMultiGrid (int new_size)
 
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 >
get_d0 (T const &dx, T const &dy, T const &) const noexcept
 
template<typename T >
get_d1 (T const &, T const &dy, T const &dz) const noexcept
 

Protected Attributes

int mg_domain_min_width = 2
 
LPInfo info
 
int verbose = 0
 
int maxorder = 3
 
bool enforceSingularSolvable = true
 
int m_num_amr_levels = 0
 
Vector< intm_amr_ref_ratio
 
Vector< intm_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< IntVectmg_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< intm_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
 

Static Protected Attributes

static constexpr int mg_coarsen_ratio = 2
 
static constexpr int mg_box_min_width = 2
 

Friends

template<typename T >
class MLMGT
 
template<typename T >
class MLCGSolverT
 
template<typename T >
class MLPoissonT
 
template<typename T >
class MLABecLaplacianT
 
template<typename T >
class GMRESMLMGT
 

Detailed Description

template<typename MF>
class amrex::MLLinOpT< MF >

Abstract base class for multilevel linear operators used by MLMG and the bottom solvers.

Specializations expose domain/AMR metadata, boundary-condition wiring, and hooks for applying the operator and its coarse/fine helpers.

Member Typedef Documentation

◆ BCMode

template<typename MF >
using amrex::MLLinOpT< MF >::BCMode = LinOpEnumType::BCMode

◆ BCType

template<typename MF >
using amrex::MLLinOpT< MF >::BCType = LinOpBCType

◆ FAB

template<typename MF >
using amrex::MLLinOpT< MF >::FAB = typename FabDataType<MF>::fab_type

◆ Location

template<typename MF >
using amrex::MLLinOpT< MF >::Location = LinOpEnumType::Location

◆ MFType

template<typename MF >
using amrex::MLLinOpT< MF >::MFType = MF

◆ RT

template<typename MF >
using amrex::MLLinOpT< MF >::RT = typename FabDataType<MF>::value_type

◆ StateMode

template<typename MF >
using amrex::MLLinOpT< MF >::StateMode = LinOpEnumType::StateMode

Constructor & Destructor Documentation

◆ MLLinOpT() [1/3]

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

◆ ~MLLinOpT()

template<typename MF >
virtual amrex::MLLinOpT< MF >::~MLLinOpT ( )
virtualdefault

◆ MLLinOpT() [2/3]

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

◆ MLLinOpT() [3/3]

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

Member Function Documentation

◆ AMRRefRatio() [1/2]

template<typename MF >
const Vector< int > & amrex::MLLinOpT< MF >::AMRRefRatio ( ) const
inlineprotectednoexcept

Return AMR refinement ratios.

◆ AMRRefRatio() [2/2]

template<typename MF >
int amrex::MLLinOpT< MF >::AMRRefRatio ( int  amr_lev) const
inlineprotectednoexcept

Return AMR refinement ratio at given AMR level.

◆ AMRRefRatioVect()

template<typename MF >
IntVect amrex::MLLinOpT< MF >::AMRRefRatioVect ( int  amr_lev) const
inlineprotectednoexcept

Return AMR refinement ratio as IntVect (1 in hidden direction)

◆ apply()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::apply ( int  amrlev,
int  mglev,
MF &  out,
MF &  in,
BCMode  bc_mode,
StateMode  s_mode,
const MLMGBndryT< MF > *  bndry = nullptr 
) const
pure virtual

Apply the linear operator, out = L(in)

Parameters
amrlevAMR level
mglevMG level
outoutput
ininput
bc_modeIs the BC homogeneous or inhomogeneous?
s_modeAre data data solution or correction?
bndryobject for handling coarse/fine and physical boundaries

Implemented in amrex::MLCellLinOpT< MF >.

◆ applyInhomogNeumannTerm()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::applyInhomogNeumannTerm ( int  amrlev,
MF &  rhs 
) const
inlinevirtual

Add extra terms introduced when treating inhomogeneous Neumann BC as homogeneous.

Parameters
amrlevAMR level index.
rhsRHS MultiFab updated in place.

Reimplemented in amrex::MLCellABecLapT< MF >.

◆ applyMetricTerm()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::applyMetricTerm ( int  amrlev,
int  mglev,
MF &  rhs 
) const
inlinevirtual

Apply metric scaling to the RHS on (amrlev,mglev).

Parameters
amrlevAMR level index.
mglevMultigrid level index.
rhsRight-hand side updated in place.

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ applyOverset()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::applyOverset ( int  amrlev,
MF &  rhs 
) const
inlinevirtual

Overset-only hook for zeroing regions covered by masks.

Parameters
amrlevAMR level index.
rhsRHS MultiFab whose covered regions are zeroed.

Reimplemented in amrex::MLCellABecLapT< MF >.

◆ averageDownAndSync()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::averageDownAndSync ( Vector< MF > &  sol) const
pure virtual

Average the solution hierarchy down (fine to coarse) and synchronize interfaces.

Parameters
solVector of MultiFabs spanning all AMR levels.

Implemented in amrex::MLCellLinOpT< MF >.

◆ averageDownSolutionRHS()

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

Average-down data from fine AMR level to coarse AMR level.

Parameters
camrlevcoarse AMR level
crse_solsolutoin on coarse AMR level
crse_rhsRHS on coarse AMR level
fine_solsolution on fine AMR level
fine_rhsRHS on fine AMR level

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ avgDownResAmr()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::avgDownResAmr ( int  clev,
MF &  cres,
MF const &  fres 
) const
inlinevirtual

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ avgDownResMG()

template<typename MF >
void amrex::MLLinOpT< MF >::avgDownResMG ( int  clev,
MF &  cres,
MF const &  fres 
) const
virtual

Average residuals from fine to coarse MG levels (FMG helper).

Parameters
clevCoarse MG level index.
cresDestination coarse residual.
fresSource fine residual.

◆ beginPrecondBC()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::beginPrecondBC ( )
inlinevirtual

Called when the operator starts being used as a preconditioner.

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ BottomCommunicator()

template<typename MF >
MPI_Comm amrex::MLLinOpT< MF >::BottomCommunicator ( ) const
inlineprotectednoexcept

◆ Communicator()

template<typename MF >
MPI_Comm amrex::MLLinOpT< MF >::Communicator ( ) const
inlineprotectednoexcept

◆ compactify() [1/2]

template<typename MF >
template<typename T >
Array4< T > amrex::MLLinOpT< MF >::compactify ( Array4< T > const &  a) const
inlineprotectednoexcept

◆ compactify() [2/2]

template<typename MF >
Box amrex::MLLinOpT< MF >::compactify ( Box const &  b) const
protectednoexcept

◆ compFlux()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::compFlux ( int  amrlev,
const Array< MF *, 3 > &  fluxes,
MF &  sol,
Location  loc 
) const
inlinevirtual

Compute fluxes.

Parameters
amrlevAMR level
fluxesfluxes
solsolution
loclocation of the fluxes

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ compGrad()

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

Compute gradients of the solution.

Parameters
amrlevAMR level
gradgrad(sol)
solsolution
loclocation of the gradients

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ copyNSolveSolution()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::copyNSolveSolution ( MF &  dst,
MF const &  src 
) const
inlinevirtual

Copy an NSolve solution from src to dst.

Parameters
dstDestination MultiFab.
srcSource nodal solution.

Reimplemented in amrex::MLABecLaplacianT< MF >, and amrex::MLPoissonT< MF >.

◆ correctionResidual()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::correctionResidual ( int  amrlev,
int  mglev,
MF &  resid,
MF &  x,
const MF &  b,
BCMode  bc_mode,
const MF *  crse_bcdata = nullptr 
)
pure virtual

Compute residual for the residual-correction form, resid = b - L(x)

Parameters
amrlevAMR level
mglevMG level
residresidual
xunknown in the residual-correction form
bRHS in the residual-correction form
bc_modeIs the BC homogeneous or inhomogeneous?
crse_bcdataoptional argument providing BC at coarse/fine boundary.

Implemented in amrex::MLCellLinOpT< MF >.

◆ define()

template<typename MF >
void amrex::MLLinOpT< MF >::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.

Parameters
a_geomPer-level geometries.
a_gridsPer-level grid layouts.
a_dmapPer-level distribution maps.
a_infoLPInfo describing coarsening/agglomeration limits.
a_factoryOptional EB-aware factories per level (may be null).
eb_limit_coarseningTrue to forbid coarsening beyond where EB geometry information is available.

◆ doAgglomeration()

template<typename MF >
bool amrex::MLLinOpT< MF >::doAgglomeration ( ) const
inlineprotectednoexcept

◆ doConsolidation()

template<typename MF >
bool amrex::MLLinOpT< MF >::doConsolidation ( ) const
inlineprotectednoexcept

◆ doSemicoarsening()

template<typename MF >
bool amrex::MLLinOpT< MF >::doSemicoarsening ( ) const
inlineprotectednoexcept

◆ dotProductPrecond()

template<typename MF >
auto amrex::MLLinOpT< MF >::dotProductPrecond ( Vector< MF const * > const &  x,
Vector< MF const * > const &  y 
) const
virtual

Dot product over the composite AMR hierarchy, excluding cells covered by finer levels. Used when the operator acts as a preconditioner.

Parameters
xVector of pointers to fields (one per AMR level).
ySecond vector of pointers (same length as x).
Returns
Summed dot product.

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ endPrecondBC()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::endPrecondBC ( )
inlinevirtual

Called when the operator stops being used as a preconditioner.

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ Factory()

template<typename MF >
FabFactory< FAB > const * amrex::MLLinOpT< MF >::Factory ( int  amr_lev,
int  mglev = 0 
) const
inlineprotectednoexcept

◆ fixSolvabilityByOffset()

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

Subtract previously computed offsets from the RHS.

Parameters
amrlevAMR level index.
mglevMultigrid level index.
rhsRHS updated in place.
offsetOffsets returned by getSolvabilityOffset().

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ Geom()

template<typename MF >
const Geometry & amrex::MLLinOpT< MF >::Geom ( int  amr_lev,
int  mglev = 0 
) const
inlinenoexcept

Geometry accessor for (amr_lev,mglev).

◆ get_d0()

template<typename MF >
template<typename T >
T amrex::MLLinOpT< MF >::get_d0 ( T const &  dx,
T const &  dy,
T const &   
) const
inlineprotectednoexcept

◆ get_d1()

template<typename MF >
template<typename T >
T amrex::MLLinOpT< MF >::get_d1 ( T const &  ,
T const &  dy,
T const &  dz 
) const
inlineprotectednoexcept

◆ getDefaultBottomSolver()

template<typename MF >
virtual BottomSolver amrex::MLLinOpT< MF >::getDefaultBottomSolver ( ) const
inlinevirtual

Reimplemented in amrex::MLNodeLaplacian.

◆ getEBFluxes()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::getEBFluxes ( const Vector< MF * > &  a_flux,
const Vector< MF * > &  a_sol 
) const
inlinevirtual

Extract embedded-boundary fluxes.

Parameters
a_fluxDestination EB flux MultiFabs (one per level).
a_solSolution hierarchy sampled on EB faces.

◆ getEnforceSingularSolvable()

template<typename MF >
bool amrex::MLLinOpT< MF >::getEnforceSingularSolvable ( ) const
inlinenoexcept

Get the flag for whether the solver should try to make singular problem solvable.

◆ getFluxes() [1/2]

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

Extract per-direction fluxes for each AMR level.

Parameters
a_fluxDestination flux arrays (per level, per direction).
a_solSolution hierarchy supplying the gradients.
a_locLocation where fluxes are evaluated (faces/centroids).

Reimplemented in amrex::MLCellABecLapT< MF >.

◆ getFluxes() [2/2]

template<typename MF >
virtual void amrex::MLLinOpT< MF >::getFluxes ( const Vector< MF * > &  a_flux,
const Vector< MF * > &  a_sol 
) const
inlinevirtual

Extract fluxes when the operator stores them in single MultiFabs per level.

Parameters
a_fluxDestination MultiFabs (one per level).
a_solSource solutions (one per level).

Reimplemented in amrex::MLCellABecLapT< MF >.

◆ getMaxOrder()

template<typename MF >
int amrex::MLLinOpT< MF >::getMaxOrder ( ) const
inlinenoexcept

Get order of interpolation at coarse/fine boundary.

◆ getNComp()

template<typename MF >
virtual int amrex::MLLinOpT< MF >::getNComp ( ) const
inlinevirtual

◆ getNGrow()

template<typename MF >
virtual int amrex::MLLinOpT< MF >::getNGrow ( int  = 0,
int  = 0 
) const
inlinevirtual

◆ getNGrowVectRestriction()

template<typename MF >
virtual IntVect amrex::MLLinOpT< MF >::getNGrowVectRestriction ( ) const
inlineprotectedvirtual

Reimplemented in amrex::MLCurlCurl.

◆ getSolvabilityOffset()

template<typename MF >
virtual Vector< RT > amrex::MLLinOpT< MF >::getSolvabilityOffset ( int  amrlev,
int  mglev,
MF const &  rhs 
) const
inlinevirtual

Compute offsets used to enforce solvability (per component).

Parameters
amrlevAMR level index.
mglevMultigrid level index.
rhsRight-hand side examined to compute the offsets.
Returns
Vector of offsets (one per component).

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ hasBC()

template<typename MF >
bool amrex::MLLinOpT< MF >::hasBC ( BCType  bct) const
protectednoexcept

◆ hasHiddenDimension()

template<typename MF >
bool amrex::MLLinOpT< MF >::hasHiddenDimension ( ) const
inlineprotectednoexcept

◆ hasInhomogNeumannBC()

template<typename MF >
bool amrex::MLLinOpT< MF >::hasInhomogNeumannBC ( ) const
protectednoexcept

◆ hasRobinBC()

template<typename MF >
bool amrex::MLLinOpT< MF >::hasRobinBC ( ) const
protectednoexcept

◆ HiBC()

template<typename MF >
GpuArray< BCType, 3 > amrex::MLLinOpT< MF >::HiBC ( int  icomp = 0) const
inlineprotectednoexcept

◆ hiddenDirection()

template<typename MF >
int amrex::MLLinOpT< MF >::hiddenDirection ( ) const
inlineprotectednoexcept

◆ interpAssign()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::interpAssign ( int  amrlev,
int  fmglev,
MF &  fine,
MF &  crse 
) const
inlinevirtual

Overwrite fine MG level data with interpolated coarse data.

Parameters
amrlevAMR level
fmglevfine MG level
finefine MG level data
crsecoarse MG level data

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ interpolation()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::interpolation ( int  amrlev,
int  fmglev,
MF &  fine,
const MF &  crse 
) const
pure virtual

Add interpolated coarse MG level data to fine MG level data.

Parameters
amrlevAMR level
fmglevfine MG level
crsecoarse data.
finefine data.

Implemented in amrex::MLCellLinOpT< MF >.

◆ interpolationAmr()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::interpolationAmr ( int  famrlev,
MF &  fine,
const MF &  crse,
IntVect const &  nghost 
) const
inlinevirtual

Interpolation between AMR levels.

Parameters
famrlevfine AMR level
finefine level data
crsecoarse level data
nghostnumber of ghost cells

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ isBottomActive()

template<typename MF >
bool amrex::MLLinOpT< MF >::isBottomActive ( ) const
inlineprotectednoexcept

◆ isBottomSingular()

template<typename MF >
virtual bool amrex::MLLinOpT< MF >::isBottomSingular ( ) const
pure virtual

◆ isCellCentered()

template<typename MF >
bool amrex::MLLinOpT< MF >::isCellCentered ( ) const
inlineprotectednoexcept

◆ isMFIterSafe()

template<typename MF >
bool amrex::MLLinOpT< MF >::isMFIterSafe ( int  amrlev,
int  mglev1,
int  mglev2 
) const

Check whether mixing MFIter loops for different MG levels is safe.

Parameters
amrlevAMR level index.
mglev1First MG level.
mglev2Second MG level.

◆ isSingular()

template<typename MF >
virtual bool amrex::MLLinOpT< MF >::isSingular ( int  amrlev) const
pure virtual

◆ LoBC()

template<typename MF >
GpuArray< BCType, 3 > amrex::MLLinOpT< MF >::LoBC ( int  icomp = 0) const
inlineprotectednoexcept

◆ make() [1/2]

template<typename MF >
MF amrex::MLLinOpT< MF >::make ( int  amrlev,
int  mglev,
IntVect const &  ng 
) const
protectedvirtual

Reimplemented in amrex::MLCurlCurl.

◆ make() [2/2]

template<typename MF >
void amrex::MLLinOpT< MF >::make ( Vector< Vector< MF > > &  mf,
IntVect const &  ng 
) const
protectedvirtual

◆ makeAlias()

template<typename MF >
MF amrex::MLLinOpT< MF >::makeAlias ( MF const &  mf) const
protectedvirtual

◆ makeCoarseAmr()

template<typename MF >
MF amrex::MLLinOpT< MF >::makeCoarseAmr ( int  famrlev,
IntVect const &  ng 
) const
protectedvirtual

Allocate an MF on the next coarser AMR level (famrlev-1) with grow cells ng.

Reimplemented in amrex::MLCurlCurl.

◆ makeCoarseMG()

template<typename MF >
MF amrex::MLLinOpT< MF >::makeCoarseMG ( int  amrlev,
int  mglev,
IntVect const &  ng 
) const
protectedvirtual

Allocate an MF on the next coarser MG level (mglev+1) with grow cells ng.

Reimplemented in amrex::MLCurlCurl.

◆ makeFactory()

template<typename MF >
virtual std::unique_ptr< FabFactory< FAB > > amrex::MLLinOpT< MF >::makeFactory ( int  ,
int   
) const
inlineprotectedvirtual

◆ makeNLinOp()

template<typename MF >
virtual std::unique_ptr< MLLinOpT< MF > > amrex::MLLinOpT< MF >::makeNLinOp ( int  grid_size) const
inlinevirtual

Create the NSolve counterpart of this operator with the requested grid size.

Parameters
grid_sizeTarget maximum grid dimension for the nodal hierarchy.

Reimplemented in amrex::MLPoissonT< MF >, amrex::MLABecLaplacianT< MF >, amrex::MLALaplacianT< MF >, and amrex::MLEBABecLap.

◆ name()

template<typename MF >
virtual std::string amrex::MLLinOpT< MF >::name ( ) const
inlinevirtual

◆ NAMRLevels()

template<typename MF >
int amrex::MLLinOpT< MF >::NAMRLevels ( ) const
inlinenoexcept

Return the number of AMR levels.

◆ needsCoarseDataForBC()

template<typename MF >
bool amrex::MLLinOpT< MF >::needsCoarseDataForBC ( ) const
inlinenoexcept

Needs coarse data for bc?

If the lowest level grids does not cover the entire domain, coarse level data are needed for supplying Dirichlet bc at coarse/fine boundary, even when the domain bc is not Dirichlet.

◆ needsUpdate()

◆ NMGLevels()

template<typename MF >
int amrex::MLLinOpT< MF >::NMGLevels ( int  amrlev) const
inlinenoexcept

Return the number of MG levels at given AMR level.

◆ norm2Precond()

template<typename MF >
auto amrex::MLLinOpT< MF >::norm2Precond ( Vector< MF const * > const &  x) const
virtual

L2 norm over the composite AMR hierarchy, excluding cells covered by finer levels. Used when the operator acts as a preconditioner.

Parameters
xVector of pointers to fields (one per AMR level).
Returns
Resulting norm.

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ normalize()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::normalize ( int  amrlev,
int  mglev,
MF &  mf 
) const
inlinevirtual

Divide mf by the diagonal component of the operator. Used by the bottom solvers.

Parameters
amrlevAMR level index.
mglevMultigrid level index.
mfMultiFab divided in place.

Reimplemented in amrex::MLALaplacianT< MF >, amrex::MLPoissonT< MF >, and amrex::MLABecLaplacianT< MF >.

◆ normInf()

template<typename MF >
virtual RT amrex::MLLinOpT< MF >::normInf ( int  amrlev,
MF const &  mf,
bool  local 
) const
pure virtual

Infinity norm helper used by residual reductions.

Parameters
amrlevAMR level index.
mfMultiFab to measure.
localTrue to skip MPI reductions.

Implemented in amrex::MLCellLinOpT< MF >.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ postSolve()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::postSolve ( Vector< MF * > const &  sol) const
inlinevirtual

Optional hook invoked after the main solve completes.

Parameters
solSolution hierarchy (one pointer per AMR level).

◆ prepareForFluxes()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::prepareForFluxes ( int  amrlev,
const MF *  crse_bcdata = nullptr 
)
inlinevirtual

Ensure BC caches are populated before flux extraction.

Parameters
amrlevAMR level whose fluxes will be queried.
crse_bcdataOptional coarse data used to seed boundary values.

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ prepareForSolve()

◆ preparePrecond()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::preparePrecond ( )
inlinevirtual

Prepare auxiliary data used when the operator acts as a preconditioner.

Reimplemented in amrex::MLCurlCurl, and amrex::MLNodeLinOp.

◆ reflux()

template<typename MF >
virtual void amrex::MLLinOpT< 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
inlinevirtual

Reflux at AMR coarse/fine boundary.

Parameters
crse_amrlevcoarse AMR level
rescoarse level residual
crse_solcoarse level solution
crse_rhscoarse level RHS
fine_resfine level residual
fine_solfine level solution
fine_rhsfine level RHS

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ resizeMultiGrid()

template<typename MF >
void amrex::MLLinOpT< MF >::resizeMultiGrid ( int  new_size)
protectedvirtual

◆ restriction()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::restriction ( int  amrlev,
int  cmglev,
MF &  crse,
MF &  fine 
) const
pure virtual

Restriction onto coarse MG level.

Parameters
amrlevAMR level
cmglevcoarse MG level
crsecoarse data. This is the output.
finefine data. This is the input. Some operators might need to fill ghost cells. This is why it's not a const reference.

Implemented in amrex::MLCellLinOpT< MF >.

◆ scaleRHS()

template<typename MF >
virtual bool amrex::MLLinOpT< MF >::scaleRHS ( int  amrlev,
MF *  rhs 
) const
inlinevirtual

Optionally scale the RHS to fix solvability.

Parameters
amrlevAMR level receiving the scaling.
rhsRHS pointer (may be null) scaled in place.
Returns
True if scaling occurred, false otherwise.

◆ setCoarseFineBC() [1/4]

template<typename MF >
requires (!std::same_as<MF,AMF>)
template<typename AMF >
requires (!std::same_as<MF,AMF>)
void amrex::MLLinOpT< MF >::setCoarseFineBC ( const AMF *  crse,
int  crse_ratio,
LinOpBCType  bc_type = LinOpBCType::Dirichlet 
)
noexcept

◆ setCoarseFineBC() [2/4]

template<typename MF >
requires (!std::same_as<MF,AMF>)
template<typename AMF >
requires (!std::same_as<MF,AMF>)
void amrex::MLLinOpT< MF >::setCoarseFineBC ( const AMF *  crse,
IntVect const &  crse_ratio,
LinOpBCType  bc_type = LinOpBCType::Dirichlet 
)
noexcept

◆ setCoarseFineBC() [3/4]

template<typename MF >
void amrex::MLLinOpT< MF >::setCoarseFineBC ( const MF *  crse,
int  crse_ratio,
LinOpBCType  bc_type = LinOpBCType::Dirichlet 
)
noexcept

Set coarse/fine boundary conditions. For cell-centered solves only.

If we want to do a linear solve where the boundary conditions on the coarsest AMR level of the solve come from a coarser level (e.g. the base AMR level of the solve is > 0 and does not cover the entire domain), we must explicitly provide the coarser data. Boundary conditions from a coarser level are Dirichlet by default. The MultiFab crse does not need to have ghost cells and is at a coarser resolution than the coarsest AMR level of the solve; it is used to supply (interpolated) boundary conditions for the solve. NOTE: If this is called, it must be called before setLevelBC. If crse is nullptr, then the bc values are assumed to be zero. The coarse/fine BC type can be changed to homogeneous Neumann by the bc_type argument. In that case, use nullptr for the crse argument.

Parameters
crsethe coarse AMR level data
crse_ratiothe coarsening ratio between fine and coarse AMR levels.
bc_typeoptional. It's Dirichlet by default, and can be Neumann.

◆ setCoarseFineBC() [4/4]

template<typename MF >
void amrex::MLLinOpT< MF >::setCoarseFineBC ( const MF *  crse,
IntVect const &  crse_ratio,
LinOpBCType  bc_type = LinOpBCType::Dirichlet 
)
noexcept

◆ setCoarseFineBCLocation()

template<typename MF >
void amrex::MLLinOpT< MF >::setCoarseFineBCLocation ( const RealVect cloc)
inlineprotectednoexcept

◆ setDirichletNodesToZero()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::setDirichletNodesToZero ( int  amrlev,
int  mglev,
MF &  mf 
) const
inlinevirtual

Optional hook for masking out Dirichlet nodes or cells prior to GMRES solves; the default is a no-op with a warning.

Parameters
amrlevAMR level index.
mglevMultigrid level index.
mfMultiFab whose entries are zeroed at Dirichlet locations.

Reimplemented in amrex::MLCellABecLapT< MF >.

◆ setDomainBC() [1/2]

template<typename MF >
void amrex::MLLinOpT< MF >::setDomainBC ( const Array< BCType, 3 > &  lobc,
const Array< BCType, 3 > &  hibc 
)
noexcept

Boundary of the whole domain.

This functions must be called, and must be called before other bc functions. This version is for single-component solve or when all the components have the same BC types.

Parameters
lobclower boundaries
hibcupper boundaries

◆ setDomainBC() [2/2]

template<typename MF >
void amrex::MLLinOpT< MF >::setDomainBC ( const Vector< Array< BCType, 3 > > &  lobc,
const Vector< Array< BCType, 3 > > &  hibc 
)

Boundary of the whole domain.

This functions must be called, and must be called before other bc functions. This version is for multi-component solve.

Parameters
lobclower boundaries
hibcupper boundaries

◆ setDomainBCLoc()

template<typename MF >
void amrex::MLLinOpT< MF >::setDomainBCLoc ( const Array< Real, 3 > &  lo_bcloc,
const Array< Real, 3 > &  hi_bcloc 
)
noexcept

Set location offsets for the physical domain boundaries.

By default, domain BCs sit exactly on the domain faces. Call this when lower or upper faces are offset by a positive distance (values must be >= 0). Must be invoked before setLevelBC().

Parameters
lo_bclocOffsets for the lower faces in each coordinate direction.
hi_bclocOffsets for the upper faces in each coordinate direction.

◆ setEnforceSingularSolvable()

template<typename MF >
void amrex::MLLinOpT< MF >::setEnforceSingularSolvable ( bool  o)
inlinenoexcept

Control whether the solver should try to make singular problems solvable.

Parameters
oTrue (default) enables solvability enforcement; false leaves RHS untouched.

◆ setLevelBC() [1/2]

template<typename MF >
requires (!std::same_as<MF,AMF>)
template<MultiFabLike AMF>
requires (!std::same_as<MF,AMF>)
void amrex::MLLinOpT< MF >::setLevelBC ( int  amrlev,
const AMF *  levelbcdata,
const AMF *  robinbc_a = nullptr,
const AMF *  robinbc_b = nullptr,
const AMF *  robinbc_f = nullptr 
)

◆ setLevelBC() [2/2]

template<typename MF >
virtual void amrex::MLLinOpT< MF >::setLevelBC ( int  ,
const MF *  ,
const MF *  = nullptr,
const MF *  = nullptr,
const MF *  = nullptr 
)
pure virtual

Set boundary conditions for given level. For cell-centered solves only.

This must be called for each level. Argument levelbcdata is used to supply Dirichlet or Neumann bc at the physical domain; if those data are homogeneous we can pass nullptr instead of levelbcdata. Regardless, this function must be called. If used, the MultiFab levelbcdata must have one ghost cell. Only the data outside the physical domain will be used. It is assumed that the data in those ghost cells outside the domain live exactly on the face of the physical domain. Argument amrlev is relative level such that the lowest to the solver is always 0. The optional arguments robinbc_[a|b|f] provide Robin boundary condition a*phi + b*dphi/dn = f. Note that d./dn is d./dx at the upper boundary and -d./dx at the lower boundary, for Robin BC. However, for inhomogeneous Neumann BC, the value in leveldata is assumed to be d./dx.

Implemented in amrex::MLCellLinOpT< MF >.

◆ setMaxOrder()

template<typename MF >
void amrex::MLLinOpT< MF >::setMaxOrder ( int  o)
inlinenoexcept

Set order of interpolation at coarse/fine boundary.

Parameters
oPolynomial order (2, 3, or 4).

◆ setVerbose()

template<typename MF >
void amrex::MLLinOpT< MF >::setVerbose ( int  v)
inlinenoexcept

Set verbosity.

Parameters
vVerbosity level forwarded to MLMG logs.

◆ smooth()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::smooth ( int  amrlev,
int  mglev,
MF &  sol,
const MF &  rhs,
bool  skip_fillboundary,
int  niter 
) const
pure virtual

Smooth.

Parameters
amrlevAMR level
mglevMG level
solunknowns
rhsRHS
skip_fillboundaryflag controlling whether ghost cell filling can be skipped.
niternumber of (multicolor) smoothing iterations

Implemented in amrex::MLCellLinOpT< MF >.

◆ solutionResidual()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::solutionResidual ( int  amrlev,
MF &  resid,
MF &  x,
const MF &  b,
const MF *  crse_bcdata = nullptr 
)
pure virtual

Compute residual for solution.

Parameters
amrlevAMR level
residresidual
xsolution
bRHS
crse_bcdataoptional argument providing BC at coarse/fine boundary.

Implemented in amrex::MLCellLinOpT< MF >.

◆ supportInhomogNeumannBC()

template<typename MF >
virtual bool amrex::MLLinOpT< MF >::supportInhomogNeumannBC ( ) const
inlineprotectedvirtualnoexcept

Reimplemented in amrex::MLCellABecLapT< MF >.

◆ supportNSolve()

template<typename MF >
virtual bool amrex::MLLinOpT< MF >::supportNSolve ( ) const
inlinevirtual

Whether this operator supports NSolve.

Reimplemented in amrex::MLPoissonT< MF >, and amrex::MLABecLaplacianT< MF >.

◆ supportRobinBC()

template<typename MF >
virtual bool amrex::MLLinOpT< MF >::supportRobinBC ( ) const
inlineprotectedvirtualnoexcept

◆ unapplyMetricTerm()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::unapplyMetricTerm ( int  amrlev,
int  mglev,
MF &  rhs 
) const
inlinevirtual

Remove metric scaling previously applied via applyMetricTerm().

Parameters
amrlevAMR level index.
mglevMultigrid level index.
rhsRight-hand side updated in place.

Reimplemented in amrex::MLCellLinOpT< MF >.

◆ unimposeNeumannBC()

template<typename MF >
virtual void amrex::MLLinOpT< MF >::unimposeNeumannBC ( int  amrlev,
MF &  rhs 
) const
inlinevirtual

Undo Neumann contributions stored on the RHS.

Parameters
amrlevAMR level index.
rhsRHS MultiFab modified in place.

◆ update()

◆ xdoty()

template<typename MF >
virtual RT amrex::MLLinOpT< MF >::xdoty ( int  amrlev,
int  mglev,
const MF &  x,
const MF &  y,
bool  local 
) const
pure virtual

Dot-product helper used by bottom solvers.

Parameters
amrlevAMR level index.
mglevMultigrid level index.
xFirst vector.
ySecond vector.
localTrue to skip MPI reductions.

Implemented in amrex::MLCellLinOpT< MF >.

Friends And Related Symbol Documentation

◆ GMRESMLMGT

template<typename MF >
template<typename T >
friend class GMRESMLMGT
friend

◆ MLABecLaplacianT

template<typename MF >
template<typename T >
friend class MLABecLaplacianT
friend

◆ MLCGSolverT

template<typename MF >
template<typename T >
friend class MLCGSolverT
friend

◆ MLMGT

template<typename MF >
template<typename T >
friend class MLMGT
friend

◆ MLPoissonT

template<typename MF >
template<typename T >
friend class MLPoissonT
friend

Member Data Documentation

◆ enforceSingularSolvable

template<typename MF >
bool amrex::MLLinOpT< MF >::enforceSingularSolvable = true
protected

◆ info

template<typename MF >
LPInfo amrex::MLLinOpT< MF >::info
protected

◆ m_amr_ref_ratio

template<typename MF >
Vector<int> amrex::MLLinOpT< MF >::m_amr_ref_ratio
protected

◆ m_bottom_comm

template<typename MF >
MPI_Comm amrex::MLLinOpT< MF >::m_bottom_comm = MPI_COMM_NULL
protected

◆ m_coarse_bc_loc

template<typename MF >
RealVect amrex::MLLinOpT< MF >::m_coarse_bc_loc
protected

◆ m_coarse_data_crse_ratio

template<typename MF >
IntVect amrex::MLLinOpT< MF >::m_coarse_data_crse_ratio = IntVect(-1)
protected

◆ m_coarse_data_for_bc

template<typename MF >
const MF* amrex::MLLinOpT< MF >::m_coarse_data_for_bc = nullptr
protected

◆ m_coarse_data_for_bc_raii

template<typename MF >
MF amrex::MLLinOpT< MF >::m_coarse_data_for_bc_raii
protected

◆ m_coarse_fine_bc_type

template<typename MF >
LinOpBCType amrex::MLLinOpT< MF >::m_coarse_fine_bc_type = LinOpBCType::Dirichlet
protected

◆ m_default_comm

template<typename MF >
MPI_Comm amrex::MLLinOpT< MF >::m_default_comm = MPI_COMM_NULL
protected

◆ m_dmap

template<typename MF >
Vector<Vector<DistributionMapping> > amrex::MLLinOpT< MF >::m_dmap
protected

◆ m_do_agglomeration

template<typename MF >
bool amrex::MLLinOpT< MF >::m_do_agglomeration = false
protected

◆ m_do_consolidation

template<typename MF >
bool amrex::MLLinOpT< MF >::m_do_consolidation = false
protected

◆ m_do_semicoarsening

template<typename MF >
bool amrex::MLLinOpT< MF >::m_do_semicoarsening = false
protected

◆ m_domain_bloc_hi

template<typename MF >
Array<Real, 3> amrex::MLLinOpT< MF >::m_domain_bloc_hi {{ 0._rt , 0._rt , 0._rt }}
protected

◆ m_domain_bloc_lo

template<typename MF >
Array<Real, 3> amrex::MLLinOpT< MF >::m_domain_bloc_lo {{ 0._rt , 0._rt , 0._rt }}
protected

◆ m_domain_covered

template<typename MF >
Vector<int> amrex::MLLinOpT< MF >::m_domain_covered
protected

◆ m_factory

template<typename MF >
Vector<Vector<std::unique_ptr<FabFactory<FAB> > > > amrex::MLLinOpT< MF >::m_factory
protected

◆ m_geom

template<typename MF >
Vector<Vector<Geometry> > amrex::MLLinOpT< MF >::m_geom
protected

first Vector is for amr level and second is mg level

◆ m_grids

template<typename MF >
Vector<Vector<BoxArray> > amrex::MLLinOpT< MF >::m_grids
protected

◆ m_hibc

template<typename MF >
Vector<Array<BCType, 3> > amrex::MLLinOpT< MF >::m_hibc

◆ m_hibc_orig

template<typename MF >
Vector<Array<BCType, 3> > amrex::MLLinOpT< MF >::m_hibc_orig

◆ m_ixtype

template<typename MF >
IntVect amrex::MLLinOpT< MF >::m_ixtype
protected

◆ m_lobc

template<typename MF >
Vector<Array<BCType, 3> > amrex::MLLinOpT< MF >::m_lobc

◆ m_lobc_orig

template<typename MF >
Vector<Array<BCType, 3> > amrex::MLLinOpT< MF >::m_lobc_orig

◆ m_needs_coarse_data_for_bc

template<typename MF >
bool amrex::MLLinOpT< MF >::m_needs_coarse_data_for_bc = false
protected

◆ m_num_amr_levels

template<typename MF >
int amrex::MLLinOpT< MF >::m_num_amr_levels = 0
protected

◆ m_num_mg_levels

template<typename MF >
Vector<int> amrex::MLLinOpT< MF >::m_num_mg_levels
protected

◆ m_parent

template<typename MF >
const MLLinOpT<MF>* amrex::MLLinOpT< MF >::m_parent = nullptr
protected

◆ m_precond_mode

template<typename MF >
bool amrex::MLLinOpT< MF >::m_precond_mode = false
protected

◆ m_raii_comm

template<typename MF >
std::unique_ptr<CommContainer> amrex::MLLinOpT< MF >::m_raii_comm
protected

◆ maxorder

template<typename MF >
int amrex::MLLinOpT< MF >::maxorder = 3
protected

◆ mg_box_min_width

template<typename MF >
constexpr int amrex::MLLinOpT< MF >::mg_box_min_width = 2
staticconstexprprotected

◆ mg_coarsen_ratio

template<typename MF >
constexpr int amrex::MLLinOpT< MF >::mg_coarsen_ratio = 2
staticconstexprprotected

◆ mg_coarsen_ratio_vec

template<typename MF >
Vector<IntVect> amrex::MLLinOpT< MF >::mg_coarsen_ratio_vec
protected

◆ mg_domain_min_width

template<typename MF >
int amrex::MLLinOpT< MF >::mg_domain_min_width = 2
protected

◆ verbose

template<typename MF >
int amrex::MLLinOpT< MF >::verbose = 0
protected

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