Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::MLAlgMG Class Reference

Algebraic system of one MG level of AMR level 0 of an MLLinOp, solved with AlgMG. More...

#include <AMReX_MLAlgMG.H>

Classes

struct  Impl

Public Member Functions

 MLAlgMG (int mglev, BoxArray const &grids, DistributionMapping const &dmap, Geometry const &geom, iMultiFab const &owner_mask, iMultiFab const &dirichlet_mask, MLNodeLinOp const &linop)
 MLAlgMG (int mglev, BoxArray const &grids, DistributionMapping const &dmap, Geometry const &geom, FabFactory< FArrayBox > const &factory, iMultiFab const *overset_mask, Real ascalar, Real bscalar, MultiFab const *acoef, Array< MultiFab const *, 3 > const &bcoef, MultiFab const *eb_bcoef, LayoutData< GpuArray< int, 2 *3 > > const &bctype, LayoutData< GpuArray< Real, 2 *3 > > const &bcl, int maxorder)
 Cell-centered operator alpha*a - beta*div(b grad): rows are all cells except those of fully covered boxes.
 ~MLAlgMG ()
 MLAlgMG (MLAlgMG const &)=delete
 MLAlgMG (MLAlgMG &&)=delete
MLAlgMG & operator= (MLAlgMG const &)=delete
MLAlgMG & operator= (MLAlgMG &&)=delete
void solve (MultiFab &soln, MultiFab const &rhs, Real reltol, Real abstol, int maxiter)
 Solve A x = b with zero initial guess.
void applyVcycle (MultiFab &soln, MultiFab const &rhs)
 One AlgMG V-cycle with zero initial guess: the preconditioner form.
AlgMG< Real > & solver () noexcept
 The solver, for settings such as verbosity and Krylov acceleration.

Detailed Description

Algebraic system of one MG level of AMR level 0 of an MLLinOp, solved with AlgMG.

Built by MLLinOp::makeAlgMG under the ParallelContext communicator of that level. The matrix is assembled once; solve() can be called repeatedly.

Constructor & Destructor Documentation

◆ MLAlgMG() [1/4]

amrex::MLAlgMG::MLAlgMG ( int mglev,
BoxArray const & grids,
DistributionMapping const & dmap,
Geometry const & geom,
iMultiFab const & owner_mask,
iMultiFab const & dirichlet_mask,
MLNodeLinOp const & linop )

Nodal operator: rows are the nodes owned by this rank that are not Dirichlet nodes.

◆ MLAlgMG() [2/4]

amrex::MLAlgMG::MLAlgMG ( int mglev,
BoxArray const & grids,
DistributionMapping const & dmap,
Geometry const & geom,
FabFactory< FArrayBox > const & factory,
iMultiFab const * overset_mask,
Real ascalar,
Real bscalar,
MultiFab const * acoef,
Array< MultiFab const *, 3 > const & bcoef,
MultiFab const * eb_bcoef,
LayoutData< GpuArray< int, 2 *3 > > const & bctype,
LayoutData< GpuArray< Real, 2 *3 > > const & bcl,
int maxorder )

Cell-centered operator alpha*a - beta*div(b grad): rows are all cells except those of fully covered boxes.

The a coefficient may be nullptr (zero); the b coefficients are required. eb_bcoef is the EB Dirichlet b coefficient or nullptr. bctype and bcl give the domain BC type and location per box and face, and maxorder the order of the Dirichlet boundary stencil (2 or 3).

◆ ~MLAlgMG()

amrex::MLAlgMG::~MLAlgMG ( )
default

◆ MLAlgMG() [3/4]

amrex::MLAlgMG::MLAlgMG ( MLAlgMG const & )
delete

◆ MLAlgMG() [4/4]

amrex::MLAlgMG::MLAlgMG ( MLAlgMG && )
delete

Member Function Documentation

◆ applyVcycle()

void amrex::MLAlgMG::applyVcycle ( MultiFab & soln,
MultiFab const & rhs )

One AlgMG V-cycle with zero initial guess: the preconditioner form.

◆ operator=() [1/2]

MLAlgMG & amrex::MLAlgMG::operator= ( MLAlgMG && )
delete

◆ operator=() [2/2]

MLAlgMG & amrex::MLAlgMG::operator= ( MLAlgMG const & )
delete

◆ solve()

void amrex::MLAlgMG::solve ( MultiFab & soln,
MultiFab const & rhs,
Real reltol,
Real abstol,
int maxiter )

Solve A x = b with zero initial guess.

soln is overwritten. Converged when the residual 2-norm is below max(reltol times the rhs 2-norm, abstol).

◆ solver()

AlgMG< Real > & amrex::MLAlgMG::solver ( )
nodiscardnoexcept

The solver, for settings such as verbosity and Krylov acceleration.


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