From 30abf69638c200cd4fdfb9305a9b02075c0df0b0 Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Sun, 27 Oct 2019 14:28:21 -0700 Subject: avoid redeclaring variables --- Source/Parallelization/GuardCellManager.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 400bde28f..88dab9fd1 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -59,6 +59,7 @@ guardCellManager::Init( ngJz = std::max(ngJz,2); } +/* #if (AMREX_SPACEDIM == 3) IntVect ngE(ngx,ngy,ngz); IntVect ngJ(ngJx,ngJy,ngJz); @@ -70,6 +71,19 @@ guardCellManager::Init( IntVect ngRho = ngJ+1; //One extra ghost cell, so that it's safe to deposit charge density // after pushing particle. int ngF = (do_moving_window) ? 2 : 0; +*/ + +#if (AMREX_SPACEDIM == 3) + ngE = IntVect(ngx,ngy,ngz); + ngJ = IntVect(ngJx,ngJy,ngJz); +#elif (AMREX_SPACEDIM == 2) + ngE = IntVect(ngx,ngz); + ngJ = IntVect(ngJx,ngJz); +#endif + + ngRho = ngJ+1; //One extra ghost cell, so that it's safe to deposit charge density + // after pushing particle. + ngF = (do_moving_window) ? 2 : 0; // CKC solver requires one additional guard cell if (maxwell_fdtd_solver_id == 1) ngF = std::max( ngF, 1 ); -- cgit v1.2.3