Skip to content

add export_model_xml arguments to Model.plot_geometry and Model.calculate_volumes - #3190

Merged
paulromano merged 2 commits into
openmc-dev:developfrom
nplinden:model_xml
Nov 9, 2024
Merged

paulromano merged 2 commits into
openmc-dev:developfrom
nplinden:model_xml

Conversation

@nplinden

@nplinden nplinden commented Nov 8, 2024 •

Copy link
Copy Markdown
Contributor

Description

This adds an export_model_xml argument to Model.plot_geometry and Model.calculate_volumes, for coherence with the Model.run method.

The implementation mimics that of Model.run and the new argument defaults to True.

Previously running these methods in the same script resulted in populating the working directory with model.xml as well as the geometry/materials/settings/plots/tallies.xml, making things ambiguous.

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)

@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 @nplinden! I made one small update to ensure that if you pass path='other_name.xml', it gets passed to plot_geomtery and calculate_volumes accordingly.

@paulromano
paulromano enabled auto-merge (squash) November 9, 2024 17:05
@paulromano
paulromano merged commit c05132c into openmc-dev:develop Nov 9, 2024
magnoxemo pushed a commit to magnoxemo/openmc that referenced this pull request Nov 22, 2024
…late_volumes (openmc-dev#3190)

Co-authored-by: Nicolas Linden <n.linde@naarea.fr>
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
…late_volumes (openmc-dev#3190)

Co-authored-by: Nicolas Linden <n.linde@naarea.fr>
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