1 #ifndef AMREX_ML_NODE_LINOP_H_H
2 #define AMREX_ML_NODE_LINOP_H_H
3 #include <AMReX_Config.H>
8 #if defined(AMREX_USE_HYPRE) && (AMREX_SPACEDIM > 1)
34 int a_eb_limit_coarsening = -1);
48 bool skip_fillboundary=false) const override;
51 const
MultiFab* crse_bcdata=
nullptr) override;
73 bool skip_fillboundary=
false)
const;
91 Real
normInf (
int amrlev,
MultiFab const& mf,
bool local)
const override;
96 IntVect const& nghost)
const override;
102 #if defined(AMREX_USE_HYPRE) && (AMREX_SPACEDIM > 1)
103 [[nodiscard]] std::unique_ptr<HypreNodeLap> makeHypreNodeLap(
105 const std::string& options_namespace)
const override;
107 virtual void fillIJMatrix (
MFIter const& ,
114 amrex::Abort(
"MLNodeLinOp::fillIJMatrix: how did we get here?");
117 virtual void fillRHS (MFIter
const& ,
118 Array4<int const>
const& ,
120 Array4<Real const>
const& )
const
122 amrex::Abort(
"MLNodeLinOp:fillRHS: how did we get here?");
Array4< int const > offset
Definition: AMReX_HypreMLABecLap.cpp:1089
Array4< Real > fine
Definition: AMReX_InterpFaceRegister.cpp:90
Array4< Real const > crse
Definition: AMReX_InterpFaceRegister.cpp:92
A collection of Boxes stored in an Array.
Definition: AMReX_BoxArray.H:550
Calculates the distribution of FABs to MPI processes.
Definition: AMReX_DistributionMapping.H:41
Rectangular problem domain geometry.
Definition: AMReX_Geometry.H:73
HYPRE_Int Int
Definition: AMReX_HypreNodeLap.H:36
Definition: AMReX_MFIter.H:57
Definition: AMReX_MLLinOp.H:98
LinOpEnumType::StateMode StateMode
Definition: AMReX_MLLinOp.H:113
LinOpEnumType::BCMode BCMode
Definition: AMReX_MLLinOp.H:112
Definition: AMReX_MLMGBndry.H:12
Definition: AMReX_MLNodeLinOp.H:16
MLNodeLinOp(MLNodeLinOp &&)=delete
Vector< std::unique_ptr< iMultiFab > > m_nd_fine_mask
Definition: AMReX_MLNodeLinOp.H:134
void nodalSync(int amrlev, int mglev, MultiFab &mf) const
Definition: AMReX_MLNodeLinOp.cpp:117
MultiFab m_coarse_dot_mask
Definition: AMReX_MLNodeLinOp.H:137
MLNodeLinOp & operator=(const MLNodeLinOp &)=delete
void correctionResidual(int amrlev, int mglev, MultiFab &resid, MultiFab &x, const MultiFab &b, BCMode bc_mode, const MultiFab *crse_bcdata=nullptr) override
Definition: AMReX_MLNodeLinOp.cpp:152
void define(const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo(), const Vector< FabFactory< FArrayBox > const * > &a_factory={}, int a_eb_limit_coarsening=-1)
Definition: AMReX_MLNodeLinOp.cpp:23
bool isBottomSingular() const override
Is the bottom of MG singular?
Definition: AMReX_MLNodeLinOp.H:68
bool m_in_solution_mode
Definition: AMReX_MLNodeLinOp.H:154
virtual void fixUpResidualMask(int, iMultiFab &)
Definition: AMReX_MLNodeLinOp.H:89
bool m_masks_built
Definition: AMReX_MLNodeLinOp.H:147
CoarseningStrategy
Definition: AMReX_MLNodeLinOp.H:19
std::unique_ptr< iMultiFab > m_owner_mask_bottom
Definition: AMReX_MLNodeLinOp.H:131
virtual void Fsmooth(int amrlev, int mglev, MultiFab &sol, const MultiFab &rhs) const =0
MultiFab m_bottom_dot_mask
Definition: AMReX_MLNodeLinOp.H:136
void interpAssign(int amrlev, int fmglev, MultiFab &fine, MultiFab &crse) const override
Definition: AMReX_MLNodeLinOp.cpp:565
bool m_is_bottom_singular
Definition: AMReX_MLNodeLinOp.H:157
void interpolationAmr(int famrlev, MultiFab &fine, const MultiFab &crse, IntVect const &nghost) const override
Definition: AMReX_MLNodeLinOp.cpp:512
Real normInf(int amrlev, MultiFab const &mf, bool local) const override
Definition: AMReX_MLNodeLinOp.cpp:500
MLNodeLinOp(const MLNodeLinOp &)=delete
void avgDownResAmr(int, MultiFab &, MultiFab const &) const final
Definition: AMReX_MLNodeLinOp.H:93
Vector< std::unique_ptr< LayoutData< int > > > m_has_fine_bndry
Definition: AMReX_MLNodeLinOp.H:135
bool m_overset_dirichlet_mask
Definition: AMReX_MLNodeLinOp.H:148
Vector< Real > getSolvabilityOffset(int amrlev, int mglev, MultiFab const &rhs) const override
Definition: AMReX_MLNodeLinOp.cpp:200
void setLevelBC(int, const MultiFab *, const MultiFab *=nullptr, const MultiFab *=nullptr, const MultiFab *=nullptr) final
Definition: AMReX_MLNodeLinOp.H:40
void prepareForGMRES() override
Definition: AMReX_MLNodeLinOp.cpp:387
void fixSolvabilityByOffset(int amrlev, int mglev, MultiFab &rhs, Vector< Real > const &offset) const override
Definition: AMReX_MLNodeLinOp.cpp:225
Vector< std::unique_ptr< iMultiFab > > m_cc_fine_mask
Definition: AMReX_MLNodeLinOp.H:133
Real xdoty(int amrlev, int mglev, const MultiFab &x, const MultiFab &y, bool local) const final
Definition: AMReX_MLNodeLinOp.cpp:179
void solutionResidual(int amrlev, MultiFab &resid, MultiFab &x, const MultiFab &b, const MultiFab *crse_bcdata=nullptr) override
Definition: AMReX_MLNodeLinOp.cpp:123
void averageDownAndSync(Vector< MultiFab > &sol) const override
Definition: AMReX_MLNodeLinOp.cpp:544
void prepareForSolve() override
Definition: AMReX_MLNodeLinOp.cpp:100
void buildMasks()
Definition: AMReX_MLNodeLinOp.cpp:262
std::unique_ptr< iMultiFab > m_owner_mask_top
Definition: AMReX_MLNodeLinOp.H:130
void smooth(int amrlev, int mglev, MultiFab &sol, const MultiFab &rhs, bool skip_fillboundary=false) const override
Definition: AMReX_MLNodeLinOp.cpp:169
Vector< Vector< std::unique_ptr< iMultiFab > > > m_dirichlet_mask
Definition: AMReX_MLNodeLinOp.H:132
Vector< std::unique_ptr< iMultiFab > > m_norm_fine_mask
Definition: AMReX_MLNodeLinOp.H:139
MLNodeLinOp()
Definition: AMReX_MLNodeLinOp.cpp:17
int m_smooth_num_sweeps
Definition: AMReX_MLNodeLinOp.H:150
void apply(int amrlev, int mglev, MultiFab &out, MultiFab &in, BCMode bc_mode, StateMode s_mode, const MLMGBndry *bndry=nullptr) const final
Definition: AMReX_MLNodeLinOp.cpp:161
void resizeMultiGrid(int new_size) override
Definition: AMReX_MLNodeLinOp.cpp:467
void setSmoothNumSweeps(int nsweeps) noexcept
Definition: AMReX_MLNodeLinOp.H:36
void setDirichletNodesToZero(int amrlev, int mglev, MultiFab &mf) const override
Definition: AMReX_MLNodeLinOp.cpp:402
static std::unique_ptr< iMultiFab > makeOwnerMask(const BoxArray &ba, const DistributionMapping &dm, const Geometry &geom)
Definition: AMReX_MLNodeLinOp.cpp:108
bool isSingular(int amrlev) const override
Is it singular on given AMR level?
Definition: AMReX_MLNodeLinOp.H:66
~MLNodeLinOp() override=default
CoarseningStrategy m_coarsening_strategy
Definition: AMReX_MLNodeLinOp.H:144
virtual void applyBC(int amrlev, int mglev, MultiFab &phi, BCMode bc_mode, StateMode state_mode, bool skip_fillboundary=false) const
Definition: AMReX_MLNodeLinOp.cpp:437
void setOversetMask(int amrlev, const iMultiFab &a_dmask)
Definition: AMReX_MLNodeLinOp.cpp:419
virtual void Fapply(int amrlev, int mglev, MultiFab &out, const MultiFab &in) const =0
A collection (stored as an array) of FArrayBox objects.
Definition: AMReX_MultiFab.H:38
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition: AMReX_Vector.H:27
Definition: AMReX_iMultiFab.H:32
Definition: AMReX_Amr.cpp:49
void Abort(const std::string &msg)
Print out message to cerr and exit via abort().
Definition: AMReX.cpp:225
const int[]
Definition: AMReX_BLProfiler.cpp:1664
Definition: AMReX_Array4.H:61
Definition: AMReX_MLLinOp.H:35