From 76ebee96eeabd7336c49c1250e255db59ec0d971 Mon Sep 17 00:00:00 2001 From: Michael E Rowan <38045958+mrowan137@users.noreply.github.com> Date: Tue, 16 Mar 2021 11:35:07 -0700 Subject: Add timers in routines that depend on cell-related work (#1692) * Add timers * eol * AtomicAdd * lev argument for getCosts * style * style * wip * eol * .ipynb * passing down lev * eol * passing lev * eol * Update Source/Particles/Collision/PairWiseCoulombCollision.cpp Co-authored-by: Axel Huebl * Add for QED and ionization routines * eol * remove unneeded * mfi-->pti * move cost * eol Co-authored-by: Axel Huebl --- .../SpectralAlgorithms/ComovingPsatdAlgorithm.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms/ComovingPsatdAlgorithm.cpp') diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/ComovingPsatdAlgorithm.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/ComovingPsatdAlgorithm.cpp index ca82d5a8c..96b993dcf 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/ComovingPsatdAlgorithm.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/ComovingPsatdAlgorithm.cpp @@ -391,7 +391,8 @@ void ComovingPsatdAlgorithm::InitializeSpectralCoefficients (const SpectralKSpac } void -ComovingPsatdAlgorithm::CurrentCorrection (SpectralFieldData& field_data, +ComovingPsatdAlgorithm::CurrentCorrection (const int lev, + SpectralFieldData& field_data, std::array,3>& current, const std::unique_ptr& rho) { @@ -401,11 +402,11 @@ ComovingPsatdAlgorithm::CurrentCorrection (SpectralFieldData& field_data, using Idx = SpectralFieldIndex; // Forward Fourier transform of J and rho - field_data.ForwardTransform(*current[0], Idx::Jx, 0); - field_data.ForwardTransform(*current[1], Idx::Jy, 0); - field_data.ForwardTransform(*current[2], Idx::Jz, 0); - field_data.ForwardTransform(*rho, Idx::rho_old, 0); - field_data.ForwardTransform(*rho, Idx::rho_new, 1); + 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); // Loop over boxes for (amrex::MFIter mfi(field_data.fields); mfi.isValid(); ++mfi){ @@ -487,13 +488,14 @@ ComovingPsatdAlgorithm::CurrentCorrection (SpectralFieldData& field_data, } // Backward Fourier transform of J - field_data.BackwardTransform(*current[0], Idx::Jx, 0); - field_data.BackwardTransform(*current[1], Idx::Jy, 0); - field_data.BackwardTransform(*current[2], Idx::Jz, 0); + field_data.BackwardTransform(lev, *current[0], Idx::Jx, 0); + field_data.BackwardTransform(lev, *current[1], Idx::Jy, 0); + field_data.BackwardTransform(lev, *current[2], Idx::Jz, 0); } void -ComovingPsatdAlgorithm::VayDeposition (SpectralFieldData& /*field_data*/, +ComovingPsatdAlgorithm::VayDeposition (const int /*lev*/, + SpectralFieldData& /*field_data*/, std::array,3>& /*current*/) { amrex::Abort("Vay deposition not implemented for comoving PSATD"); -- cgit v1.2.3