Skip to content

Static condensation restarts#4414

Merged
roystgnr merged 21 commits intolibMesh:develfrom
roystgnr:static_condensation_restarts
Mar 9, 2026
Merged

Static condensation restarts#4414
roystgnr merged 21 commits intolibMesh:develfrom
roystgnr:static_condensation_restarts

Conversation

@roystgnr
Copy link
Member

@roystgnr roystgnr commented Mar 4, 2026

I haven't yet succeeded at the StaticCondensation updates I wanted to accomplish, but along the way I noticed some feature compatibility issues that I was able to fix and add test coverage for.

roystgnr added 17 commits March 4, 2026 14:20
We promise all mistaken comments will get revised and corrected within
25 years, or your money back!
This fixes various errors that occur when trying to use static
condensation after an EquationSystems::read()
This might be an error in some cases, but it's the code path we hit in
adaptivity_ex2
We can get subvectors out of EigenSparseVector pretty easily, but shell
matrices are trickier.
This lets us clean up vector_fe_ex9 a bit
Nobody uses GMV anymore, and it doesn't support some of the element
types I was experimenting with.
This makes it easier to see how things are developing as AMR/C proceeds,
which is good for tweaking our heuristics.
@moosebuild
Copy link

moosebuild commented Mar 5, 2026

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

Coverage

ee0cca #4414 c9e88c
Total Total +/- New
Rate 65.34% 65.37% +0.03% 100.00%
Hits 77952 78003 +51 48
Misses 41344 41324 -20 0

Diff coverage report

Full coverage report

This comment will be updated on new commits.

The options we use for our distributed sweeps aren't compatible with the
shell matrix we use for static condensation.
@roystgnr
Copy link
Member Author

roystgnr commented Mar 5, 2026

The trouble with adding extra test coverage is that sometimes it reveals that you really needed the extra test coverage.

I can replicate that failure at -np 4; processor 3 is in backwards_substitution()/set_local_vectors() and calling for an index that isn't in the ghosted solution vector. It's a hanging node, with one vertex DoF and two distinct edge DoFs, so that might be what's throwing things. Looking into it now.

@roystgnr
Copy link
Member Author

roystgnr commented Mar 5, 2026

This seems like it might be a bug in how our ghosting calculations interact with static condensation. Algebraic ghosting, too, so it's only the fact that we do our sweeps distributed that's preventing the bug from showing up on a ReplicatedMesh.

We're on a triangle whose tip touches a coarser ghosted triangle's mid-edge, so our vertex DoF at that node is constrained in terms of the edge DoFs at that node. All DoFs at that node are owned by the coarse element's processor, so we don't see them as local and we don't bother to ghost all our own element's constraining DoFs.

That's usually fine, because when usually when we're doing constraint calculations like enforce_constraints_exactly() each DoF is worked on by its owner. Here, we have a DoF being worked on by it's element's owner, and so our algebraic ghosting requirements are expanded, but we haven't actually expanded our ghosting to match.

This might be as simple to fix as checking has_static_condensation() in add_constraints_to_send_list() and adding a different (more expensive...) loop there if we need it to catch these straggler dependencies. I'll try that.

roystgnr added 2 commits March 5, 2026 16:06
Not sure if this is the right way to refactor this but it's a lot
simpler than the alternatives I tried
@moosebuild
Copy link

Job Test MOOSE GCC min on c9e88c1 : invalidated by @roystgnr

Restarting after web control failures

@moosebuild
Copy link

Job Test MOOSE recover and restep on c9e88c1 : invalidated by @roystgnr

Restarting after thermochimica failure

@roystgnr roystgnr merged commit 30a31f2 into libMesh:devel Mar 9, 2026
26 checks passed
@roystgnr roystgnr deleted the static_condensation_restarts branch March 9, 2026 21:53
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.

3 participants