diff options
-rw-r--r-- | Source/Evolve/WarpXEvolveEM.cpp | 15 | ||||
-rw-r--r-- | Source/Parallelization/GuardCellManager.cpp | 4 | ||||
-rw-r--r-- | Source/Utils/WarpXMovingWindow.cpp | 4 | ||||
-rw-r--r-- | Source/WarpX.H | 2 |
4 files changed, 23 insertions, 2 deletions
diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index 1831a87bf..c94293987 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -18,6 +18,15 @@ using namespace amrex; void +WarpX::all_FillBoundary() +{ + FillBoundaryE(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); + FillBoundaryB(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); + FillBoundaryF(guard_cells.ng_alloc_F); + FillBoundaryAux(guard_cells.ng_UpdateAux); +} + +void WarpX::EvolveEM (int numsteps) { BL_PROFILE("WarpX::EvolveEM()"); @@ -355,11 +364,17 @@ WarpX::OneStep_nosub (Real cur_time) FillBoundaryF(guard_cells.ng_alloc_F); DampPML(); FillBoundaryE(guard_cells.ng_MovingWindow, IntVect::TheZeroVector()); + FillBoundaryF(guard_cells.ng_MovingWindow); FillBoundaryB(guard_cells.ng_MovingWindow, IntVect::TheZeroVector()); } // E and B are up-to-date in the domain, but all guard cells are // outdated. #endif +//FillBoundaryE(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); +//FillBoundaryB(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); +//FillBoundaryF(guard_cells.ng_alloc_F); +//FillBoundaryAux(guard_cells.ng_UpdateAux); +//all_FillBoundary(); } /* /brief Perform one PIC iteration, with subcycling diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 7f72553b6..a275f4c00 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -128,7 +128,9 @@ guardCellManager::Init( ng_FieldSolverF = ng_alloc_F; ng_FieldGather = ng_alloc_EB; ng_UpdateAux = ng_alloc_EB; - ng_MovingWindow = ng_alloc_EB; + if (do_moving_window){ + ng_MovingWindow = ng_alloc_EB; + } } else { ng_FieldSolver = ng_FieldSolver.min(ng_alloc_EB); diff --git a/Source/Utils/WarpXMovingWindow.cpp b/Source/Utils/WarpXMovingWindow.cpp index a5d022005..eb01af24e 100644 --- a/Source/Utils/WarpXMovingWindow.cpp +++ b/Source/Utils/WarpXMovingWindow.cpp @@ -238,7 +238,8 @@ WarpX::shiftMF (MultiFab& mf, const Geometry& geom, int num_shift, int dir, MultiFab tmpmf(ba, dm, nc, ng); MultiFab::Copy(tmpmf, mf, 0, 0, nc, ng); - IntVect ng_mw = IntVect::TheZeroVector(); + IntVect ng_mw = IntVect::TheUnitVector(); + // IntVect ng_mw = IntVect::TheZeroVector(); // Enough guard cells in the MW direction ng_mw[dir] = num_shift; // Add the extra cell (if momentum-conserving gather with staggered field solve) @@ -247,6 +248,7 @@ WarpX::shiftMF (MultiFab& mf, const Geometry& geom, int num_shift, int dir, ng_mw = ng_mw.min(ng); // Fill guard cells. tmpmf.FillBoundary(ng_mw, geom.periodicity()); + // tmpmf.FillBoundary(ng, geom.periodicity()); // Make a box that covers the region that the window moved into const IndexType& typ = ba.ixType(); diff --git a/Source/WarpX.H b/Source/WarpX.H index b9f969abb..b91535e41 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -433,6 +433,8 @@ private: /// void EvolveEM(int numsteps); + void all_FillBoundary(); + void FillBoundaryB (int lev, PatchType patch_type, amrex::IntVect ng); void FillBoundaryE (int lev, PatchType patch_type, amrex::IntVect ng); void FillBoundaryF (int lev, PatchType patch_type, amrex::IntVect ng); |