1 #ifndef AMREX_ML_NODE_LAPLACIAN_H_
2 #define AMREX_ML_NODE_LAPLACIAN_H_
3 #include <AMReX_Config.H>
23 Real a_const_sigma = Real(0.0));
30 Real a_const_sigma = Real(0.0));
44 Real a_const_sigma = Real(0.0));
52 Real a_const_sigma = Real(0.0));
55 std::string
name ()
const override {
return std::string(
"MLNodeLaplacian"); }
97 void reflux (
int crse_amrlev,
111 amrex::Abort(
"MLNodeLaplacian::getFluxes: How did we get here?");
117 MultiFab const& rhs)
const override;
123 amrex::Abort(
"MLNodeLaplacian::compGrad: How did we get here?");
138 void buildIntegral ();
139 void buildSurfaceIntegral ();
142 void setEBInflowVelocity (
int amrlev,
const MultiFab& eb_vel);
146 #if defined(AMREX_USE_HYPRE) && (AMREX_SPACEDIM > 1)
147 void fillIJMatrix (
MFIter const& mfi,
152 Real* mat)
const override;
155 void fillIJMatrix_gpu (
MFIter const& mfi,
163 void fillIJMatrix_cpu (
MFIter const& mfi,
193 bool m_integral_built =
false;
196 bool m_surface_integral_built =
false;
197 bool m_build_surface_integral =
false;
205 void checkPoint (std::string
const& file_name)
const final;
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:549
Rectangular problem domain geometry.
Definition: AMReX_Geometry.H:73
HYPRE_Int Int
Definition: AMReX_HypreNodeLap.H:36
Definition: AMReX_MFIter.H:57
Definition: AMReX_MLNodeLaplacian.H:14
Real m_normalization_threshold
Definition: AMReX_MLNodeLaplacian.H:188
void restrictInteriorNodes(int camrlev, MultiFab &crhs, MultiFab &frhs) const
Definition: AMReX_MLNodeLaplacian.cpp:745
bool m_use_gauss_seidel
Definition: AMReX_MLNodeLaplacian.H:201
void normalize(int amrlev, int mglev, MultiFab &mf) const final
Definition: AMReX_MLNodeLaplacian.cpp:839
void FillBoundaryCoeff(MultiFab &sigma, const Geometry &geom)
Definition: AMReX_MLNodeLaplacian.cpp:403
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={}, Real a_const_sigma=Real(0.0))
Definition: AMReX_MLNodeLaplacian.cpp:39
bool m_use_mapped
Definition: AMReX_MLNodeLaplacian.H:203
void setHarmonicAverage(bool flag) noexcept
Definition: AMReX_MLNodeLaplacian.H:79
void compGrad(int, const Array< MultiFab *, AMREX_SPACEDIM > &, MultiFab &, Location) const final
Definition: AMReX_MLNodeLaplacian.H:121
void averageDownSolutionRHS(int camrlev, MultiFab &crse_sol, MultiFab &crse_rhs, const MultiFab &fine_sol, const MultiFab &fine_rhs) final
Definition: AMReX_MLNodeLaplacian.cpp:730
std::string name() const override
Definition: AMReX_MLNodeLaplacian.H:55
void prepareForSolve() final
Definition: AMReX_MLNodeLaplacian.cpp:451
void fixUpResidualMask(int amrlev, iMultiFab &resmsk) final
Definition: AMReX_MLNodeLaplacian.cpp:429
MLNodeLaplacian(const MLNodeLaplacian &)=delete
void getFluxes(const Vector< Array< MultiFab *, AMREX_SPACEDIM > > &, const Vector< MultiFab * > &, Location) const final
Definition: AMReX_MLNodeLaplacian.H:108
void compSyncResidualFine(MultiFab &sync_resid, const MultiFab &phi, const MultiFab &vold, const MultiFab *rhcc)
Definition: AMReX_MLNodeLaplacian_sync.cpp:339
void Fapply(int amrlev, int mglev, MultiFab &out, const MultiFab &in) const final
Definition: AMReX_MLNodeLaplacian_misc.cpp:199
Real m_const_sigma
Definition: AMReX_MLNodeLaplacian.H:182
void setSigma(int amrlev, const MultiFab &a_sigma)
Definition: AMReX_MLNodeLaplacian.cpp:377
void setNormalizationThreshold(Real t) noexcept
Definition: AMReX_MLNodeLaplacian.H:59
void buildStencil()
Definition: AMReX_MLNodeLaplacian_sten.cpp:17
Vector< Vector< Real > > m_s0_norm0
Definition: AMReX_MLNodeLaplacian.H:186
void compRHS(const Vector< MultiFab * > &rhs, const Vector< MultiFab * > &vel, const Vector< const MultiFab * > &rhnd, const Vector< MultiFab * > &rhcc)
Definition: AMReX_MLNodeLaplacian_misc.cpp:968
MLNodeLaplacian()=default
void updateVelocity(const Vector< MultiFab * > &vel, const Vector< MultiFab const * > &sol) const
Definition: AMReX_MLNodeLaplacian_misc.cpp:709
int m_is_rz
Definition: AMReX_MLNodeLaplacian.H:180
~MLNodeLaplacian() override=default
Vector< Real > getSolvabilityOffset(int amrlev, int mglev, MultiFab const &rhs) const override
Definition: AMReX_MLNodeLaplacian.cpp:167
Vector< Vector< Array< std::unique_ptr< MultiFab >, AMREX_SPACEDIM > > > m_sigma
Definition: AMReX_MLNodeLaplacian.H:183
MLNodeLaplacian(MLNodeLaplacian &&)=delete
void setMapped(bool flag) noexcept
Definition: AMReX_MLNodeLaplacian.H:81
void setGaussSeidel(bool flag) noexcept
Definition: AMReX_MLNodeLaplacian.H:78
void interpolation(int amrlev, int fmglev, MultiFab &fine, const MultiFab &crse) const final
Definition: AMReX_MLNodeLaplacian.cpp:582
BottomSolver getDefaultBottomSolver() const final
Definition: AMReX_MLNodeLaplacian.H:87
void restriction(int amrlev, int cmglev, MultiFab &crse, MultiFab &fine) const final
Definition: AMReX_MLNodeLaplacian.cpp:470
void Fsmooth(int amrlev, int mglev, MultiFab &sol, const MultiFab &rhs) const final
Definition: AMReX_MLNodeLaplacian_misc.cpp:345
bool m_use_harmonic_average
Definition: AMReX_MLNodeLaplacian.H:202
void reflux(int crse_amrlev, MultiFab &res, const MultiFab &crse_sol, const MultiFab &crse_rhs, MultiFab &fine_res, MultiFab &fine_sol, const MultiFab &fine_rhs) const final
Definition: AMReX_MLNodeLaplacian_sync.cpp:622
void averageDownCoeffs()
Definition: AMReX_MLNodeLaplacian_misc.cpp:17
Vector< std::unique_ptr< MultiFab > > m_nosigma_stencil
Definition: AMReX_MLNodeLaplacian.H:185
void setRZCorrection(bool rz) noexcept
Definition: AMReX_MLNodeLaplacian.H:57
void checkPoint(std::string const &file_name) const final
Definition: AMReX_MLNodeLaplacian.cpp:933
void compDivergence(const Vector< MultiFab * > &rhs, const Vector< MultiFab * > &vel)
Definition: AMReX_MLNodeLaplacian_misc.cpp:962
void fixSolvabilityByOffset(int amrlev, int mglev, MultiFab &rhs, Vector< Real > const &offset) const override
Definition: AMReX_MLNodeLaplacian.cpp:282
void averageDownCoeffsToCoarseAmrLevel(int flev)
Definition: AMReX_MLNodeLaplacian_misc.cpp:86
void unimposeNeumannBC(int amrlev, MultiFab &rhs) const final
Definition: AMReX_MLNodeLaplacian.cpp:145
Vector< Vector< std::unique_ptr< MultiFab > > > m_stencil
Definition: AMReX_MLNodeLaplacian.H:184
void resizeMultiGrid(int new_size) final
Definition: AMReX_MLNodeLaplacian.cpp:121
void setCoarseningStrategy(CoarseningStrategy cs) noexcept
Definition: AMReX_MLNodeLaplacian.H:83
MLNodeLaplacian & operator=(const MLNodeLaplacian &)=delete
void compSyncResidualCoarse(MultiFab &sync_resid, const MultiFab &phi, const MultiFab &vold, const MultiFab *rhcc, const BoxArray &fine_grids, const IntVect &ref_ratio)
Definition: AMReX_MLNodeLaplacian_sync.cpp:16
void averageDownCoeffsSameAmrLevel(int amrlev)
Definition: AMReX_MLNodeLaplacian_misc.cpp:102
Definition: AMReX_MLNodeLinOp.H:16
CoarseningStrategy
Definition: AMReX_MLNodeLinOp.H:19
CoarseningStrategy m_coarsening_strategy
Definition: AMReX_MLNodeLinOp.H:144
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
BottomSolver
Definition: AMReX_MLLinOp.H:30
void Abort(const std::string &msg)
Print out message to cerr and exit via abort().
Definition: AMReX.cpp:225
std::array< T, N > Array
Definition: AMReX_Array.H:24
Definition: AMReX_Array4.H:61
Definition: AMReX_MLLinOp.H:35
Location
Definition: AMReX_MLLinOp.H:87