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

Support UnstructuredMesh for IndependentSource #2949

Merged
merged 19 commits into from
Apr 12, 2024

Conversation

pshriwise
Copy link
Contributor

@pshriwise pshriwise commented Apr 9, 2024

Description

This PR contains a fix in source.py that allows for application of the UnstructuredMesh class in a MeshSource object. It also has some quality-of-life updates for the UnstrucutredMesh class:

  • a decorator for properties of the class that require information loaded from a statepoint file
  • addition of the indices property to the UnstructuredMesh class and as an abstract property to the MeshBase class.
  • a test that an unstructured mesh class can be applied in a MeshSource

Partially Fixes #2929 -- I'll be creating a follow-on PR to support addition of the statepoint properties from the Python API next.

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)

@shimwell
Copy link
Member

shimwell commented Apr 9, 2024

Many thanks Patrick, I can give this go and feedback.

Co-authored-by: Jonathan Shimwell <[email protected]>
@shimwell
Copy link
Member

shimwell commented Apr 9, 2024

Just been making use of this branch, it successfully produced a mesh source on an unstructured mesh.

Tagging @rlbarker for your interest

I used this python script, attached .h5m file and produced a nice html plot of the result.
meshsource.zip

@shimwell
Copy link
Member

shimwell commented Apr 9, 2024

This all looks good @pshriwise and it works nicely over here. The only part I don't quite get is why are the indices a list of tuples instead of a plain old list

@shimwell
Copy link
Member

Thanks for explaining that tuple use. All looks good here to me. Shall we leave it open for a few days in case other comments come in.

Copy link
Member

@shimwell shimwell left a comment

Choose a reason for hiding this comment

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

We can merge this Friday evening (UK time) unless there are an objections or further comments.

@shimwell shimwell added the Merging Soon PR will be merged in < 24 hrs if no further comments are made. label Apr 11, 2024
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.

@pshriwise I made a few little renaming changes -- hope you don't mind! One request that I couldn't handle directly:

openmc/mesh.py Outdated Show resolved Hide resolved
@paulromano paulromano merged commit e77a524 into openmc-dev:develop Apr 12, 2024
18 checks passed
church89 pushed a commit to openmsr/openmc that referenced this pull request Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merging Soon PR will be merged in < 24 hrs if no further comments are made.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

get UnstructuredMesh centroids and volumes without loading from statepoint
3 participants