#include <AMReX_MLLinOp.H>
Classes | |
| struct | CommContainer |
Public Types | |
| enum class | BCMode { Homogeneous , Inhomogeneous } |
| enum class | StateMode { Solution , Correction } |
| enum class | Location { FaceCenter , FaceCentroid , CellCenter , CellCentroid } |
| using | BCType = LinOpBCType |
Public Member Functions | |
| MLLinOp () | |
| virtual | ~MLLinOp () |
| MLLinOp (const MLLinOp &)=delete | |
| MLLinOp (MLLinOp &&)=delete | |
| MLLinOp & | operator= (const MLLinOp &)=delete |
| MLLinOp & | operator= (MLLinOp &&)=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< FArrayBox > const * > &a_factory, bool eb_limit_coarsening=true) |
| virtual std::string | name () const |
| void | setDomainBC (const Array< BCType, AMREX_SPACEDIM > &lobc, const Array< BCType, AMREX_SPACEDIM > &hibc) noexcept |
| Boundary of the whole domain. This functions must be called, and must be called before other bc functions. More... | |
| void | setDomainBC (const Vector< Array< BCType, AMREX_SPACEDIM > > &lobc, const Vector< Array< BCType, AMREX_SPACEDIM > > &hibc) noexcept |
| void | setDomainBCLoc (const Array< Real, AMREX_SPACEDIM > &lo_bcloc, const Array< Real, AMREX_SPACEDIM > &hi_bcloc) noexcept |
| bool | needsCoarseDataForBC () const noexcept |
| 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. More... | |
| void | setCoarseFineBC (const MultiFab *crse, int crse_ratio) noexcept |
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 always Dirichlet. 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. More... | |
| virtual void | setLevelBC (int, const MultiFab *, const MultiFab *=nullptr, const MultiFab *=nullptr, const MultiFab *=nullptr) |
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. More... | |
| void | setVerbose (int v) noexcept |
| void | setMaxOrder (int o) noexcept |
| int | getMaxOrder () const noexcept |
| void | setEnforceSingularSolvable (bool o) noexcept |
| bool | getEnforceSingularSolvable () const noexcept |
| virtual BottomSolver | getDefaultBottomSolver () const |
| virtual int | getNComp () const |
| virtual int | getNGrow (int=0, int=0) const |
| virtual bool | needsUpdate () const |
| virtual void | update () |
| virtual void | restriction (int, int, MultiFab &, MultiFab &) const |
| virtual void | interpolation (int, int, MultiFab &, const MultiFab &) const |
| virtual void | interpAssign (int, int, MultiFab &, MultiFab &) const |
| virtual void | averageDownSolutionRHS (int, MultiFab &, MultiFab &, const MultiFab &, const MultiFab &) |
| virtual void | apply (int, int, MultiFab &, MultiFab &, BCMode, StateMode, const MLMGBndry *=nullptr) const |
| virtual void | smooth (int, int, MultiFab &, const MultiFab &, bool=false) const |
| virtual void | normalize (int, int, MultiFab &) const |
| virtual void | solutionResidual (int, MultiFab &, MultiFab &, const MultiFab &, const MultiFab *=nullptr) |
| virtual void | correctionResidual (int, int, MultiFab &, MultiFab &, const MultiFab &, BCMode, const MultiFab *=nullptr) |
| virtual void | reflux (int, MultiFab &, const MultiFab &, const MultiFab &, MultiFab &, MultiFab &, const MultiFab &) const |
| virtual void | compFlux (int, const Array< MultiFab *, AMREX_SPACEDIM > &, MultiFab &, Location) const |
| virtual void | compGrad (int, const Array< MultiFab *, AMREX_SPACEDIM > &, MultiFab &, Location) const |
| virtual void | applyMetricTerm (int, int, Any &) const |
| virtual void | unapplyMetricTerm (int, int, MultiFab &) const |
| virtual void | unimposeNeumannBC (int, Any &) const |
| virtual void | applyInhomogNeumannTerm (int, Any &) const |
| virtual void | applyOverset (int, Any &) const |
| virtual void | scaleRHS (int, Any &) const |
| virtual Vector< Real > | getSolvabilityOffset (int, int, Any const &) const |
| virtual void | fixSolvabilityByOffset (int, int, Any &, Vector< Real > const &) const |
| virtual void | prepareForSolve ()=0 |
| virtual bool | isSingular (int) const |
| virtual bool | isBottomSingular () const |
| virtual Real | xdoty (int, int, const MultiFab &, const MultiFab &, bool) const |
| virtual std::unique_ptr< MLLinOp > | makeNLinOp (int) const |
| virtual void | getFluxes (const Vector< Array< MultiFab *, AMREX_SPACEDIM > > &, const Vector< MultiFab * > &, Location) const |
| virtual void | getFluxes (const Vector< MultiFab * > &, const Vector< MultiFab * > &) const |
| virtual bool | supportNSolve () const |
| virtual void | copyNSolveSolution (MultiFab &, MultiFab const &) const |
| virtual Any | AnyMake (int amrlev, int mglev, IntVect const &ng) const |
| virtual Any | AnyMakeCoarseMG (int amrlev, int mglev, IntVect const &ng) const |
| virtual Any | AnyMakeCoarseAmr (int famrlev, IntVect const &ng) const |
| virtual Any | AnyMakeAlias (Any const &a) const |
| virtual IntVect | AnyGrowVect (Any const &a) const |
| virtual void | AnyCopy (Any &dst, Any const &src, IntVect const &ng) const |
| virtual void | AnyAdd (Any &dst, Any const &src, IntVect const &ng) const |
| virtual void | AnySetToZero (Any &a) const |
| virtual void | AnySetBndryToZero (Any &a) const |
| virtual void | AnyParallelCopy (Any &dst, Any const &src, IntVect const &src_nghost, IntVect const &dst_nghost, Periodicity const &period=Periodicity::NonPeriodic()) const |
| virtual Real | AnyNormInf (Any &a) const |
| virtual Real | AnyNormInfMask (int amrlev, Any const &a, bool local) const =0 |
| virtual void | AnySolutionResidual (int amrlev, Any &resid, Any &x, Any const &b, Any const *crse_bcdata=nullptr) |
| virtual void | AnyCorrectionResidual (int amrlev, int mglev, Any &resid, Any &x, const Any &b, BCMode bc_mode, const Any *crse_bcdata=nullptr) |
| virtual void | AnyReflux (int crse_amrlev, Any &res, const Any &crse_sol, const Any &crse_rhs, Any &fine_res, Any &fine_sol, const Any &fine_rhs) |
| virtual void | AnyAvgDownResAmr (int clev, Any &cres, Any const &fres) const =0 |
| virtual void | AnyAvgDownResMG (int clev, Any &cres, Any const &fres) const |
| virtual void | AnySmooth (int amrlev, int mglev, Any &sol, const Any &rhs, bool skip_fillboundary=false) const |
| virtual void | AnyRestriction (int amrlev, int cmglev, Any &crse, Any &fine) const |
| virtual void | AnyInterpolationMG (int amrlev, int fmglev, Any &fine, const Any &crse) const |
| virtual void | AnyInterpAssignMG (int amrlev, int fmglev, Any &fine, Any &crse) const |
| virtual void | AnyInterpolationAmr (int famrlev, Any &fine, const Any &crse, IntVect const &) const =0 |
| virtual void | AnyAverageDownSolutionRHS (int camrlev, Any &crse_sol, Any &crse_rhs, const Any &fine_sol, const Any &fine_rhs) |
| virtual void | AnyAverageDownAndSync (Vector< Any > &sol) const =0 |
| virtual void | postSolve (Vector< Any > &sol) const |
| Real | MFNormInf (MultiFab const &mf, iMultiFab const *fine_mask, bool local) const |
| bool | isMFIterSafe (int amrlev, int mglev1, int mglev2) const |
Static Public Member Functions | |
| static void | Initialize () |
| static void | Finalize () |
Protected Member Functions | |
| int | NAMRLevels () const noexcept |
| functions More... | |
| int | NMGLevels (int amrlev) const noexcept |
| const Vector< int > & | AMRRefRatio () const noexcept |
| int | AMRRefRatio (int amr_lev) const noexcept |
| const Geometry & | Geom (int amr_lev, int mglev=0) const noexcept |
| FabFactory< FArrayBox > const * | Factory (int amr_lev, int mglev=0) const noexcept |
| GpuArray< BCType, AMREX_SPACEDIM > | LoBC (int icomp=0) const noexcept |
| GpuArray< BCType, AMREX_SPACEDIM > | HiBC (int icomp=0) 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 |
| void | make (Vector< Vector< Any > > &mf, IntVect const &ng) const |
| virtual std::unique_ptr< FabFactory< FArrayBox > > | 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 > | |
| 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 Attributes | |
| static constexpr int | mg_coarsen_ratio = 2 |
| static constexpr int | mg_box_min_width = 2 |
| static constexpr int | mg_domain_min_width = 2 |
Private Member Functions | |
| void | defineGrids (const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const Vector< FabFactory< FArrayBox > const * > &a_factory) |
| void | defineAuxData () |
| void | defineBC () |
| MPI_Comm | makeSubCommunicator (const DistributionMapping &dm) |
| void | remapNeighborhoods (Vector< DistributionMapping > &dms) |
| virtual void | checkPoint (std::string const &) const |
Static Private Member Functions | |
| static void | makeAgglomeratedDMap (const Vector< BoxArray > &ba, Vector< DistributionMapping > &dm) |
| static void | makeConsolidatedDMap (const Vector< BoxArray > &ba, Vector< DistributionMapping > &dm, int ratio, int strategy) |
Friends | |
| class | MLMG |
| class | MLCGSolver |
| class | MLPoisson |
| class | MLABecLaplacian |
| using amrex::MLLinOp::BCType = LinOpBCType |
|
strong |
|
strong |
|
strong |
| amrex::MLLinOp::MLLinOp | ( | ) |
|
virtual |
|
delete |
|
delete |
Reimplemented in amrex_temp::MLLinOpTemp.
Implemented in amrex::MLNodeLinOp, amrex::MLCellLinOp, and amrex_temp::MLLinOpTemp.
|
virtual |
Reimplemented in amrex_temp::MLLinOpTemp.
|
pure virtual |
Implemented in amrex::MLNodeLinOp, amrex::MLCellLinOp, and amrex_temp::MLLinOpTemp.
Reimplemented in amrex_temp::MLLinOpTemp.
Reimplemented in amrex_temp::MLLinOpTemp.
|
virtual |
Reimplemented in amrex_temp::MLLinOpTemp.
|
virtual |
Reimplemented in amrex_temp::MLLinOpTemp.
|
pure virtual |
Implemented in amrex::MLNodeLinOp, amrex::MLCellLinOp, and amrex_temp::MLLinOpTemp.
|
virtual |
Reimplemented in amrex_temp::MLLinOpTemp.
Reimplemented in amrex_temp::MLLinOpTemp.
Reimplemented in amrex_temp::MLLinOpTemp.
Reimplemented in amrex_temp::MLLinOpTemp.
Reimplemented in amrex_temp::MLLinOpTemp.
|
virtual |
Reimplemented in amrex_temp::MLLinOpTemp.
|
pure virtual |
Implemented in amrex::MLNodeLinOp, amrex::MLCellLinOp, and amrex_temp::MLLinOpTemp.
|
virtual |
Reimplemented in amrex_temp::MLLinOpTemp.
|
virtual |
Reimplemented in amrex_temp::MLLinOpTemp.
|
virtual |
Reimplemented in amrex_temp::MLLinOpTemp.
|
virtual |
Reimplemented in amrex_temp::MLLinOpTemp.
|
virtual |
Reimplemented in amrex_temp::MLLinOpTemp.
|
virtual |
Reimplemented in amrex_temp::MLLinOpTemp.
|
virtual |
Reimplemented in amrex_temp::MLLinOpTemp.
|
inlinevirtual |
Reimplemented in amrex::MLEBABecLap, amrex::MLCellLinOp, amrex::MLTensorOp, amrex::MLNodeLinOp, and amrex::MLEBTensorOp.
Reimplemented in amrex::MLCellABecLap.
Reimplemented in amrex::MLNodeLinOp, and amrex::MLCellLinOp.
Reimplemented in amrex::MLCellABecLap.
|
inlinevirtual |
Reimplemented in amrex::MLCellLinOp, amrex::MLNodeTensorLaplacian, amrex::MLNodeLaplacian, amrex::MLEBNodeFDLaplacian, and amrex::MLEBABecLap.
|
inlineprotectednoexcept |
|
inlineprivatevirtual |
Reimplemented in amrex::MLNodeLaplacian.
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlinevirtual |
Reimplemented in amrex::MLNodeLinOp, amrex::MLTensorOp, amrex::MLEBTensorOp, and amrex::MLCellLinOp.
|
inlinevirtual |
Reimplemented in amrex::MLNodeLinOp, amrex::MLNodeLaplacian, amrex::MLEBNodeFDLaplacian, amrex::MLCellLinOp, and amrex::MLEBABecLap.
|
inlinevirtual |
Reimplemented in amrex::MLPoisson, and amrex::MLABecLaplacian.
|
inlinevirtual |
Reimplemented in amrex::MLNodeLinOp, and amrex::MLCellLinOp.
| void amrex::MLLinOp::define | ( | const Vector< Geometry > & | a_geom, |
| const Vector< BoxArray > & | a_grids, | ||
| const Vector< DistributionMapping > & | a_dmap, | ||
| const LPInfo & | a_info, | ||
| const Vector< FabFactory< FArrayBox > const * > & | a_factory, | ||
| bool | eb_limit_coarsening = true |
||
| ) |
|
private |
|
private |
|
private |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
static |
|
inlinevirtual |
Reimplemented in amrex::MLNodeLinOp, amrex::MLNodeLaplacian, and amrex::MLCellLinOp.
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
inlinevirtual |
Reimplemented in amrex_temp::MLLinOpTemp, and amrex::MLNodeLaplacian.
|
inlinenoexcept |
|
inlinevirtual |
Reimplemented in amrex::MLCellABecLap, and amrex::MLNodeLaplacian.
|
inlinevirtual |
Reimplemented in amrex::MLNodeLaplacian, and amrex::MLCellABecLap.
|
inlinenoexcept |
|
inlinevirtual |
Reimplemented in amrex::MLEBABecLap, amrex::MLALaplacian, amrex::MLABecLaplacian, amrex::MLTensorOp, and amrex::MLEBTensorOp.
|
inlinevirtual |
Reimplemented in amrex::MLNodeLinOp, amrex::MLNodeLaplacian, and amrex::MLCellLinOp.
|
inlineprotectednoexcept |
|
protectednoexcept |
|
protectednoexcept |
|
inlineprotectednoexcept |
|
static |
|
inlinevirtual |
Reimplemented in amrex::MLNodeLinOp, and amrex::MLCellLinOp.
|
inlinevirtual |
Reimplemented in amrex::MLCellLinOp, amrex::MLNodeTensorLaplacian, amrex::MLNodeLaplacian, amrex::MLEBNodeFDLaplacian, and amrex::MLEBABecLap.
|
inlineprotectednoexcept |
|
inlinevirtual |
|
inlineprotectednoexcept |
|
inlinevirtual |
|
staticprivate |
|
staticprivate |
|
inlineprotectedvirtual |
Reimplemented in amrex::MLEBABecLap.
Reimplemented in amrex::MLNodeLinOp, amrex::MLEBABecLap, amrex::MLALaplacian, amrex::MLABecLaplacian, and amrex::MLPoisson.
|
private |
| Real amrex::MLLinOp::MFNormInf | ( | MultiFab const & | mf, |
| iMultiFab const * | fine_mask, | ||
| bool | local | ||
| ) | const |
|
inlinevirtual |
Reimplemented in amrex::MLNodeTensorLaplacian, amrex::MLNodeLaplacian, and amrex::MLEBNodeFDLaplacian.
|
inlineprotectednoexcept |
functions
|
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.
|
inlinevirtual |
Reimplemented in amrex::MLEBABecLap, amrex::MLCellLinOp, amrex::MLCellABecLap, amrex::MLALaplacian, amrex::MLABecLaplacian, amrex::MLTensorOp, and amrex::MLEBTensorOp.
Reimplemented in amrex::MLEBNodeFDLaplacian.
|
pure virtual |
Implemented in amrex::MLNodeLinOp, amrex_temp::MLLinOpTemp, amrex::MLEBABecLap, amrex::MLCellLinOp, amrex::MLCellABecLap, amrex::MLABecLaplacian, amrex::MLTensorOp, amrex::MLPoisson, amrex::MLNodeTensorLaplacian, amrex::MLNodeLaplacian, amrex::MLEBTensorOp, amrex::MLEBNodeFDLaplacian, and amrex::MLALaplacian.
|
inlinevirtual |
Reimplemented in amrex::MLNodeTensorLaplacian, amrex::MLNodeLaplacian, amrex::MLEBNodeFDLaplacian, and amrex::MLCellLinOp.
|
private |
|
protectedvirtual |
Reimplemented in amrex::MLNodeLaplacian, and amrex::MLNodeLinOp.
|
inlinevirtual |
Reimplemented in amrex::MLCellLinOp, amrex::MLEBABecLap, amrex::MLNodeTensorLaplacian, amrex::MLNodeLaplacian, and amrex::MLEBNodeFDLaplacian.
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 always Dirichlet. 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.
| crse | |
| crse_ratio |
|
inlineprotectednoexcept |
|
noexcept |
Boundary of the whole domain. This functions must be called, and must be called before other bc functions.
| lobc | |
| hibc |
|
noexcept |
|
noexcept |
|
inlinenoexcept |
|
inlinevirtual |
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.
Reimplemented in amrex::MLCellLinOp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinevirtual |
Reimplemented in amrex::MLNodeLinOp, amrex::MLNodeTensorLaplacian, and amrex::MLCellLinOp.
|
inlinevirtual |
Reimplemented in amrex::MLNodeLinOp, and amrex::MLCellLinOp.
|
inlineprotectedvirtualnoexcept |
Reimplemented in amrex::MLCellABecLap.
|
inlinevirtual |
Reimplemented in amrex::MLPoisson, and amrex::MLABecLaplacian.
|
inlineprotectedvirtualnoexcept |
Reimplemented in amrex::MLABecLaplacian.
Reimplemented in amrex::MLNodeLinOp, and amrex::MLCellLinOp.
Reimplemented in amrex::MLNodeLaplacian.
|
inlinevirtual |
Reimplemented in amrex::MLEBABecLap, amrex::MLCellLinOp, amrex::MLCellABecLap, amrex::MLALaplacian, amrex::MLABecLaplacian, amrex::MLTensorOp, and amrex::MLEBTensorOp.
|
inlinevirtual |
Reimplemented in amrex::MLNodeLinOp, and amrex::MLCellLinOp.
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
first Vector is for amr level and second is mg level
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticconstexprprotected |
|
staticconstexprprotected |
|
staticconstexprprotected |
|
protected |