-
Notifications
You must be signed in to change notification settings - Fork 192
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 a bug at roundoff error in block_logical_coords #4510
Fix a bug at roundoff error in block_logical_coords #4510
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.
please add a test that would fail/pass before/after this change
Should this bug be fixed in Frustrum instead? (That is, should Frustrum be changed to never return logical coords outside of [-1,1]? ). I worry that this change ignores #3913 and similar places where we assume logical coords are 1.0 and/or -1.0 on the boundary. Or maybe #3913 and other places need to account for roundoff differently. |
Many map inverses currently return values outside -1,1. Yea, maybe we should require all maps to ensure they return only values within their range. That's a lot of work though and needs to be tested thoroughly. Not all maps inverses return logical coords either, right? I haven't made up my mind on what's the best way to handle this. |
|
This bug appeared when interpolating between two BBH domains with bulged frustums. Points at inner frustum edges were not mapped to the source domain because the frustum inverse reports logical coordinates outside [-1, 1] by roundoff error.
ea0e224
to
3a4e693
Compare
This is now ready to review for whoever wants to @kidder @markscheel @nilsdeppe @wthrowe |
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
This bug appeared when interpolating between two BBH domains with bulged frustums. Points at inner frustum edges were not mapped to the source domain because the frustum inverse reports logical coordinates outside [-1, 1] by roundoff error.
Proposed changes
Upgrade instructions
Code review checklist
make doc
to generate the documentation locally intoBUILD_DIR/docs/html
.Then open
index.html
.code review guide.
bugfix
ornew feature
if appropriate.Further comments