-
Notifications
You must be signed in to change notification settings - Fork 197
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
[WIP] Replace sin(theta), cos(theta) with amrex::Math::sincos(theta) when appropriate #4587
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.
Thanks, LGTM! 👍
Note that as linked in the other PR, and tested when I added the function to AMReX, most optimizing compilers should find this automatically. But this way it is done also in all optimization levels, and cleaner if the results are needed multiple times.
Restarting CI, all Azure tests failed...? |
CI still not happy, huh. Can you please rebase? |
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.
cool! Thanks for this PR, @lucafedeli88
Looks like CI is not happy. Can you rebase @lucafedeli88 ? |
There seem to be percent-level changes for momenta in checksum files 🤔 |
@lucafedeli88 I think there might be a bug here if the results change. Potentially, one could systematically pick one test and bisect which file change introduces the differences? |
@lucafedeli88 can you rebase this? |
@ax3l , I've merged the newest version of WarpX into this branch. I'll try to understand which substitution is causing the bug. |
I am testing the hypothesis that the small discrepancies come from using |
Actually not all the discrepancies are small, so maybe there's something else. |
Implementing this feature without introducing discrepancies seems to be very difficult, and I am not sure that I will have time to work on that on the foreseeable future. Since the priority of this feature is very low, I will close the PR. |
This PR mirrors what was done for ImpactX in ECP-WarpX/impactx#493 by @ax3l