Skip to content

Commit e446dc1

Browse files
authored
Fix a bug in EB FillPatch for face MultiFab (#4705)
The EB Factory in FPInfo was based on the original BoxArray, but for face MultiFabs, that might be too small if the refinement ratio is greater than two.
1 parent f9ad2c6 commit e446dc1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Src/Base/AMReX_FabArrayBase.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2035,9 +2035,15 @@ FabArrayBase::FPinfo::FPinfo (const FabArrayBase& srcfa,
20352035
dm_patch,
20362036
{0,0,0}, EBSupport::basic);
20372037
int ng = 1; // to avoid dengerate box
2038+
BoxArray eb_ba_fine_patch = ba_fine_patch;
2039+
IntVect ratio = fdomain.length() / cdomain.length();
2040+
if ( ! ratio.allLE(2)) {
2041+
// This is needed for make_mf_refined_patch in FillPatch
2042+
eb_ba_fine_patch.coarsen(ratio).refine(ratio);
2043+
}
20382044
fact_fine_patch = makeEBFabFactory(index_space,
20392045
index_space->getGeometry(fdomain),
2040-
ba_fine_patch,
2046+
eb_ba_fine_patch,
20412047
dm_patch,
20422048
{ng,ng,ng}, EBSupport::basic);
20432049
}

0 commit comments

Comments
 (0)