From 300c1659c4bcdae104f828c01de8873743f73d94 Mon Sep 17 00:00:00 2001 From: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Date: Thu, 15 Jul 2021 15:39:34 -0700 Subject: 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 --- .../SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithmRZ.H | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithmRZ.H') diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithmRZ.H b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithmRZ.H index 51bba5b87..a494a3291 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithmRZ.H +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithmRZ.H @@ -22,7 +22,7 @@ class SpectralBaseAlgorithmRZ public: // Virtual member function ; meant to be overridden in subclasses virtual void pushSpectralFields(SpectralFieldDataRZ & f) = 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. @@ -71,11 +71,15 @@ class SpectralBaseAlgorithmRZ // Constructor SpectralBaseAlgorithmRZ(SpectralKSpaceRZ const & spectral_kspace, amrex::DistributionMapping const & dm, + const SpectralFieldIndex& spectral_index, int const norder_z, bool const nodal) // Compute and assign the modified k vectors - : modified_kz_vec(spectral_kspace.getModifiedKComponent(dm, 1, norder_z, nodal)) + : m_spectral_index(spectral_index), + modified_kz_vec(spectral_kspace.getModifiedKComponent(dm, 1, norder_z, nodal)) {} + SpectralFieldIndex m_spectral_index; + // Modified finite-order vectors KVectorComponent modified_kz_vec; }; -- cgit v1.2.3