From ebde54faa8bcae2f1b37b81270a8d0a64bf58a98 Mon Sep 17 00:00:00 2001 From: Remi Lehe Date: Thu, 10 Sep 2020 13:36:50 -0700 Subject: SpectralSolverRZ.H: Move Implementations to Source File (#1290) * Moved routines from SpectralSolverRZ.H to .cpp * Correct missing Vay deposition routine * Apply suggestions from code review Co-authored-by: Axel Huebl * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Dave Grote Co-authored-by: Axel Huebl Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> --- .../SpectralSolver/SpectralSolverRZ.cpp | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) (limited to 'Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp') diff --git a/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp b/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp index 60e981181..9074d689d 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralSolverRZ.cpp @@ -7,6 +7,8 @@ #include "SpectralKSpaceRZ.H" #include "SpectralSolverRZ.H" #include "SpectralAlgorithms/PsatdAlgorithmRZ.H" +#include "WarpX.H" +#include "Utils/WarpXProfilerWrapper.H" /* \brief Initialize the spectral Maxwell solver * @@ -50,3 +52,63 @@ SpectralSolverRZ::SpectralSolverRZ(amrex::BoxArray const & realspace_ba, n_rz_azimuthal_modes, lev); }; + + +void +SpectralSolverRZ::ForwardTransform (amrex::MultiFab const & field_mf, + int const field_index, + int const i_comp) { + WARPX_PROFILE("SpectralSolverRZ::ForwardTransform"); + field_data.ForwardTransform(field_mf, field_index, i_comp); +} + +void +SpectralSolverRZ::ForwardTransform (amrex::MultiFab const & field_mf1, int const field_index1, + amrex::MultiFab const & field_mf2, int const field_index2) { + WARPX_PROFILE("SpectralSolverRZ::ForwardTransform"); + field_data.ForwardTransform(field_mf1, field_index1, + field_mf2, field_index2); +} + +void +SpectralSolverRZ::BackwardTransform (amrex::MultiFab& field_mf, + int const field_index, + int const i_comp) { + WARPX_PROFILE("SpectralSolverRZ::BackwardTransform"); + field_data.BackwardTransform(field_mf, field_index, i_comp); +} + +void +SpectralSolverRZ::BackwardTransform (amrex::MultiFab& field_mf1, int const field_index1, + amrex::MultiFab& field_mf2, int const field_index2) { + WARPX_PROFILE("SpectralSolverRZ::BackwardTransform"); + field_data.BackwardTransform(field_mf1, field_index1, + field_mf2, field_index2); +} + +void +SpectralSolverRZ::pushSpectralFields () { + WARPX_PROFILE("SpectralSolverRZ::pushSpectralFields"); + // Virtual function: the actual function used here depends + // on the sub-class of `SpectralBaseAlgorithm` that was + // initialized in the constructor of `SpectralSolverRZ` + algorithm->pushSpectralFields(field_data); +} + +void +SpectralSolverRZ::ComputeSpectralDivE (const std::array,3>& Efield, + amrex::MultiFab& divE) { + algorithm->ComputeSpectralDivE(field_data, Efield, divE); +} + +void +SpectralSolverRZ::CurrentCorrection (std::array,3>& current, + const std::unique_ptr& rho) { + algorithm->CurrentCorrection(field_data, current, rho); +} + +void +SpectralSolverRZ::VayDeposition (std::array,3>& current) +{ + algorithm->VayDeposition(field_data, current); +} -- cgit v1.2.3