aboutsummaryrefslogtreecommitdiff
path: root/Source/Parallelization/GuardCellManager.cpp
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2019-11-12 10:54:38 -0800
committerGravatar MaxThevenet <mthevenet@lbl.gov> 2019-11-12 10:54:38 -0800
commit8cc9c8a153b6526dad68ee2bcdcacf912969e747 (patch)
tree9f3c23effb49b90d641bb8f346cc4d5b1c390ebd /Source/Parallelization/GuardCellManager.cpp
parent1ceb8be6c91da62fbd4ac3c8a396b887cff2f15f (diff)
downloadWarpX-8cc9c8a153b6526dad68ee2bcdcacf912969e747.tar.gz
WarpX-8cc9c8a153b6526dad68ee2bcdcacf912969e747.tar.zst
WarpX-8cc9c8a153b6526dad68ee2bcdcacf912969e747.zip
fix psatd: problem was in buffer cells
Diffstat (limited to 'Source/Parallelization/GuardCellManager.cpp')
-rw-r--r--Source/Parallelization/GuardCellManager.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp
index 9d4a06f73..cfe6e8470 100644
--- a/Source/Parallelization/GuardCellManager.cpp
+++ b/Source/Parallelization/GuardCellManager.cpp
@@ -4,7 +4,7 @@
using namespace amrex;
-void
+int
guardCellManager::Init(
const bool do_subcycling,
const bool do_fdtd_nci_corr,
@@ -69,6 +69,8 @@ guardCellManager::Init(
ng_alloc_J = IntVect(ngJx,ngJz);
#endif
+ int nJ_buffer = ng_alloc_J.max(); // guard cells for J required for deposition only.
+
ng_alloc_Rho = ng_alloc_J+1; //One extra ghost cell, so that it's safe to deposit charge density
// after pushing particle.
ng_alloc_F_int = (do_moving_window) ? 2 : 0;
@@ -149,15 +151,5 @@ guardCellManager::Init(
ng_MovingWindow[moving_window_dir] = 1;
}
- Print()<<"ng_alloc_EB "<<ng_alloc_EB <<'\n';
- Print()<<"ng_alloc_J "<< ng_alloc_J<<'\n';
- Print()<<"ng_alloc_Rho "<<ng_alloc_Rho <<'\n';
- Print()<<"ng_alloc_F "<<ng_alloc_F <<'\n';
- Print()<<"ng_alloc_F_int "<<ng_alloc_F_int <<'\n';
- Print()<<"ng_FieldSolver "<<ng_FieldSolver <<'\n';
- Print()<<"ng_FieldGather "<<ng_FieldGather<<'\n';
- Print()<<"ng_UpdateAux "<<ng_UpdateAux <<'\n';
- Print()<<"ng_MovingWindow"<<ng_MovingWindow <<'\n';
- Print()<<"ng_Extra "<<ng_Extra <<'\n';
-
+ return nJ_buffer;
}