@@ -425,17 +425,11 @@ ProResInfo ProResInfo::GetSet(MeshBlock *pmb, const NeighborBlock &nb,
425425 // This will select a superset of the boundaries that actually need to be restricted,
426426 // more logic could be added to only restrict boundary regions that abut boundary
427427 // regions that were filled by coarser neighbors
428- bool restricted = false ;
429- int mylevel = pmb->loc .level ();
430- if (mylevel > 0 ) {
431- for (const auto &nb : pmb->GetNeighbors ()) {
432- restricted = restricted || (nb.origin_loc .level () == (mylevel - 1 ));
433- }
434- }
428+ bool restricted = pmb->HasCoarserNeighbors ();
435429
436430 for (auto el : v->GetTopologicalElements ()) {
437431 out.IncludeTopoEl (el) = true ;
438- if (nb.origin_loc .level () < mylevel ) {
432+ if (nb.origin_loc .level () < pmb-> loc . level () ) {
439433 out.refinement_op = RefinementOp_t::Prolongation;
440434 } else {
441435 if (restricted) {
@@ -455,7 +449,7 @@ ProResInfo ProResInfo::GetSet(MeshBlock *pmb, const NeighborBlock &nb,
455449 // I doubt that the extra calculations matter, but the storage overhead could
456450 // matter since each 6D indexer contains 18 ints and we are always carrying around
457451 // 10 indexers per bound info even if the field isn't allocated
458- if (nb.origin_loc .level () < mylevel ) {
452+ if (nb.origin_loc .level () < pmb-> loc . level () ) {
459453 for (auto el : {TE::CC, TE::F1, TE::F2, TE::F3, TE::E1 , TE::E2 , TE::E3 , TE::NN})
460454 out.idxer [static_cast <int >(el)] =
461455 CalcIndices (nb, pmb, v, el, IndexRangeType::BoundaryExteriorRecv, true );
0 commit comments