From 8d3cf84d6fef860a761e29d13ca9c9af37f9bdda Mon Sep 17 00:00:00 2001 From: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Date: Mon, 10 May 2021 09:59:41 -0700 Subject: Guard Cells with PSATD: Fill With Inverse FFT, Damp Fields (#1867) * Loop Over Full Box in Inverse FFTs * Enable Fields Damping in Cartesian Geometry * Minimize Style Changes * Fields Damping: Fix Tileboxes For General Case * Clean Up * Assume Periodicity For Last Nodal Point in Inverse FFTs * Update Benchmark of averaged_galilean_2d_psatd * Update Benchmark of averaged_galilean_3d_psatd * Update Benchmark of averaged_galilean_2d_psatd * Update Benchmarks * Update Benchmark of pml_psatd_dive_divb_cleaning * Clean Up: Use More Descriptive Names --- Source/WarpX.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Source/WarpX.cpp') diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 2629da00a..895db9fd2 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -959,13 +959,12 @@ WarpX::ReadParameters () "psatd.update_with_rho must be equal to 1 for comoving PSATD"); } -# ifdef WARPX_DIM_RZ - if (!Geom(0).isPeriodic(1)) { + constexpr int zdir = AMREX_SPACEDIM - 1; + if (!Geom(0).isPeriodic(zdir)) + { use_damp_fields_in_z_guard = true; } pp_psatd.query("use_damp_fields_in_z_guard", use_damp_fields_in_z_guard); -# endif - } // for slice generation // -- cgit v1.2.3