Skip to content

Adding missing origin to CylindricalMesh.from_domain - #2676

Merged
shimwell merged 3 commits into
openmc-dev:developfrom
shimwell:adding_missing_origin_to_cymesh_from_domain
Sep 4, 2023
Merged

shimwell merged 3 commits into
openmc-dev:developfrom
shimwell:adding_missing_origin_to_cymesh_from_domain

Conversation

@shimwell

Copy link
Copy Markdown
Member

Description

While making cylindrical meshes from a domain I noticed the mesh was not fitting the geometry correctly in the Z direction. After digging into the code I noticed that the origin was not set and therefore defaulting to 0,0,0. My geometry starts on the zplane=0 and goes upwards. Anyway this PR now sets the origin to the center of the bounding box.

Fixes # (issue)

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format 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)

@paulromano paulromano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the fix @shimwell! I realized that the documentation for z_grid was confusing in that it didn't mention that it is relative to the origin, so I just added a commit here on your branch updating that. Hope you don't mind! 😄

@shimwell

shimwell commented Sep 4, 2023

Copy link
Copy Markdown
Member Author

As this is a small PR and it has been approved a few days ago I think this one can be merged

@shimwell
shimwell merged commit 2de2023 into openmc-dev:develop Sep 4, 2023
stchaker pushed a commit to stchaker/openmc that referenced this pull request Oct 25, 2023
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
apingegno pushed a commit to apingegno/openmc that referenced this pull request May 7, 2026
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
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