|
WarpX
|
This is a wrapper class around a Vector of array of pointers to MultiFabs that contains basic math operators and functionality needed to interact with nonlinear solvers in WarpX and linear solvers in AMReX, such as GMRES. More...
#include <WarpXSolverVec.H>
Public Types | |
| using | value_type = amrex::Real |
| using | RT = value_type |
Public Member Functions | |
| WarpXSolverVec ()=default | |
| WarpXSolverVec (const WarpXSolverVec &)=delete | |
| ~WarpXSolverVec ()=default | |
| bool | IsDefined () const |
| void | Define (const WarpXSolverVec &a_vec) |
| void | Define (const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > &a_solver_vec) |
| void | SetDotMask (const amrex::Vector< amrex::Geometry > &a_Geom) |
| RT | dotProduct (const WarpXSolverVec &a_X) const |
| void | Copy (const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > &a_solver_vec) |
| void | Copy (const WarpXSolverVec &a_vec) |
| WarpXSolverVec & | operator= (const WarpXSolverVec &a_vec)=delete |
| WarpXSolverVec (WarpXSolverVec &&) noexcept=default | |
| WarpXSolverVec & | operator= (WarpXSolverVec &&a_vec) noexcept |
| void | operator+= (const WarpXSolverVec &a_vec) |
| void | operator-= (const WarpXSolverVec &a_vec) |
| void | linComb (const RT a, const WarpXSolverVec &X, const RT b, const WarpXSolverVec &Y) |
| Y = a*X + b*Y. More... | |
| void | increment (const WarpXSolverVec &X, const RT a) |
| Increment Y by a*X (Y += a*X) More... | |
| void | scale (RT a_a) |
| Scale Y by a (Y *= a) More... | |
| void | zero () |
| void | setVal (const RT a_val) |
| RT | norm2 () const |
| const amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > & | getVec () const |
| amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > & | getVec () |
Static Public Member Functions | |
| static void | clearDotMask () |
Private Attributes | |
| bool | m_is_defined = false |
| amrex::Vector< std::array< std::unique_ptr< amrex::MultiFab >, 3 > > | m_field_vec |
Static Private Attributes | |
| static constexpr int | m_ncomp = 1 |
| static constexpr int | m_num_amr_levels = 1 |
| static bool | m_dot_mask_defined = false |
| static amrex::Vector< std::array< std::unique_ptr< amrex::iMultiFab >, 3 > > | m_dotMask |
This is a wrapper class around a Vector of array of pointers to MultiFabs that contains basic math operators and functionality needed to interact with nonlinear solvers in WarpX and linear solvers in AMReX, such as GMRES.
The size of the Vector is the number of amr levels. Hardcoded for 1 right now. The size of the array is the number of MultiFabs. It is hardcoded for 3 right now as it is only used for the electric field in the implicit electromagnetic time solvers. In the future, the array size can be made a template parameter so that this class can be used for other solver vectors, such as electrostatic (array size 1) or Darwin (array size 4).
| using WarpXSolverVec::RT = value_type |
| using WarpXSolverVec::value_type = amrex::Real |
|
default |
|
delete |
|
default |
|
defaultnoexcept |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
| amrex::Real WarpXSolverVec::dotProduct | ( | const WarpXSolverVec & | a_X | ) | const |
|
inline |
|
inline |
|
inline |
Increment Y by a*X (Y += a*X)
|
inline |
|
inline |
Y = a*X + b*Y.
|
inline |
|
inline |
|
inline |
|
delete |
|
inlinenoexcept |
|
inline |
Scale Y by a (Y *= a)
| void WarpXSolverVec::SetDotMask | ( | const amrex::Vector< amrex::Geometry > & | a_Geom | ) |
|
inline |
|
inline |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
private |
|
private |
|
staticconstexprprivate |
|
staticconstexprprivate |