aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp
diff options
context:
space:
mode:
authorGravatar David Grote <grote1@llnl.gov> 2020-05-22 11:14:15 -0700
committerGravatar GitHub <noreply@github.com> 2020-05-22 11:14:15 -0700
commit80901aa5075c49e26b3f79f747a949665fd7c2e5 (patch)
tree78a5250e529303fa25e9e542fd14771785221191 /Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp
parente303439fccf613302780e3e669fa4ac581817529 (diff)
downloadWarpX-80901aa5075c49e26b3f79f747a949665fd7c2e5.tar.gz
WarpX-80901aa5075c49e26b3f79f747a949665fd7c2e5.tar.zst
WarpX-80901aa5075c49e26b3f79f747a949665fd7c2e5.zip
Fix DivE diagnostic in RZ (#1034)
* Added dump_rz_modes to picmi field diagnostic * Fixed DivEFunctor for RZ * In Diagnostics, write out RZ components of divE if requested * Fix RZ component names in diagnostic files * Fixed RZ spectral back transform, fixing DivE calculation * In SpectralSolverRZ.H changed BL_PROFILE to WARPX_PROFILE * Undid change of BL_PROFILE to WARPX_PROFILE in SpectralSolverRZ.H
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp b/Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp
index 4a66d924a..65d121cd3 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp
@@ -376,6 +376,10 @@ SpectralFieldDataRZ::BackwardTransform (amrex::MultiFab& field_mf, int const fie
// A full multifab is created so that each GPU stream has its own temp space.
amrex::MultiFab tempHTransformedSplit(tempHTransformed.boxArray(), tempHTransformed.DistributionMap(), 2*n_rz_azimuthal_modes, 0);
+ // Create a temporary to hold the inverse Hankel transform field.
+ // This allows the final result to have a different shape than the transformed field.
+ amrex::MultiFab field_mf_copy(tempHTransformed.boxArray(), tempHTransformed.DistributionMap(), 2*n_rz_azimuthal_modes, 0);
+
// Loop over boxes.
for (amrex::MFIter mfi(field_mf); mfi.isValid(); ++mfi){
@@ -385,8 +389,9 @@ SpectralFieldDataRZ::BackwardTransform (amrex::MultiFab& field_mf, int const fie
// tempHTransformedSplit includes the imaginary component of mode 0.
// field_mf does not.
amrex::Box const& realspace_bx = tempHTransformed[mfi].box();
- amrex::FArrayBox field_comp(field_mf[mfi], amrex::make_alias, i_comp*ncomp, ncomp);
+ amrex::FArrayBox field_comp(field_mf_copy[mfi], amrex::make_alias, i_comp*ncomp, ncomp);
multi_spectral_hankel_transformer[mfi].SpectralToPhysical_Scalar(realspace_bx, tempHTransformedSplit[mfi], field_comp);
+ field_mf[mfi].copy(field_comp, 0, i_comp*ncomp, ncomp);
}
}