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

Extend BIH capabilities for intersection operations #1479

Merged
merged 15 commits into from
Dec 10, 2024

Conversation

elliottbiondo
Copy link
Contributor

@elliottbiondo elliottbiondo commented Nov 2, 2024

This MR creates the BIHIntersectingVolFinder class which is used to find the surface that a ray intersects with first, and the corresponding distance to this surface. This is done using a traversal strategy that is distinct from BIHEnclosingVolFinder, as is documented in their respective top-level doc strings. In a subsequent MR, this will be "hooked up" for use in background volumes.

@elliottbiondo elliottbiondo marked this pull request as draft November 2, 2024 00:31
Copy link

github-actions bot commented Nov 2, 2024

Test summary

 3 901 files   6 012 suites   4m 13s ⏱️
 1 617 tests  1 588 ✅ 29 💤 0 ❌
20 000 runs  19 925 ✅ 75 💤 0 ❌

Results for commit acc261d.

♻️ This comment has been updated with latest results.

@elliottbiondo elliottbiondo force-pushed the bih_intersect3 branch 3 times, most recently from ed047f4 to c768aa4 Compare November 5, 2024 19:38
@elliottbiondo elliottbiondo changed the title Use BIH to calculate intersections Extend BIH capabilities for intersection operations Nov 6, 2024
@elliottbiondo elliottbiondo requested a review from sethrj November 6, 2024 19:41
@elliottbiondo elliottbiondo added orange Work on ORANGE geometry engine enhancement New feature or request labels Nov 6, 2024
@elliottbiondo
Copy link
Contributor Author

@sethrj this is ready. Probably better to review this one first, then I will do the vol_id + others one.

@sethrj sethrj marked this pull request as ready for review November 6, 2024 22:57
Copy link
Member

@sethrj sethrj left a comment

Choose a reason for hiding this comment

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

Still working on this, but gotta take the day off and here's what I have so far.

src/orange/detail/BIHIntersectingVolFinder.hh Show resolved Hide resolved
src/orange/detail/BIHIntersectingVolFinder.hh Show resolved Hide resolved
src/orange/detail/BIHIntersectingVolFinder.hh Show resolved Hide resolved
src/orange/detail/BIHIntersectingVolFinder.hh Outdated Show resolved Hide resolved
Copy link
Member

@sethrj sethrj left a comment

Choose a reason for hiding this comment

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

One final comment is to consider whether it would be better to split this class into class BihIntersectFinder and template<class F> class BihIntersectingVolFinder, which I think would have a more sensible interface. (If we do that we should also add a note in BIHEnclosingVolFinder that we could update its interface in the future since I know that's what we based this on.)

src/orange/detail/BIHIntersectingVolFinder.hh Outdated Show resolved Hide resolved
src/orange/detail/BIHIntersectingVolFinder.hh Outdated Show resolved Hide resolved
@elliottbiondo
Copy link
Contributor Author

@sethrj this is ready for another look.

I don't understand what you mean by splitting this into class BihIntersectFinder and template<class F> class BihIntersectingVolFinder. I don't think there will ever be any other form of BihIntersectFinder other than the volume version.

@sethrj
Copy link
Member

sethrj commented Dec 6, 2024

I don't understand what you mean by splitting this into class BihIntersectFinder and template<class F> class BihIntersectingVolFinder. I don't think there will ever be any other form of BihIntersectFinder other than the volume version.

I just mean this as an implementation detail: half the functions are templated on F (which is probably better as a class template parameter) and the other half aren't (so they probably shouldn't be part of a templated class). One solution would be to move the non-templated to an "implementation base class" and then template the class on F.

Copy link
Member

@sethrj sethrj left a comment

Choose a reason for hiding this comment

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

Looks good after you add the last min_dist and change double to real_type. Thanks!

src/orange/detail/BIHIntersectingVolFinder.hh Show resolved Hide resolved
src/orange/detail/BIHIntersectingVolFinder.hh Outdated Show resolved Hide resolved
src/orange/detail/BIHIntersectingVolFinder.hh Outdated Show resolved Hide resolved
@sethrj sethrj enabled auto-merge (squash) December 10, 2024 01:37
@sethrj sethrj merged commit 881c236 into celeritas-project:develop Dec 10, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request orange Work on ORANGE geometry engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants