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

ORANGE: implement distance-to-boundary calculation #335

Merged
merged 6 commits into from Jan 4, 2022

Conversation

sethrj
Copy link
Member

@sethrj sethrj commented Jan 3, 2022

This implements distance-to-boundary calculations for single universes. There are two algorithms for finding the nearest surface crossing. The first is the "simple" one, where crossing any boundary exits the volume. In that case, the closest nonzero distance points to the target surface. The second "complex" algorithm effectively tracks through the internal surfaces in order (by sorting) until outside the volume. Unlike the CPU implementation of ORANGE in SCALE, this implementation sorts surfaces using an intermediate indirection array of face IDs.

We should consider as an optimization the option of specifying a "maximum" intersection distance, allowing us to reduce the number of surfaces considered in the sort and in the boundary crossing.

@sethrj sethrj added enhancement New feature or request geometry labels Jan 3, 2022
@sethrj sethrj requested a review from paulromano January 3, 2022 21:15
@sethrj sethrj mentioned this pull request Jan 3, 2022
Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

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

Nice work! Just a few small comments

src/orange/universes/detail/Types.hh Show resolved Hide resolved
src/orange/universes/detail/Types.hh Outdated Show resolved Hide resolved
src/orange/universes/SimpleUnitTracker.hh Outdated Show resolved Hide resolved
src/orange/universes/detail/Utils.hh Outdated Show resolved Hide resolved
test/orange/universes/SimpleUnitTracker.test.cc Outdated Show resolved Hide resolved
test/orange/universes/SimpleUnitTracker.test.cu Outdated Show resolved Hide resolved
@sethrj sethrj requested a review from paulromano January 4, 2022 16:16
@sethrj
Copy link
Member Author

sethrj commented Jan 4, 2022

Thanks @paulromano !

@sethrj sethrj merged commit 683ac61 into celeritas-project:master Jan 4, 2022
@sethrj sethrj deleted the orange-distance branch January 4, 2022 19:14
@sethrj sethrj mentioned this pull request Jan 4, 2022
9 tasks
@sethrj sethrj added orange Work on ORANGE geometry engine and removed geometry labels Feb 18, 2023
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.

None yet

2 participants