Skip to content

Read additional information for DAGMC cells from openmc.lib #3401

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

pshriwise
Copy link
Contributor

…penmc.lib

Description

This PR adds temperature reading (no overrides... yet) to DAGMC universes and bounding box information from openmc.lib. The latter may be useful for efficient sampling of volumetric sources over a given cell.

As described in #3398, it also

  • sets DAGMCCell IDs as int instead of np.int32 for consistency.
  • changes DAGMCCell.bounding_box from a method to a property.

Fixes #3398

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)

@pshriwise
Copy link
Contributor Author

On second thought, I don't think populating the DAGMCCell's with bounding boxes is such a good ideal. I'd forgotten that the bounding boxes coming from the DAGMC C++ API are really oriented boxes at the top of the BVH that have been re-oriented to be axis-aligned and, while valid, it makes them extremely conservative/very loosely fitting.

def bounding_box(self):
return BoundingBox.infinite()

@openmc.Cell.temperature.setter
def temperature(self, val):
warnings.warn('Changes to temperatures on DAGMCCell\'s will not be reflected in transport')
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps this reads better than using the \

Suggested change
warnings.warn('Changes to temperatures on DAGMCCell\'s will not be reflected in transport')
warnings.warn("Changes to temperatures on DAGMCCell's will not be reflected in transport")

@shimwell
Copy link
Member

On second thought, I don't think populating the DAGMCCell's with bounding boxes is such a good ideal. I'd forgotten that the bounding boxes coming from the DAGMC C++ API are really oriented boxes at the top of the BVH that have been re-oriented to be axis-aligned and, while valid, it makes them extremely conservative/very loosely fitting.

Is this PR something we want to go ahead with

Should we remove the ability to read the DAGMC bounding box but keep these two parts of the PR

  • sets DAGMCCell IDs as int instead of np.int32 for consistency.
  • changes DAGMCCell.bounding_box from a method to a property.

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.

DAGMC Universe Sync Updates
2 participants