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

Prepare point query data structures on meshes when applying Weight Windows #3157

Merged
merged 8 commits into from
Oct 5, 2024

Conversation

pshriwise
Copy link
Contributor

Description

#2815 ensured that creation of spatial data structures for the Mesh objects (only affecting unstructured mesh) only occurs if the mesh is being used in tally operations. This skips the build of spatial data structures (kdTree for MOAB and Octree for LibMesh) when unstructured meshes are used for sources, providing a big speedup in initialization time.

One use case where these data structures are important outside of tallying is the application of weight windows on unstructured mesh -- point location is required there, but the data structures aren't currently built in this case. This PR adds that call in the WeightWindows::set_mesh method and applies that method in the XML node constructor for the object.

It also removes the requirement that energy bounds are specified on the XML node. There is code in place to set the default bounds of the weight windows to the min/max energies for the particle type to which the weight windows apply. That code is now exercised when energy bounds are absent as intended.

A test has been added that runs a problem with dummy weight windows applied to one of the unstructured meshes in the test suite to ensure that this capability runs without error.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

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.

Looks good to me, thanks @pshriwise! I'll merge tomorrow if there are no further comments.

@paulromano paulromano merged commit 9070b8b into openmc-dev:develop Oct 5, 2024
16 checks passed
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.

2 participants