7 #ifndef WarpXSolverVec_H_
8 #define WarpXSolverVec_H_
67 "WarpXSolverVec::Define(a_vec) called with undefined a_vec");
76 "WarpXSolverVec::Define() called on undefined WarpXSolverVec");
79 for (
int n=0; n<3; n++) {
91 void Copy (
const amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > >& a_solver_vec )
95 "WarpXSolverVec::Copy() called on undefined WarpXSolverVec");
97 for (
int n = 0; n < 3; ++n) {
108 "WarpXSolverVec::Copy(a_vec) called with undefined a_vec");
121 if (
this != &a_vec) {
132 for (
int n=0; n<3; n++) {
142 for (
int n=0; n<3; n++) {
155 for (
int n=0; n<3; n++) {
169 for (
int n=0; n<3; n++) {
183 for (
int n=0; n<3; n++) {
197 "WarpXSolverVec::ones() called on undefined WarpXSolverVec");
199 for (
int n=0; n<3; n++) {
208 return std::sqrt(
norm);
#define AMREX_ASSERT_WITH_MESSAGE(EX, MSG)
#define WARPX_ALWAYS_ASSERT_WITH_MESSAGE(EX, MSG)
Definition: TextMsg.H:13
This is a wrapper class around a Vector of array of pointers to MultiFabs that contains basic math op...
Definition: WarpXSolverVec.H:48
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > m_field_vec
Definition: WarpXSolverVec.H:223
static amrex::Vector< std::array< std::unique_ptr< amrex::iMultiFab >, 3 > > m_dotMask
Definition: WarpXSolverVec.H:229
WarpXSolverVec(WarpXSolverVec &&) noexcept=default
bool m_is_defined
Definition: WarpXSolverVec.H:222
void operator+=(const WarpXSolverVec &a_vec)
Definition: WarpXSolverVec.H:129
amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > & getVec()
Definition: WarpXSolverVec.H:212
static void clearDotMask()
Definition: WarpXSolverVec.H:218
const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > & getVec() const
Definition: WarpXSolverVec.H:211
static constexpr int m_num_amr_levels
Definition: WarpXSolverVec.H:226
static constexpr int m_ncomp
Definition: WarpXSolverVec.H:225
void SetDotMask(const amrex::Vector< amrex::Geometry > &a_Geom)
Definition: WarpXSolverVec.cpp:9
void Define(const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > &a_solver_vec)
Definition: WarpXSolverVec.H:72
value_type RT
Definition: WarpXSolverVec.H:58
void linComb(const RT a, const WarpXSolverVec &X, const RT b, const WarpXSolverVec &Y)
Y = a*X + b*Y.
Definition: WarpXSolverVec.H:152
void scale(RT a_a)
Scale Y by a (Y *= a)
Definition: WarpXSolverVec.H:180
bool IsDefined() const
Definition: WarpXSolverVec.H:60
void zero()
Definition: WarpXSolverVec.H:190
void Copy(const WarpXSolverVec &a_vec)
Definition: WarpXSolverVec.H:104
void Define(const WarpXSolverVec &a_vec)
Definition: WarpXSolverVec.H:63
RT dotProduct(const WarpXSolverVec &a_X) const
Definition: WarpXSolverVec.cpp:32
void Copy(const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > &a_solver_vec)
Definition: WarpXSolverVec.H:91
~WarpXSolverVec()=default
amrex::Real value_type
Definition: WarpXSolverVec.H:57
WarpXSolverVec & operator=(const WarpXSolverVec &a_vec)=delete
void setVal(const RT a_val)
Definition: WarpXSolverVec.H:193
void operator-=(const WarpXSolverVec &a_vec)
Definition: WarpXSolverVec.H:139
void increment(const WarpXSolverVec &X, const RT a)
Increment Y by a*X (Y += a*X)
Definition: WarpXSolverVec.H:166
RT norm2() const
Definition: WarpXSolverVec.H:205
static bool m_dot_mask_defined
Definition: WarpXSolverVec.H:228
WarpXSolverVec(const WarpXSolverVec &)=delete
const BoxArray & boxArray() const noexcept
const DistributionMapping & DistributionMap() const noexcept
int nComp() const noexcept
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVectND< dim > TheZeroVector() noexcept
static void LinComb(MultiFab &dst, Real a, const MultiFab &x, int xcomp, Real b, const MultiFab &y, int ycomp, int dstcomp, int numcomp, int nghost)
static void Saxpy(MultiFab &dst, Real a, const MultiFab &src, int srccomp, int dstcomp, int numcomp, int nghost)
static void Copy(MultiFab &dst, const MultiFab &src, int srccomp, int dstcomp, int numcomp, int nghost)
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T norm(const GpuComplex< T > &a_z) noexcept
default
Definition: run_alltests.py:113