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 bug in initial condition for transform_real_to_unit_cell #13278
Conversation
/rebuild |
@@ -0,0 +1,11 @@ | |||
|
|||
DEAL::Transform on cell with center: -0.08086235035 -0.8200448543 -0.08086235035 with mapping degree 1 | |||
DEAL::Combined transform -0.04896990000 -0.8590530000 -0.04896990000 gives 0.7082205181 0.2510034894 0.7082205181 |
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 would fail with the previous version of the code, giving a point with unit coordinates around 12.
d6500a9
to
7a83f54
Compare
This works with the test provided by #13269 and does not lose particles. Consequently once this is merge, I'll fix #13269 to just keep the test and remove the changes to the particle. Thanks @kronbichler for taking a look at it. This is a much nicer solution. |
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.
I'm not the best expert to review this, but it is a very clear and understandable PR. No comments on my side. Great work!
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.
👍
7a83f54
to
49b4a68
Compare
49b4a68
to
91b7121
Compare
Fixes #13246.
@blaisb could you please test this fix?
It turns out that our initial guess for the Newton iteration in the computation via the inverse quadratic approximation did not apply the normalization for the code path with bilinear/trilinear cells (when, in fact, the inverse approximation is only affine and not quadratic). I also cleaned up some internal functions.