-
Notifications
You must be signed in to change notification settings - Fork 249
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
[Hotfix][Core] Fix 2D discontinuous distance orientation #12681
[Hotfix][Core] Fix 2D discontinuous distance orientation #12681
Conversation
@@ -682,8 +682,8 @@ namespace Kratos | |||
const Element::GeometryType &rGeometry, | |||
array_1d<double,3> &rIntObjNormal) | |||
{ | |||
rIntObjNormal[0] = rGeometry[0].Y() - rGeometry[1].Y(); |
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.
:)
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.
2 lines of code, probably 6 h of debugging
About the FSI tests, I prefer to deactivate as it will be upgraded in #12673. @Marco1410 @marcnunezc I required to update the results of the embedded wake tests. Note: @Marco1410, we need to upgrade the implementation of the |
Hi! If only the orientation is changing, I would expect no change in the test results. I would like to understand what is causing the change in the result. Something is not robust enough (probably the logic on the intersection of geometry and wake). I dont want to block your PR, would you agree on bringing back the previous test results and skip the test or mark it as Expected Failure until I find the issue? |
Makes perfect sense. I'll have a quick look to it. If I manage to find the issue I'd try to fix it and revert the test results. If not, I'll mark them as expected failure. |
@marcnunezc I think missed one change in the embedded wake definition process (basically to flip it in order to keep the same values). Please confirm that what I done is correct. |
So are you getting the original test results with this change? |
Mainly yes. But there are some slight changes, about which I'm not 100% sure if they can be expected or not. Edit: I reverted the changes in the json files to ease the tracking of the changes. |
I have an alternative solution to the problem in #12690 using the orientation of the wake to decide the sign of the distance values. With this approach, no changes are required in this PR after changing the orientation of the discontinuous process. |
Fine for me. Whatever you consider is surely the best option in this case. 👍 . |
Should be ready now @loumalouomega @marcnunezc . |
📝 Description
This PR fixes the discontinuous distance orientation in 2D so to make it consistent with the expected 3D behavior, that is to say, the positive distance side is the side the structure normal is pointing to. Note that the modification in the distance algorithm is consistent with the way we use to calculate the normal in 2D simplex geometries (2-node line).