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/PsatdAlgorithm.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/PsatdAlgorithm.H')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.H | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.H b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.H index a53319327..f7cd06edf 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.H +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.H @@ -33,6 +33,7 @@ class PsatdAlgorithm : public SpectralBaseAlgorithm * * \param[in] spectral_kspace spectral space * \param[in] dm distribution mapping + * \param[in] spectral_index object containing indices to access data in spectral space * \param[in] norder_x order of the spectral solver along x * \param[in] norder_y order of the spectral solver along y * \param[in] norder_z order of the spectral solver along z @@ -47,6 +48,7 @@ class PsatdAlgorithm : public SpectralBaseAlgorithm PsatdAlgorithm ( const SpectralKSpace& spectral_kspace, const amrex::DistributionMapping& dm, + const SpectralFieldIndex& spectral_index, const int norder_x, const int norder_y, const int norder_z, @@ -66,28 +68,6 @@ class PsatdAlgorithm : public SpectralBaseAlgorithm virtual void pushSpectralFields (SpectralFieldData& f) const override final; /** - * \brief Returns the number of fields stored in spectral space - */ - virtual int getRequiredNumberOfFields () const override final - { - if (m_J_linear_in_time) - { - return SpectralFieldIndexJLinearInTime::n_fields; - } - else - { - if (m_time_averaging) - { - return SpectralFieldIndexTimeAveraging::n_fields; - } - else - { - return SpectralFieldIndex::n_fields; - } - } - } - - /** * \brief Initializes the coefficients used in \c pushSpectralFields to update the E and B fields * * \param[in] spectral_kspace spectral space @@ -170,6 +150,8 @@ class PsatdAlgorithm : public SpectralBaseAlgorithm // These real and complex coefficients are allocated only with averaged Galilean PSATD SpectralComplexCoefficients Psi1_coef, Psi2_coef, Y1_coef, Y2_coef, Y3_coef, Y4_coef; + SpectralFieldIndex m_spectral_index; + // Centered modified finite-order k vectors KVectorComponent modified_kx_vec_centered; #if (AMREX_SPACEDIM==3) |