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

Move the code for searching particles/cells into a separate utility class #234

Merged
merged 17 commits into from
Jan 13, 2025

Conversation

petercamps
Copy link
Contributor

Description
The classes ParticleSnapshot, CellSnapshot, and TetraMeshSpatialGrid each contained a customized variation of the code for creating and using a search data structure that can efficiently find particles/cells overlapping a given position or ray (half-line). With this update, this code has been unified, streamlined and moved into a separate utility class called BoxSearch.

Motivation
Reducing code duplication benefits maintainability. Moreover, this functionality is now easily available for other (future) classes that may need it.

Tests
All functional tests work unchanged (binary compatible). Search performance for the tested larger models is similar to that in the previous version of the code.

@petercamps petercamps merged commit de7b2e2 into SKIRT:master Jan 13, 2025
6 checks passed
@petercamps petercamps deleted the blocksearch branch January 13, 2025 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant