aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpX.cpp
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2019-09-16 10:40:49 -0700
committerGravatar MaxThevenet <mthevenet@lbl.gov> 2019-09-16 10:40:49 -0700
commitf450d9b3aee80d1378d6fca48b52fa142c284b55 (patch)
treec9076c42a7c36f64d45a45a5259319eaad27de49 /Source/WarpX.cpp
parent46c9b67c58051b1c6f4df3b1894e2e9c6a98de05 (diff)
downloadWarpX-f450d9b3aee80d1378d6fca48b52fa142c284b55.tar.gz
WarpX-f450d9b3aee80d1378d6fca48b52fa142c284b55.tar.zst
WarpX-f450d9b3aee80d1378d6fca48b52fa142c284b55.zip
initialize buffer MultiFabs if 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));