diff options
author | 2021-07-15 15:39:34 -0700 | |
---|---|---|
committer | 2021-07-15 15:39:34 -0700 | |
commit | 300c1659c4bcdae104f828c01de8873743f73d94 (patch) | |
tree | 5a220db0c8c74c8d5689955a0d095d6c1cd9d057 /Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H | |
parent | 730e9f416363a6f31a19a06c8c0654aa79b928ce (diff) | |
download | WarpX-300c1659c4bcdae104f828c01de8873743f73d94.tar.gz WarpX-300c1659c4bcdae104f828c01de8873743f73d94.tar.zst WarpX-300c1659c4bcdae104f828c01de8873743f73d94.zip |
Spectral Index: Replace `struct`s of `enum` with Class (#2062)
* Add New Spectral Index Class
* Cleaning
* Use New Spectral Index Class in PML
* Cleaning
* Reuse Available Data for divE
* Allocate Rho Data Only when Necessary
* Cleaning
* Fix Bug in RZ Geometry
* Revert Commits for Allocation of Rho Data
* Cleaning
* Update Forward Declaration Header
* Do Not Include Unnecessary Header Files
* Doxygen
* Do Not Use Separate div() Cleaning Flags
* SpectralFieldIndex: Add Missing param to Doxygen
* Remove Unused getRequiredNumberOfFields
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H index f412231b7..4a35871cd 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H @@ -11,6 +11,7 @@ #include "Utils/WarpX_Complex.H" #include "FieldSolver/SpectralSolver/SpectralFieldData_fwd.H" +#include "FieldSolver/SpectralSolver/SpectralFieldData.H" #include <AMReX_BaseFab.H> #include <AMReX_Config.H> @@ -36,7 +37,7 @@ class SpectralBaseAlgorithm public: // Virtual member function ; meant to be overridden in subclasses virtual void pushSpectralFields(SpectralFieldData& f) const = 0; - virtual int getRequiredNumberOfFields() const = 0; + // The destructor should also be a virtual function, so that // a pointer to subclass of `SpectraBaseAlgorithm` actually // calls the subclass's destructor. @@ -92,10 +93,13 @@ class SpectralBaseAlgorithm */ SpectralBaseAlgorithm(const SpectralKSpace& spectral_kspace, const amrex::DistributionMapping& dm, + const SpectralFieldIndex& spectral_index, const int norder_x, const int norder_y, const int norder_z, const bool nodal, const amrex::IntVect& fill_guards); + SpectralFieldIndex m_spectral_index; + // Modified finite-order vectors KVectorComponent modified_kx_vec; #if (AMREX_SPACEDIM==3) |