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

Adding missing origin to CylindricalMesh.from_domain #2676

Conversation

shimwell
Copy link
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)

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.

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
Copy link
Member Author

shimwell commented Sep 4, 2023

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>
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