1 #ifndef AMREX_ML_CURL_CURL_H_
2 #define AMREX_ML_CURL_CURL_H_
3 #include <AMReX_Config.H>
25 :
public MLLinOpT<Array<MultiFab,3> >
57 [[nodiscard]] std::string
name ()
const override {
58 return std::string(
"curl of curl");
64 const MF* robinbc_a =
nullptr,
65 const MF* robinbc_b =
nullptr,
66 const MF* robinbc_f =
nullptr)
override;
75 void smooth (
int amrlev,
int mglev,
MF& sol,
const MF& rhs,
76 bool skip_fillboundary=
false)
const override;
79 const MF* crse_bcdata=
nullptr)
override;
83 const MF* crse_bcdata=
nullptr)
override;
87 [[nodiscard]]
bool isSingular (
int )
const override {
return false; }
90 RT xdoty (
int amrlev,
int mglev,
const MF& x,
const MF& y,
bool local)
const override;
92 [[nodiscard]]
RT normInf (
int amrlev,
MF const& mf,
bool local)
const override;
102 [[nodiscard]]
MF make (
int amrlev,
int mglev,
IntVect const& ng)
const override;
112 #if (AMREX_SPACEDIM > 1)
113 void smooth4 (
int amrlev,
int mglev,
MF& sol,
MF const& rhs,
int color)
const;
115 void smooth1D (
int amrlev,
int mglev,
MF& sol,
MF const& rhs,
int color)
const;
118 void compresid (
int amrlev,
int mglev,
MF& resid,
MF const& b)
const;
135 #if (AMREX_SPACEDIM == 3)
137 #elif (AMREX_SPACEDIM == 2)
Array4< Real > fine
Definition: AMReX_InterpFaceRegister.cpp:90
Array4< Real const > crse
Definition: AMReX_InterpFaceRegister.cpp:92
Definition: AMReX_LUSolver.H:16
curl (alpha curl E) + beta E = rhs
Definition: AMReX_MLCurlCurl.H:26
void setLevelBC(int amrlev, const MF *levelbcdata, const MF *robinbc_a=nullptr, const MF *robinbc_b=nullptr, const MF *robinbc_f=nullptr) override
Definition: AMReX_MLCurlCurl.cpp:164
void applyBC(int amrlev, int mglev, MF &in, CurlCurlStateType type) const
Definition: AMReX_MLCurlCurl.cpp:699
void smooth(int amrlev, int mglev, MF &sol, const MF &rhs, bool skip_fillboundary=false) const override
Definition: AMReX_MLCurlCurl.cpp:321
void restriction(int amrlev, int cmglev, MF &crse, MF &fine) const override
Definition: AMReX_MLCurlCurl.cpp:171
Vector< Vector< std::unique_ptr< Gpu::DeviceScalar< LUSolver< AMREX_SPACEDIM *2, RT > > > > > m_lusolver
Definition: AMReX_MLCurlCurl.H:146
void setDirichletNodesToZero(int amrlev, int mglev, MF &a_mf) const override
Definition: AMReX_MLCurlCurl.cpp:112
void interpolation(int amrlev, int fmglev, MF &fine, const MF &crse) const override
Definition: AMReX_MLCurlCurl.cpp:204
bool isSingular(int) const override
Is it singular on given AMR level?
Definition: AMReX_MLCurlCurl.H:87
CurlCurlSymmetryInfo getSymmetryInfo(int amrlev, int mglev) const
Definition: AMReX_MLCurlCurl.cpp:903
CurlCurlDirichletInfo getDirichletInfo(int amrlev, int mglev) const
Definition: AMReX_MLCurlCurl.cpp:865
typename MLLinOpT< MF >::BCType BCType
Definition: AMReX_MLCurlCurl.H:30
typename MLLinOpT< MF >::RT RT
Definition: AMReX_MLCurlCurl.H:29
RT normInf(int amrlev, MF const &mf, bool local) const override
Definition: AMReX_MLCurlCurl.cpp:625
void prepareForSolve() override
Definition: AMReX_MLCurlCurl.cpp:521
Vector< Vector< Array< std::unique_ptr< iMultiFab >, 3 > > > m_dotmask
Definition: AMReX_MLCurlCurl.H:143
Vector< Vector< Array< std::unique_ptr< MultiFab >, 3 > > > m_bcoefs
Definition: AMReX_MLCurlCurl.H:147
void averageDownAndSync(Vector< MF > &sol) const override
Definition: AMReX_MLCurlCurl.cpp:630
void solutionResidual(int amrlev, MF &resid, MF &x, const MF &b, const MF *crse_bcdata=nullptr) override
Definition: AMReX_MLCurlCurl.cpp:457
void setScalars(RT a_alpha, RT a_beta) noexcept
Definition: AMReX_MLCurlCurl.cpp:36
void make(Vector< Vector< MF > > &mf, IntVect const &ng) const override
Definition: AMReX_MLCurlCurl.cpp:642
RT m_beta
Definition: AMReX_MLCurlCurl.H:132
IntVect getNGrowVectRestriction() const override
Definition: AMReX_MLCurlCurl.H:96
static constexpr int m_ncomp
Definition: AMReX_MLCurlCurl.H:144
RT m_alpha
Definition: AMReX_MLCurlCurl.H:131
void smooth1D(int amrlev, int mglev, MF &sol, MF const &rhs, int color) const
Definition: AMReX_MLCurlCurl.cpp:348
bool m_use_pcg
Definition: AMReX_MLCurlCurl.H:148
std::string name() const override
Definition: AMReX_MLCurlCurl.H:57
iMultiFab const & getDotMask(int amrlev, int mglev, int idim) const
Definition: AMReX_MLCurlCurl.cpp:854
void define(const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo())
Definition: AMReX_MLCurlCurl.cpp:13
typename MLLinOpT< MF >::Location Location
Definition: AMReX_MLCurlCurl.H:33
void correctionResidual(int amrlev, int mglev, MF &resid, MF &x, const MF &b, BCMode bc_mode, const MF *crse_bcdata=nullptr) override
Definition: AMReX_MLCurlCurl.cpp:466
typename MLLinOpT< MF >::StateMode StateMode
Definition: AMReX_MLCurlCurl.H:32
void compresid(int amrlev, int mglev, MF &resid, MF const &b) const
Definition: AMReX_MLCurlCurl.cpp:475
void apply(int amrlev, int mglev, MF &out, MF &in, BCMode bc_mode, StateMode s_mode, const MLMGBndryT< MF > *bndry=nullptr) const override
Definition: AMReX_MLCurlCurl.cpp:235
MF makeAlias(MF const &mf) const override
Definition: AMReX_MLCurlCurl.cpp:660
RT xdoty(int amrlev, int mglev, const MF &x, const MF &y, bool local) const override
Definition: AMReX_MLCurlCurl.cpp:610
bool setUsePCG(bool flag)
Definition: AMReX_MLCurlCurl.H:61
MF makeCoarseMG(int amrlev, int mglev, IntVect const &ng) const override
Definition: AMReX_MLCurlCurl.cpp:670
typename MLLinOpT< MF >::BCMode BCMode
Definition: AMReX_MLCurlCurl.H:31
void prepareRHS(Vector< MF * > const &rhs) const
Definition: AMReX_MLCurlCurl.cpp:103
Array< MultiFab, 3 > MF
Definition: AMReX_MLCurlCurl.H:28
void applyPhysBC(int amrlev, int mglev, MultiFab &mf, CurlCurlStateType type) const
Definition: AMReX_MLCurlCurl.cpp:721
void setBeta(const Vector< Array< MultiFab const *, 3 >> &a_bcoefs)
This is needed only if there is variable beta coefficient.
Definition: AMReX_MLCurlCurl.cpp:43
Array< IntVect, 3 > m_etype
Definition: AMReX_MLCurlCurl.H:140
MF makeCoarseAmr(int famrlev, IntVect const &ng) const override
Definition: AMReX_MLCurlCurl.cpp:685
bool isBottomSingular() const override
Is the bottom of MG singular?
Definition: AMReX_MLCurlCurl.H:88
Definition: AMReX_MLLinOp.H:98
LinOpBCType BCType
Definition: AMReX_MLLinOp.H:111
typename FabDataType< MF >::value_type RT
Definition: AMReX_MLLinOp.H:109
Definition: AMReX_MLMGBndry.H:12
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
CurlCurlStateType
Definition: AMReX_MLCurlCurl_K.H:326
IntVectND< AMREX_SPACEDIM > IntVect
Definition: AMReX_BaseFwd.H:30
std::array< T, N > Array
Definition: AMReX_Array.H:24
Definition: AMReX_MLCurlCurl_K.H:185
Definition: AMReX_MLCurlCurl_K.H:259
Definition: AMReX_GpuMemory.H:56
Definition: AMReX_MLLinOp.H:35
StateMode
Definition: AMReX_MLLinOp.H:86
BCMode
Definition: AMReX_MLLinOp.H:85
Location
Definition: AMReX_MLLinOp.H:87