Open dschwen opened 8 years ago
@jwpeterson has proposed a fix for this: adding
this->_predicates.push_back(new active<T>)
to the SemiLocal
multi-predicate. This seems to fix the issue I observe.
Will make PR momentarily...
Semilocal elements are not necessary active elements, and we may already have other code in which that assumption is important. The fix here should probably be two-fold: create a semilocal_active_elements_foo() pair of iterators if that's what you need, and fix the iteration in the semilocal_elements_foo() iterators too.
Huh. We do rely on find_point_neighbors(), which does assert active(). This seems like the underlying bug...
OK, so you think that find_point_neighbors()
shouldn't assert this?
No, find_point_neighbors() was definitely written to work for active elements only. Perhaps what we need to be doing is, for inactive elements, looping over the children and testing is_semilocal() on each of them?
Yeah, that sounds like the right fix - iff any descendant of mine is semilocal, then so am I. Could be slow as hell to iterate through the low level ancestors... but I suppose the number of remote ancestors decreases exponentially with level. And I don't think there's any other safe way to handle it.
OK, is there any reason to have #975 as a temporary quick fix until someone implements this loop over children checking for semi-locality? Otherwise I will just close that...
Incrementing the iterator obtained via
.semilocal_elements_begin()
can trigger anAssertion
start_elem->active()' failed.`This will fix idaholab/moose#7097