From 1ed58acbee55bfa93918e89d7dd618177fb314e8 Mon Sep 17 00:00:00 2001 From: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Date: Fri, 12 Aug 2022 14:04:54 -0700 Subject: Fill Guard Cells of Fields and Currents Independently (#3302) * Fill Guard Cells of Fields and Currents Independently * Fill Guard Cells of Averaged Fields as Regular Fields --- .../SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.cpp') diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.cpp index 4ecbb9000..1a2334cc6 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.cpp @@ -31,9 +31,7 @@ SpectralBaseAlgorithm::SpectralBaseAlgorithm(const SpectralKSpace& spectral_kspa const amrex::DistributionMapping& dm, const SpectralFieldIndex& spectral_index, const int norder_x, const int norder_y, - const int norder_z, const bool nodal, - const amrex::IntVect& fill_guards): - m_fill_guards(fill_guards), + const int norder_z, const bool nodal): m_spectral_index(spectral_index), // Compute and assign the modified k vectors modified_kx_vec(spectral_kspace.getModifiedKComponent(dm,0,norder_x,nodal)), @@ -66,8 +64,6 @@ SpectralBaseAlgorithm::ComputeSpectralDivE ( field_data.ForwardTransform(lev, *Efield[1], Idx.Ey, 0 ); field_data.ForwardTransform(lev, *Efield[2], Idx.Ez, 0 ); - const amrex::IntVect& fill_guards = m_fill_guards; - // Loop over boxes for (MFIter mfi(field_data.fields); mfi.isValid(); ++mfi){ @@ -107,5 +103,6 @@ SpectralBaseAlgorithm::ComputeSpectralDivE ( } // Backward Fourier transform - field_data.BackwardTransform(lev, divE, Idx.divE, 0, fill_guards); + const amrex::IntVect& fill_guards = amrex::IntVect(0); + field_data.BackwardTransform(lev, divE, Idx.divE, fill_guards, 0); } -- cgit v1.2.3