From 19c51c7c979962fcfc1dc8d03ff04cd233593bf7 Mon Sep 17 00:00:00 2001 From: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Date: Wed, 16 Feb 2022 19:01:36 -0800 Subject: Refactor Current Correction Functions (#2839) * Refactor Current Correction Functions * Clean Up, Reset Benchmark --- .../SpectralAlgorithms/PsatdAlgorithm.cpp | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp') diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp index 0515aa598..52813cb13 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp @@ -732,27 +732,13 @@ void PsatdAlgorithm::InitializeSpectralCoefficientsAveraging ( } } -void -PsatdAlgorithm::CurrentCorrection ( - const int lev, - SpectralFieldData& field_data, - std::array,3>& current, - const std::unique_ptr& rho) +void PsatdAlgorithm::CurrentCorrection (SpectralFieldData& field_data) { // Profiling BL_PROFILE("PsatdAlgorithm::CurrentCorrection"); const SpectralFieldIndex& Idx = m_spectral_index; - // Forward Fourier transform of J and rho - field_data.ForwardTransform(lev, *current[0], Idx.Jx, 0); - field_data.ForwardTransform(lev, *current[1], Idx.Jy, 0); - field_data.ForwardTransform(lev, *current[2], Idx.Jz, 0); - field_data.ForwardTransform(lev, *rho, Idx.rho_old, 0); - field_data.ForwardTransform(lev, *rho, Idx.rho_new, 1); - - const amrex::IntVect& fill_guards = m_fill_guards; - // Loop over boxes for (amrex::MFIter mfi(field_data.fields); mfi.isValid(); ++mfi){ @@ -843,11 +829,6 @@ PsatdAlgorithm::CurrentCorrection ( } }); } - - // Backward Fourier transform of J - field_data.BackwardTransform(lev, *current[0], Idx.Jx, 0, fill_guards); - field_data.BackwardTransform(lev, *current[1], Idx.Jy, 0, fill_guards); - field_data.BackwardTransform(lev, *current[2], Idx.Jz, 0, fill_guards); } void -- cgit v1.2.3