-
Notifications
You must be signed in to change notification settings - Fork 293
fix the quadratic element issue in TriangulatorInterface #4145
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
base: devel
Are you sure you want to change the base?
Conversation
The original approach uses node ID as the key to find the corresponding midpoint. The ID seems to have changed during triangulation. |
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 invalidates the comment explaining all_midpoints
:
// [...] all_midpoints[{p, m}] will be the mth midpoint
// location following after point p (when traversing a triangle
// counter-clockwise)
And it doesn't change uses of all_midpoints
that clearly make that assumption too, explicitly querying elem->point(n)
for n<3
to get the point for the key. None of them needed to be changed?
I think we need a new unit test to demonstrate the bug and cover the fix.
The only change this PR makes is to store the node point coordinates instead of the node id of the first node when a segment (i.e. two nodes) is created. Later on, this point coordinates are used as I agree that a unit test would help. |
Ah, I get it now. I saw To do that, of course, we have to understand why. I don't like fixing the effects of a problem whose cause I don't understand. It's like putting a bucket to catch water under a drip from the ceiling. Your carpet is no longer getting wet, that's great, but the drip shouldn't have been there and it might be damaging your drywall if you consider the problem solved instead of investigating further. We're creating |
Could you come up with a unit test? Aside from making sure we don't regress on this, that should be enough for me to go through in the debugger and find where and why we have node ids changing during triangulation. |
Sure, I'll aim to work on a unit test later this week, once I tackle some pressing deadlines. |
6922c7f
to
238f4cd
Compare
Added a unit test. It should work with the this PR's fix but will fail if run with the current Not sure why some civet tests failed (not familiar with libmesh's testing system). |
Your The ideal thing to do for tests that can be supported by both Poly2Tri and Triangle backends is to create a single implementation that works with a reference-to-base-class and two instantiations that each pass in one of the different subclasses. There's plenty of examples in there to look at. |
b7d819c
to
216ba86
Compare
216ba86
to
33866f9
Compare
I added the unit test as directed. thanks. |
closes #4144