Skip to content

Commit

Permalink
Fix allocateSlice for EB
Browse files Browse the repository at this point in the history
The slice data has a different BoxArray, so we cannot use the original
Factory.
  • Loading branch information
WeiqunZhang committed Jun 29, 2023
1 parent 4a4e8b3 commit a7a2dd8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Src/Base/AMReX_MultiFabUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ namespace {
}
BoxArray slice_ba(&boxes[0], static_cast<int>(boxes.size()));
DistributionMapping slice_dmap(std::move(procs));
std::unique_ptr<MultiFab> slice(new MultiFab(slice_ba, slice_dmap, ncomp, 0,
MFInfo(), cell_centered_data.Factory()));
return slice;

return std::make_unique<MultiFab>(slice_ba, slice_dmap, ncomp, 0,
MFInfo(), FArrayBoxFactory());
}
}

Expand Down

0 comments on commit a7a2dd8

Please sign in to comment.