-
Notifications
You must be signed in to change notification settings - Fork 37
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
Bugfix: Resymmetrize logical coordinates #1098
Bugfix: Resymmetrize logical coordinates #1098
Conversation
…6/refactor-mesh-constructors
…6/refactor-mesh-constructors
…6/refactor-mesh-constructors
…6/refactor-mesh-constructors
…tor-mesh-constructors
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.
Round-off error strikes again! Happy to approve assuming that it fixes @pgrete's issue. Also, I'd like to understand why this only affects SMR? Shouldn't this have affected symmetry more generally?
It also effects the coordinates of blocks at roundoff, but I don't think this is as big of an issue as the impact on SMR (where the refinement structure was different in some cases with the exact same input). That being said, it probably broke exact symmetry (if it ever existed in any downstream code). |
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.
LGTM. I also like the new names better.
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.
LGTM and I can confirm that this results in the expected mesh again (though other issue still persist with restarts, but I'll track those down separately).
I suggest to wait clicking merge on this PR until #1055 is in develop
, then change the target branch and pull the trigger here.
This way we get a clean history (which may at some point be useful for bisects)
…bugfix-symmetrized-coordinates
PR Summary
Originally, Athena++ transformed integer logical coordinates into floating point logical coordinates in the range [-0.5, 0.5]. In #911, I changed this to map to the range [0, 1]. As @pgrete has pointed out, the new range breaks floating point symmetry (see the comment at the end of this athena++ document at the very bottom). This in turn causes static mesh refinement to operate differently due to roundoff error and block coordinates to not be bitwise exact with the original coordinate positions for single tree forests. This PR switches back to symmetrized floating-point logical coordinates and back to the exact algorithm used for finding static refinement regions from before #911.
PR Checklist