Skip to content
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

Make the tolerance in step-1 relative. #10923

Merged
merged 1 commit into from Sep 17, 2020
Merged

Make the tolerance in step-1 relative. #10923

merged 1 commit into from Sep 17, 2020

Conversation

bangerth
Copy link
Member

No description provided.

@bangerth
Copy link
Member Author

/rebuild

Copy link
Member

@tjhei tjhei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Just some minor comments.

// [round-off](https://en.wikipedia.org/wiki/Round-off_error). As
// a consequence, we can never expect to compare the distance
// with the inner radius by equality: A statement such as
// `if (distance_from_center == inner_radius)` will always fail
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// `if (distance_from_center == inner_radius)` will always fail
// `if (distance_from_center == inner_radius)` will fail

// unless we get exceptionally lucky. Rather, we need to do this
// comparison with a certain tolerance, and the usual way to do
// this is to write it as `if (std::abs(distance_from_center -
// inner_radius)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove newline?

@bangerth
Copy link
Member Author

@tjhei -- so done!

@drwells drwells merged commit 8a1ab8b into dealii:master Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants