diff options
author | 2019-12-20 10:17:50 -0800 | |
---|---|---|
committer | 2019-12-20 10:17:50 -0800 | |
commit | 1de857ee8cd0823860ca3bd9447d8e88d4d1dc5a (patch) | |
tree | cd77fce227c71b6f7a67c74a45f0f13b7126022f /Source/Parallelization/WarpXRegrid.cpp | |
parent | 568c50aacf06a256780b971b78ba591874f9606b (diff) | |
parent | b76ff18732925af2e65e4e0e6522beb52056c57e (diff) | |
download | WarpX-1de857ee8cd0823860ca3bd9447d8e88d4d1dc5a.tar.gz WarpX-1de857ee8cd0823860ca3bd9447d8e88d4d1dc5a.tar.zst WarpX-1de857ee8cd0823860ca3bd9447d8e88d4d1dc5a.zip |
Merge remote-tracking branch 'upstream/dev' into estatic
Diffstat (limited to 'Source/Parallelization/WarpXRegrid.cpp')
-rw-r--r-- | Source/Parallelization/WarpXRegrid.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Parallelization/WarpXRegrid.cpp b/Source/Parallelization/WarpXRegrid.cpp index 5441755f5..29ccc8f4d 100644 --- a/Source/Parallelization/WarpXRegrid.cpp +++ b/Source/Parallelization/WarpXRegrid.cpp @@ -1,4 +1,3 @@ - #include <WarpX.H> #include <AMReX_BLProfiler.H> @@ -12,7 +11,8 @@ WarpX::LoadBalance () AMREX_ALWAYS_ASSERT(costs[0] != nullptr); - for (int lev = 0; lev <= finestLevel(); ++lev) + const int nLevels = finestLevel(); + for (int lev = 0; lev <= nLevels; ++lev) { const Real nboxes = costs[lev]->size(); const Real nprocs = ParallelDescriptor::NProcs(); @@ -91,7 +91,7 @@ WarpX::RemakeLevel (int lev, Real time, const BoxArray& ba, const DistributionMa // Aux patch - if (lev == 0) + if (lev == 0 && Bfield_aux[0][0]->ixType() == Bfield_fp[0][0]->ixType()) { for (int idim = 0; idim < 3; ++idim) { Bfield_aux[lev][idim].reset(new MultiFab(*Bfield_fp[lev][idim], amrex::make_alias, 0, Bfield_aux[lev][idim]->nComp())); |