aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpX.cpp
diff options
context:
space:
mode:
authorGravatar Remi Lehe <remi.lehe@normalesup.org> 2019-09-16 15:22:14 -0700
committerGravatar GitHub <noreply@github.com> 2019-09-16 15:22:14 -0700
commit70d5dc19c5df1bc70b1f467e696549ac8a7cc07b (patch)
treec9076c42a7c36f64d45a45a5259319eaad27de49 /Source/WarpX.cpp
parent46c9b67c58051b1c6f4df3b1894e2e9c6a98de05 (diff)
parentf450d9b3aee80d1378d6fca48b52fa142c284b55 (diff)
downloadWarpX-70d5dc19c5df1bc70b1f467e696549ac8a7cc07b.tar.gz
WarpX-70d5dc19c5df1bc70b1f467e696549ac8a7cc07b.tar.zst
WarpX-70d5dc19c5df1bc70b1f467e696549ac8a7cc07b.zip
Merge pull request #360 from MaxThevenet/buffer_or_main_grid
Initialize buffer MultiFabs when gather_from_main_grid
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r--Source/WarpX.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp
index d2ccc71ef..6c6bb8107 100644
--- a/Source/WarpX.cpp
+++ b/Source/WarpX.cpp
@@ -916,12 +916,13 @@ WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm
//
// Copy of the coarse aux
//
- if (lev > 0 && (n_field_gather_buffer > 0 || n_current_deposition_buffer > 0))
+ if (lev > 0 && (n_field_gather_buffer > 0 || n_current_deposition_buffer > 0 ||
+ mypc->nSpeciesGatherFromMainGrid() > 0))
{
BoxArray cba = ba;
cba.coarsen(refRatio(lev-1));
- if (n_field_gather_buffer > 0) {
+ if (n_field_gather_buffer > 0 || mypc->nSpeciesGatherFromMainGrid() > 0) {
// Create the MultiFabs for B
Bfield_cax[lev][0].reset( new MultiFab(amrex::convert(cba,Bx_nodal_flag),dm,ncomps,ngE));
Bfield_cax[lev][1].reset( new MultiFab(amrex::convert(cba,By_nodal_flag),dm,ncomps,ngE));