diff options
Diffstat (limited to 'Source/Parallelization')
-rw-r--r-- | Source/Parallelization/GuardCellManager.H | 25 | ||||
-rw-r--r-- | Source/Parallelization/GuardCellManager.cpp | 7 | ||||
-rw-r--r-- | Source/Parallelization/WarpXComm.cpp | 21 |
3 files changed, 40 insertions, 13 deletions
diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index 4b85a4332..706b5df79 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -22,20 +22,21 @@ public: const int max_level); // Guard cells to initialize multifabs - amrex::IntVect ngExtra; - amrex::IntVect ngE; - amrex::IntVect ngJ; - amrex::IntVect ngRho; - amrex::IntVect ngF; - int ngF_int; + amrex::IntVect ngExtra = amrex::IntVect::TheZeroVector(); + amrex::IntVect ngE = amrex::IntVect::TheZeroVector(); + amrex::IntVect ngJ = amrex::IntVect::TheZeroVector(); + amrex::IntVect ngRho = amrex::IntVect::TheZeroVector(); + amrex::IntVect ngF = amrex::IntVect::TheZeroVector(); + int ngF_int = 0; // Guard cells to exchange data - amrex::IntVect ngB_FieldSolver; - amrex::IntVect ngE_FieldSolver; - amrex::IntVect ng_FieldGather; - amrex::IntVect ngJ_CurrentDepo; - amrex::IntVect ng_MovingWindow; - amrex::IntVect ng_NCIFilter; + amrex::IntVect ngB_FieldSolver = amrex::IntVect::TheZeroVector(); + amrex::IntVect ngE_FieldSolver = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_FieldGather = amrex::IntVect::TheZeroVector(); + amrex::IntVect ngJ_CurrentDepo = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_MovingWindow = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_NCIFilter = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_Aux = amrex::IntVect::TheZeroVector(); }; #endif // GUARDCELLMANAGER_H_ diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index c790c3472..166f0d58d 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -131,5 +131,10 @@ guardCellManager::Init( int FGcell[4] = {0,1,1,2}; // Index is nox ng_FieldGather = IntVect(AMREX_D_DECL(FGcell[nox],FGcell[nox],FGcell[nox])); ngJ_CurrentDepo = ng_FieldGather; - ng_NCIFilter = IntVect(AMREX_D_DECL(0,0,4)); + if (do_fdtd_nci_corr){ + ng_NCIFilter = IntVect::TheZeroVector(); + ng_NCIFilter[AMREX_SPACEDIM-1] = 4; + } + ng_Aux = 2*ng_FieldGather+ng_NCIFilter; + ng_Aux = ng_Aux.min(ngE); } diff --git a/Source/Parallelization/WarpXComm.cpp b/Source/Parallelization/WarpXComm.cpp index 0dae38e2e..7d2473f30 100644 --- a/Source/Parallelization/WarpXComm.cpp +++ b/Source/Parallelization/WarpXComm.cpp @@ -484,6 +484,27 @@ WarpX::FillBoundaryF (int lev, PatchType patch_type, IntVect ng) } void +WarpX::FillBoundaryAux (IntVect ng) +{ + for (int lev = 0; lev <= finest_level-1; ++lev) + { + FillBoundaryAux(lev, ng); + } +} + +void +WarpX::FillBoundaryAux (int lev, IntVect ng) +{ + const auto& period = Geom(lev).periodicity(); + Efield_aux[lev][0]->FillBoundary(0, Efield_aux[lev][0]->nComp(), ng, period); + Efield_aux[lev][1]->FillBoundary(0, Efield_aux[lev][1]->nComp(), ng, period); + Efield_aux[lev][2]->FillBoundary(0, Efield_aux[lev][2]->nComp(), ng, period); + Bfield_aux[lev][0]->FillBoundary(0, Bfield_aux[lev][0]->nComp(), ng, period); + Bfield_aux[lev][1]->FillBoundary(0, Bfield_aux[lev][1]->nComp(), ng, period); + Bfield_aux[lev][2]->FillBoundary(0, Bfield_aux[lev][2]->nComp(), ng, period); +} + +void WarpX::SyncCurrent () { BL_PROFILE("SyncCurrent()"); |