aboutsummaryrefslogtreecommitdiff
path: root/Source/Parallelization
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
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')
-rw-r--r--Source/Parallelization/GuardCellManager.H2
-rw-r--r--Source/Parallelization/GuardCellManager.cpp16
-rw-r--r--Source/Parallelization/WarpXComm.cpp1
3 files changed, 5 insertions, 14 deletions
diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H
index 53d5ccc08..c6fdecaee 100644
--- a/Source/Parallelization/GuardCellManager.H
+++ b/Source/Parallelization/GuardCellManager.H
@@ -7,7 +7,7 @@ class guardCellManager{
public:
- void Init(
+ int Init(
const bool do_subcycling,
const bool do_fdtd_nci_corr,
const bool do_nodal,
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;
}
diff --git a/Source/Parallelization/WarpXComm.cpp b/Source/Parallelization/WarpXComm.cpp
index c23447e8f..5d7e44a8e 100644
--- a/Source/Parallelization/WarpXComm.cpp
+++ b/Source/Parallelization/WarpXComm.cpp
@@ -2,7 +2,6 @@
#include <WarpX.H>
#include <WarpX_f.H>
#include <WarpXSumGuardCells.H>
-#include "WarpXAlgorithmSelection.H"
#include <Parallelization/InterpolateCurrentFineToCoarse.H>
#include <Parallelization/InterpolateDensityFineToCoarse.H>