-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
Fix set_exterior_facet_domains
for arbitrary ghosting
#2424
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes an issue, and is no worse than what went before, in terms of efficiency (replaces binary search with lower bound)...
@jpdean is this supposed to affect serial runs too, or not? I have a few tutorials in multiphenicsx that worked before this PR was merged, and failed tonight, in some cases returning nan on solve, in other cases returning a value of The failing tutorials are
in
are tutorials that use The only difference I can spot between the two groups is that in the failing ones I only define a custom |
I think there may be a lack of suitable unit tests. The PR should have fixed a bug in correctly determining surface facets for |
Oh no! Thanks for reporting this. I'll do some tests to see if I can figure out what is going wrong. As Chris mentioned, a minimum failing example would be really helpful. |
@francesco-ballarin - it seems that the problem is due to unsorted |
I don't think we should have the check on by default - that's what we have DEBUG mode for. Release mode checks should be O(1). |
I guess it should be added to the Python documentation, as most Python users will not dig into the C++ documentation. |
Thanks @chrisrichardson for sorting (pun intended ;) ) this out! I've pushed a fix to my repo. I've gone through
|
Currently,
set_exterior_facet_domains
makes assumptions about the ghosting of the mesh. Looks like it was missed when #2337 was merged. This PR removes these assumptions. Unfortunately, it relies on anstd::lower_bound
in a loop, which is not ideal. However, I plan to replace this in #2269