From e303439fccf613302780e3e669fa4ac581817529 Mon Sep 17 00:00:00 2001 From: David Grote Date: Fri, 22 May 2020 10:06:39 -0700 Subject: Added stub for current correction in RZ spectral solver (#1007) * Added stub for current correction in RZ spectral solver * Fixed comments in RZ spectral for current correction stub * Modified automated test for Galilean PSATD (#1033) Co-authored-by: Olga Shapoval <30510597+oshapoval@users.noreply.github.com> --- .../SpectralAlgorithms/SpectralBaseAlgorithmRZ.H | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (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 aae17f387..ea50e979a 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithmRZ.H +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithmRZ.H @@ -28,6 +28,22 @@ class SpectralBaseAlgorithmRZ // calls the subclass's destructor. virtual ~SpectralBaseAlgorithmRZ() {}; + /** + * \brief Virtual function for current correction in Fourier space + * (equation (19) of https://doi.org/10.1016/j.jcp.2013.03.010). + * This virtual function is not pure: it can be overridden in derived + * classes (e.g. PsatdAlgorithmRZ), but a base-class + * implementation is provided (empty implementation in this case). + * + * \param[in,out] field_data all fields in Fourier space + * \param[in,out] current two-dimensional array of unique pointers to MultiFab + * storing the three components of the current density + * \param[in] rho unique pointer to MultiFab storing the charge density + */ + virtual void CurrentCorrection ( SpectralFieldDataRZ& field_data, + std::array,3>& current, + const std::unique_ptr& rho ) {}; + /** * \brief Compute spectral divergence of E */ -- cgit v1.2.3