-
Notifications
You must be signed in to change notification settings - Fork 297
Track a MeshBase::interior_mesh() to enable BoundaryMesh serialization #4182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When working with a BoundaryInfo-generated mesh whose interior_parent() pointers point back to a *different* mesh, we need to be able to get at that different mesh if we want to be able to serialize and unserialize interior parent data.
This fixes a bug with serialization (or redistribution, probably) of distributed boundary meshes
Is this related the assertion I hit with mesh refinement when using |
This'll make it easier to test synchronization after refinement rather than just before.
Support for this was attempted back in September 2003, but our only coverage was for refinement after sync, not before. This may be a new winner in the "Longest-Unfixed libMesh Bug" competition.
The first three commits fix and add test coverage for subsequent serialization of a distributed |
This is going to be a non-manifold mesh, and we don't really support those, but when we do mesh distribution and adaptivity on them then we *really* don't really support those.
prepare_for_use() will helpfully notice remote_elem interior_parent() links that can be updated, and will do so even if we set them remote because we knew they can't be updated for good.
Even with a ReplicatedMesh, trying to consistently refine etc. when we have four edge elements meeting at all these points gets to be too much.
This isn't as sweeping as I'd hoped it would be, because as soon as we mix interior and exterior sidesets we run into the "libMesh doesn't properly support non-manifold connections" problem for which I've never been able to come up with an efficient fix, but it does fix a bunch of use cases and add much better test coverage. |
The test coverage is so much better, in fact, that it's failing on the devel->master merge. I can replicate it and am looking into it. |
I don't recall whether @YaqiWang hit this bug or whether I found it while investigating the issues he did hit in #4180, but either way thanks go to him for pushing at a mix of capabilities that hadn't been properly tested and working before.
Previously, we couldn't correctly serialize a distributed boundary mesh, because the Elem Packing code would try to find interior parents by id in the wrong mesh. Now we can, by keeping track of the "interior mesh" (which defaults to
this
) for any given mesh.Unit tests here fail (when running on a few ranks) without the preceding commits' fixes.