Skip to content

Subdomain-restricted variables hanging nodes fix#2099

Merged
roystgnr merged 4 commits into
libMesh:masterfrom
roystgnr:subdomain_restricted_hanging_nodes
Apr 10, 2019
Merged

Subdomain-restricted variables hanging nodes fix#2099
roystgnr merged 4 commits into
libMesh:masterfrom
roystgnr:subdomain_restricted_hanging_nodes

Conversation

@roystgnr
Copy link
Copy Markdown
Member

@roystgnr roystgnr commented Apr 9, 2019

I caught this while working on more unit test coverage for #1938, and it turned out to be a bug in master, not just in the rewrite in that PR. Previously, when an element with a subdomain-restricted variable had a coarser neighbor on which that variable was not supported, garbage constraint equations would be generated. This PR adds asserts which would catch similar bugs earlier and adds a fix for the bug.

roystgnr added 4 commits April 9, 2019 15:10
This is a little more readable
This catches a bug much earlier in runtime: when bad constraint
equations are created, rather than when they are used.
This turned out to be a red herring in my search for a different bug,
but it's not a bad thing to keep double-checking.
If we have a subdomain-restricted variable which is supported on a
fine element but *not* supported on a neighboring coarse element, then
we do *not* want to try to generate hanging node constraints for that
interface.  Doing so was giving us OOB reads and garbage DoF IDs.
@jwpeterson
Copy link
Copy Markdown
Member

Ignoring whitespace changes the diff isn't all that big, so I'll try and backport to 1.4.1 (#2029) as well?

@roystgnr
Copy link
Copy Markdown
Member Author

I'd definitely like that; thanks! This is the fix I told you was coming for a "horribly embarrassing" bug - two heavily used features which break intermittently if used together!?! And it was just dumb luck that I got a nice error message to track down; since the OOB access didn't cause a segfault, I fear the breakage could even cause corrupted data in the worst case.

@roystgnr roystgnr merged commit 06f3519 into libMesh:master Apr 10, 2019
@roystgnr roystgnr deleted the subdomain_restricted_hanging_nodes branch April 10, 2019 15:49
jwpeterson pushed a commit that referenced this pull request Apr 10, 2019
This is a little more readable

Backported with the other commits from #2099 with the command.
git cherry-pick e9297f1 33466d0 ae5cbc1 de07ffc

Refs #2029.
jwpeterson pushed a commit that referenced this pull request Apr 10, 2019
This catches a bug much earlier in runtime: when bad constraint
equations are created, rather than when they are used.

Backported with the other commits from #2099 with the command.
git cherry-pick e9297f1 33466d0 ae5cbc1 de07ffc

Refs #2029.
jwpeterson pushed a commit that referenced this pull request Apr 10, 2019
This turned out to be a red herring in my search for a different bug,
but it's not a bad thing to keep double-checking.

Backported with the other commits from #2099 with the command.
git cherry-pick e9297f1 33466d0 ae5cbc1 de07ffc

Refs #2029.
jwpeterson pushed a commit that referenced this pull request Apr 10, 2019
If we have a subdomain-restricted variable which is supported on a
fine element but *not* supported on a neighboring coarse element, then
we do *not* want to try to generate hanging node constraints for that
interface.  Doing so was giving us OOB reads and garbage DoF IDs.

Backported with the other commits from #2099 with the command.
git cherry-pick e9297f1 33466d0 ae5cbc1 de07ffc

Refs #2029.
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