|
WarpX
|
This is a wrapper class around a Vector 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. 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 () | |
| bool | IsDefined () const |
| void | Define (WarpX *a_WarpX, const std::string &a_vector_type_name, const std::string &a_scalar_type_name="none") |
| void | Define (const WarpXSolverVec &a_solver_vec) |
| RT | dotProduct (const WarpXSolverVec &a_X) const |
| void | Copy (FieldType a_array_type, FieldType a_scalar_type=FieldType::None, bool allow_type_mismatch=false) |
| void | Copy (const WarpXSolverVec &a_solver_vec) |
| WarpXSolverVec & | operator= (const WarpXSolverVec &a_solver_vec)=delete |
| WarpXSolverVec (WarpXSolverVec &&) noexcept=default | |
| WarpXSolverVec & | operator= (WarpXSolverVec &&a_solver_vec) noexcept |
| void | operator+= (const WarpXSolverVec &a_solver_vec) |
| void | operator-= (const WarpXSolverVec &a_solver_vec) |
| void | linComb (const RT a, const WarpXSolverVec &X, const RT b, const WarpXSolverVec &Y) |
| Y = a*X + b*Y. | |
| void | increment (const WarpXSolverVec &X, const RT a) |
| Increment Y by a*X (Y += a*X) | |
| void | scale (RT a_a) |
| Scale Y by a (Y *= a) | |
| void | zero () |
| void | setVal (const RT a_val) |
| void | assertIsDefined (const WarpXSolverVec &a_solver_vec) const |
| void | assertSameType (const WarpXSolverVec &a_solver_vec) const |
| RT | norm2 () const |
| const ablastr::fields::MultiLevelVectorField & | getArrayVec () const |
| ablastr::fields::MultiLevelVectorField & | getArrayVec () |
| const ablastr::fields::MultiLevelScalarField & | getScalarVec () const |
| ablastr::fields::MultiLevelScalarField & | getScalarVec () |
| warpx::fields::FieldType | getArrayVecType () const |
| warpx::fields::FieldType | getScalarVecType () const |
| std::string | getVectorType () const |
| std::string | getScalarType () const |
| amrex::Long | nDOF_local () const |
| amrex::Long | nDOF_global () const |
| void | copyFrom (const amrex::Real *const) |
| void | copyTo (amrex::Real *const) const |
| auto | getWarpX () const |
| auto | numAMRLevels () const |
| const auto & | getDOFsObject () const |
Private Attributes | |
| bool | m_is_defined = false |
| ablastr::fields::MultiLevelVectorField | m_array_vec |
| ablastr::fields::MultiLevelScalarField | m_scalar_vec |
| warpx::fields::FieldType | m_array_type = warpx::fields::FieldType::None |
| warpx::fields::FieldType | m_scalar_type = warpx::fields::FieldType::None |
| std::string | m_vector_type_name = "none" |
| std::string | m_scalar_type_name = "none" |
| int | m_num_amr_levels = 1 |
Static Private Attributes | |
| static constexpr int | m_ncomp = 1 |
| static bool | m_warpx_ptr_defined = false |
| static WarpX * | m_WarpX = nullptr |
| static std::unique_ptr< WarpXSolverDOF > | m_dofs = nullptr |
This is a wrapper class around a Vector 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.
A WarpXSolverVec can consist of an array size 3 of MultiFabs (for vector fields such as E, B, and A) or of a single MultiFab for scalar fields. Both the array size 3 and scalar fields must be of type warpx::fields::FieldType. Additionally, a WarpXSolverVec can in general contain both an array size 3 field and a scalar field. For example, the array size 3 field can be used for the vector potential A and the scalar field can be used for the scalar potential phi, which is the full state of unknowns for a Darwin electromagnetic model.
| using WarpXSolverVec::RT = value_type |
| using WarpXSolverVec::value_type = amrex::Real |
|
default |
|
delete |
| WarpXSolverVec::~WarpXSolverVec | ( | ) |
|
defaultnoexcept |
|
inline |
|
inline |
|
inline |
| void WarpXSolverVec::Copy | ( | FieldType | a_array_type, |
| FieldType | a_scalar_type = FieldType::None, | ||
| bool | allow_type_mismatch = false ) |
| void WarpXSolverVec::copyFrom | ( | const amrex::Real * const | a_arr | ) |
| void WarpXSolverVec::copyTo | ( | amrex::Real * const | a_arr | ) | const |
|
inline |
| void WarpXSolverVec::Define | ( | WarpX * | a_WarpX, |
| const std::string & | a_vector_type_name, | ||
| const std::string & | a_scalar_type_name = "none" ) |
|
nodiscard |
|
inline |
|
inlinenodiscard |
|
inlinenodiscard |
|
inline |
|
inlinenodiscard |
|
inline |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inline |
Increment Y by a*X (Y += a*X)
|
inlinenodiscard |
|
inline |
Y = a*X + b*Y.
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inline |
|
inline |
|
delete |
|
inlinenoexcept |
|
inline |
Scale Y by a (Y *= a)
|
inline |
|
inline |
|
private |
|
private |
|
staticprivate |
|
private |
|
staticconstexprprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inlinestaticprivate |
|
inlinestaticprivate |