Skip to content

Conversation

@nilsvu
Copy link
Member

@nilsvu nilsvu commented Apr 11, 2025

Proposed changes

Uses a boost::geometric::index::rtree to 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

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Further comments

@nilsvu nilsvu requested a review from wthrowe April 11, 2025 18:16
@nilsvu nilsvu force-pushed the element_search_tree branch 3 times, most recently from 0c70901 to 8269482 Compare April 14, 2025 16:54
#include "DataStructures/Tensor/Tensor.hpp"
#include "Domain/Structure/ElementId.hpp"

namespace bg = boost::geometry;
Copy link
Member

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));
Copy link
Member

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.

@nilsvu nilsvu force-pushed the element_search_tree branch from 8269482 to 260d1e5 Compare May 8, 2025 01:20
@nilsvu
Copy link
Member Author

nilsvu commented May 8, 2025

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).

@nilsvu nilsvu force-pushed the element_search_tree branch 2 times, most recently from ec3935a to 5b38909 Compare May 8, 2025 18:25
@nilsvu nilsvu requested review from nilsdeppe and wthrowe May 8, 2025 22:13
@nilsdeppe
Copy link
Member

I'm happy with the changes. My comments are addressed. Thank you!

@nilsvu nilsvu force-pushed the element_search_tree branch from 5b38909 to 9c49fa7 Compare May 10, 2025 00:23
@nilsvu
Copy link
Member Author

nilsvu commented May 12, 2025

@wthrowe did you want to look at this again before we merge it?

@wthrowe
Copy link
Member

wthrowe commented May 12, 2025

Yes.

@wthrowe wthrowe merged commit 476368b into sxs-collaboration:develop May 12, 2025
24 checks passed
@nilsvu nilsvu deleted the element_search_tree branch June 1, 2025 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants