Skip to content

Commit e7482fd

Browse files
ax3lWeiqunZhang
andauthored
Fix Assert in ReduceToPlaneMF (#4566)
## Summary Fix an assert in `reduce_to_plane`, making sure the same staggering is used for the number-of-node-points assert. ## Additional background Follow-up to #4384 ## Checklist The proposed changes: - [x] fix a bug or incorrect behavior in AMReX - [ ] add new capabilities to AMReX - [ ] changes answers in the test suite to more than roundoff level - [ ] are likely to significantly affect the results of downstream AMReX users - [ ] include documentation in the code and/or rst files, if appropriate Co-authored-by: Weiqun Zhang <[email protected]>
1 parent 2fbd95b commit e7482fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Src/Base/AMReX_MultiFabUtil.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@ FA reduce_to_plane (int direction, Box const& domain, FA const& mf, F const& f)
12921292
Box const ndomain = amrex::convert(domain, mf.ixType());
12931293

12941294
auto npts = amrex::convert(mf.boxArray(),IntVect(0)).numPts();
1295-
if (npts != ndomain.numPts()) {
1295+
if (npts != amrex::convert(domain, amrex::IntVect(0)).numPts()) {
12961296
amrex::Abort("ReduceToPlaneMF: mf's BoxArray must have a rectangular domain.");
12971297
}
12981298

0 commit comments

Comments
 (0)