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
Colorize hyper rectangle with simplices #16713
Colorize hyper rectangle with simplices #16713
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.
/rebuild
source/grid/grid_generator.cc
Outdated
double epsilon = 10; | ||
for (unsigned int i = 0; i < dim; ++i) | ||
epsilon = std::min(epsilon, | ||
0.01 * (std::abs(p2[i] - p1[i]) / repetitions[i])); |
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 is not the right way to approach this. p2[i] - p1[i]
is a quantity that depends on the magnitude of the points chosen as inputs, so it has physical units. But eps=10
does not. You need to start with an eps that has the right order of magnitude. Alternatively, you could start with eps=infinity
, i.e., eps=std::numeric_limits<double>::max()
.
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 agree. I'll use the numeric limits and update subdivided_hyper_rectangle()
(without simplicies), too.
4cc6a55
to
ab2c3d5
Compare
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 for the fix, and thanks to @bangerth for noticing!
This looks right now. Thank you! It would be nice to have a test that checks this. Do you know how to clone existing tests and add those? |
5280e54
to
13bd970
Compare
No description provided.