From ca0b9e9f0d27f4609ac30f694fa24708ffc598f5 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Wed, 4 Sep 2019 15:30:59 -0700 Subject: add parameter warpx.override_sync_int=10 --- Source/WarpX.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/WarpX.cpp') diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 95826c075..7695cb91d 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -281,7 +281,8 @@ WarpX::ReadParameters () pp.query("cfl", cfl); pp.query("verbose", verbose); pp.query("regrid_int", regrid_int); - pp.query("do_subcycling", do_subcycling); + pp.query("do_subcycling", do_subcycling); + pp.query("override_sync_int", override_sync_int); AMREX_ALWAYS_ASSERT_WITH_MESSAGE(do_subcycling != 1 || max_level <= 1, "Subcycling method 1 only works for 2 levels."); -- cgit v1.2.3 From 798f107335d7cd8bde4e0191c202631c97df02b8 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Wed, 4 Sep 2019 15:33:48 -0700 Subject: remove owner masks because they have not been used anymore --- Source/Parallelization/WarpXRegrid.cpp | 5 ----- Source/WarpX.H | 6 ------ Source/WarpX.cpp | 25 ------------------------- 3 files changed, 36 deletions(-) (limited to 'Source/WarpX.cpp') diff --git a/Source/Parallelization/WarpXRegrid.cpp b/Source/Parallelization/WarpXRegrid.cpp index eb119d4a2..9b3baafe1 100644 --- a/Source/Parallelization/WarpXRegrid.cpp +++ b/Source/Parallelization/WarpXRegrid.cpp @@ -62,7 +62,6 @@ WarpX::RemakeLevel (int lev, Real time, const BoxArray& ba, const DistributionMa auto pmf = std::unique_ptr(new MultiFab(current_fp[lev][idim]->boxArray(), dm, current_fp[lev][idim]->nComp(), ng)); current_fp[lev][idim] = std::move(pmf); - current_fp_owner_masks[lev][idim] = std::move(current_fp[lev][idim]->OwnerMask(period)); } if (current_store[lev][idim]) { @@ -88,7 +87,6 @@ WarpX::RemakeLevel (int lev, Real time, const BoxArray& ba, const DistributionMa auto pmf = std::unique_ptr(new MultiFab(rho_fp[lev]->boxArray(), dm, nc, ng)); rho_fp[lev] = std::move(pmf); - rho_fp_owner_masks[lev] = std::move(rho_fp[lev]->OwnerMask(period)); } // Aux patch @@ -143,8 +141,6 @@ WarpX::RemakeLevel (int lev, Real time, const BoxArray& ba, const DistributionMa auto pmf = std::unique_ptr( new MultiFab(current_cp[lev][idim]->boxArray(), dm, current_cp[lev][idim]->nComp(), ng)); current_cp[lev][idim] = std::move(pmf); - current_cp_owner_masks[lev][idim] = std::move( - current_cp[lev][idim]->OwnerMask(cperiod)); } } @@ -162,7 +158,6 @@ WarpX::RemakeLevel (int lev, Real time, const BoxArray& ba, const DistributionMa auto pmf = std::unique_ptr(new MultiFab(rho_cp[lev]->boxArray(), dm, nc, ng)); rho_cp[lev] = std::move(pmf); - rho_cp_owner_masks[lev] = std::move(rho_cp[lev]->OwnerMask(cperiod)); } } diff --git a/Source/WarpX.H b/Source/WarpX.H index f819ba6ca..4f0342c8a 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -496,12 +496,6 @@ private: amrex::Vector, 3 > > current_buf; amrex::Vector > charge_buf; - amrex::Vector, 3 > > current_fp_owner_masks; - amrex::Vector, 3 > > current_cp_owner_masks; - - amrex::Vector > rho_fp_owner_masks; - amrex::Vector > rho_cp_owner_masks; - // div E cleaning int do_dive_cleaning = 0; diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 7695cb91d..f5d75879b 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -190,11 +190,6 @@ WarpX::WarpX () current_buf.resize(nlevs_max); charge_buf.resize(nlevs_max); - current_fp_owner_masks.resize(nlevs_max); - current_cp_owner_masks.resize(nlevs_max); - rho_fp_owner_masks.resize(nlevs_max); - rho_cp_owner_masks.resize(nlevs_max); - pml.resize(nlevs_max); #ifdef WARPX_DO_ELECTROSTATIC @@ -640,14 +635,8 @@ WarpX::ClearLevel (int lev) Efield_cax[lev][i].reset(); Bfield_cax[lev][i].reset(); current_buf[lev][i].reset(); - - current_fp_owner_masks[lev][i].reset(); - current_cp_owner_masks[lev][i].reset(); } - rho_fp_owner_masks[lev].reset(); - rho_cp_owner_masks[lev].reset(); - charge_buf[lev].reset(); current_buffer_masks[lev].reset(); @@ -815,15 +804,9 @@ WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm current_fp[lev][1].reset( new MultiFab(amrex::convert(ba,jy_nodal_flag),dm,ncomps,ngJ)); current_fp[lev][2].reset( new MultiFab(amrex::convert(ba,jz_nodal_flag),dm,ncomps,ngJ)); - const auto& period = Geom(lev).periodicity(); - current_fp_owner_masks[lev][0] = std::move(current_fp[lev][0]->OwnerMask(period)); - current_fp_owner_masks[lev][1] = std::move(current_fp[lev][1]->OwnerMask(period)); - current_fp_owner_masks[lev][2] = std::move(current_fp[lev][2]->OwnerMask(period)); - if (do_dive_cleaning || plot_rho) { rho_fp[lev].reset(new MultiFab(amrex::convert(ba,IntVect::TheUnitVector()),dm,2*ncomps,ngRho)); - rho_fp_owner_masks[lev] = std::move(rho_fp[lev]->OwnerMask(period)); } if (do_subcycling == 1 && lev == 0) @@ -841,7 +824,6 @@ WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm else { rho_fp[lev].reset(new MultiFab(amrex::convert(ba,IntVect::TheUnitVector()),dm,2*ncomps,ngRho)); - rho_fp_owner_masks[lev] = std::move(rho_fp[lev]->OwnerMask(period)); } if (fft_hybrid_mpi_decomposition == false){ // Allocate and initialize the spectral solver @@ -904,14 +886,8 @@ WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm current_cp[lev][1].reset( new MultiFab(amrex::convert(cba,jy_nodal_flag),dm,ncomps,ngJ)); current_cp[lev][2].reset( new MultiFab(amrex::convert(cba,jz_nodal_flag),dm,ncomps,ngJ)); - const auto& cperiod = Geom(lev-1).periodicity(); - current_cp_owner_masks[lev][0] = std::move(current_cp[lev][0]->OwnerMask(cperiod)); - current_cp_owner_masks[lev][1] = std::move(current_cp[lev][1]->OwnerMask(cperiod)); - current_cp_owner_masks[lev][2] = std::move(current_cp[lev][2]->OwnerMask(cperiod)); - if (do_dive_cleaning || plot_rho){ rho_cp[lev].reset(new MultiFab(amrex::convert(cba,IntVect::TheUnitVector()),dm,2*ncomps,ngRho)); - rho_cp_owner_masks[lev] = std::move(rho_cp[lev]->OwnerMask(cperiod)); } if (do_dive_cleaning) { @@ -921,7 +897,6 @@ WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm else { rho_cp[lev].reset(new MultiFab(amrex::convert(cba,IntVect::TheUnitVector()),dm,2*ncomps,ngRho)); - rho_cp_owner_masks[lev] = std::move(rho_cp[lev]->OwnerMask(cperiod)); } if (fft_hybrid_mpi_decomposition == false){ // Allocate and initialize the spectral solver -- cgit v1.2.3