Skip to content

Mesh preparation assertions#4411

Open
roystgnr wants to merge 14 commits intolibMesh:develfrom
roystgnr:mesh_preparation_assertions
Open

Mesh preparation assertions#4411
roystgnr wants to merge 14 commits intolibMesh:develfrom
roystgnr:mesh_preparation_assertions

Conversation

@roystgnr
Copy link
Member

Now that we're happy with the updated libMesh submodule in MOOSE and we can get access there to the new fine-grained mesh preparation APIs, it's probably time to start (at least in --disable-deprecated builds) testing for preparation status.

This is the last swath of libMesh-level work that came out of #3759

We're going to need an extra find_neighbors() call after mesh
redistribution to handle a corner case that unpacking neighbor
information doesn't, so let's make that call as cheap as possible.
There's a corner case where a processor can receive 2 ancestor elements
that are neighbors, but from source processors each of which only sees
one of the two semilocally.  This is necessary to fix that.
It's quite annoying to me to have to hunt down *why* a
valid_is_prepared() call fails, which means it's got to be utterly
intractable to too many users.  So, instead of just asserting the final
boolean results of an operator==, let's provide some way to get
assertion failures that deliver more information about what wasn't
equal.
This should give a more informative assertion failure message when
needed.
When NDEBUG isn't defined, these should be no-ops, not unavailable, so
we don't have to wrap them in ifdefs elsewhere.
We're trying to allow meshes to keep track of "half-prepared" status,
for the sake of efficiency in large chains or webs of mesh generators,
but at the very least user assembly kernels should be able to rely on a
mesh being prepared for use - they're what we mean by "use"!.
This should be much better for debugging cases where the assert fails.
This is actually a big behavior change, considering it led to failed
assertions in a half dozen of our own examples.  Let's give users some
time to get up to speed.
I haven't actually seen this fail yet but it does seem like the sort of
thing we should be checking.
@moosebuild
Copy link

Job Coverage, step Generate coverage on 60ebf33 wanted to post the following:

Coverage

5beede #4411 60ebf3
Total Total +/- New
Rate 65.34% 65.38% +0.04% 100.00%
Hits 77856 77951 +95 157
Misses 41297 41273 -24 0

Diff coverage report

Full coverage report

This comment will be updated on new commits.

@roystgnr
Copy link
Member Author

Everything worked on the first try, both in CI and on my workstation. That makes me suspicious; I'm turning on more recipes.

@roystgnr
Copy link
Member Author

Well, there's at least a performance concern. With the extra testing, Debug No Deprecated goes from a 90 minute recipe to a "300 minute and it's just now getting past adaptivity_ex2" recipe. This would be really useful downstream but not if it's likely to start tests there timing out...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants