-
Notifications
You must be signed in to change notification settings - Fork 213
Add ElementSearchTree, use to speed up PointwiseInterpolator #6571
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
Add ElementSearchTree, use to speed up PointwiseInterpolator #6571
Conversation
0c70901 to
8269482
Compare
| #include "DataStructures/Tensor/Tensor.hpp" | ||
| #include "Domain/Structure/ElementId.hpp" | ||
|
|
||
| namespace bg = boost::geometry; |
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 in the global namespace in a header. It should have a more descriptive name to avoid conflicts. Or just remove it since it's only used 6 times.
| const auto& block_search_tree = block_search_tree_it->second; | ||
| const auto found_element_id = block_search_tree.qbegin( | ||
| boost::geometry::index::contains(block_logical_coords.data)); | ||
| boost::geometry::index::covers(block_logical_coords.data)); |
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.
Is this a bug in the previous commit? Fix it there.
8269482 to
260d1e5
Compare
|
Pushed updates, including some benchmarks (the search tree seems to eliminate almost all overhead from having high h-refinement). I omitted the single-precision commit for now (will push to a separate PR). |
ec3935a to
5b38909
Compare
|
I'm happy with the changes. My comments are addressed. Thank you! |
Allows to elide allocation of a DataVector sometimes.
Can't use destructive_resize when working with DataVector because it doesn't preserve the leading elements when shrinking the size.
5b38909 to
9c49fa7
Compare
|
@wthrowe did you want to look at this again before we merge it? |
|
Yes. |
Proposed changes
Uses a
boost::geometric::index::rtreeto speed up repeated interpolation to single points. This speeds up ray tracing through volume data by about a factor of 3.Upgrade instructions
Code review checklist
make docto generate the documentation locally intoBUILD_DIR/docs/html.Then open
index.html.code review guide.
bugfixornew featureif appropriate.Further comments