From 82cfaf9ae48f2fc9c0c6c67bd37e98a0eff1c467 Mon Sep 17 00:00:00 2001 From: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Date: Wed, 30 Sep 2020 13:57:49 -0700 Subject: Use fewer guard cells for deposition (#1368) * Use fewer guard cells for deposition * Update some CI benchmarks * Revert "Update some CI benchmarks" This reverts commit 2f40062557d75e3f6b2d3ba284332b8a92a0d404. * Check if shapes and guard cells are compatible only for rho * Do not allocate one extra guard cell for J * Add more relaxed check on shapes and guard cells for J --- Source/Parallelization/GuardCellManager.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 5635f5d83..1b8d38f0c 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -89,7 +89,16 @@ guardCellManager::Init( ng_alloc_J = IntVect(ngJx,ngJz); #endif - ng_alloc_Rho = ng_alloc_J+1; //One extra ghost cell, so that it's safe to deposit charge density + // Rho is needed both at the beginning and at the end of the PIC iteration. + // Hence we add one extra guard cell for the allocation of the MultiFab that + // contains rho, in order to account for the change in the particle positions + // within a time step + ng_alloc_Rho = ng_alloc_J+1; + + // Number of guard cells for local deposition of J and rho + ng_depos_J = ng_alloc_J; + ng_depos_rho = ng_alloc_Rho; + // after pushing particle. int ng_alloc_F_int = (do_moving_window) ? 2 : 0; // CKC solver requires one additional guard cell -- cgit v1.2.3