Skip to content

A few improvements related to the Model class - #2465

Merged
jtramm merged 4 commits into
openmc-dev:developfrom
paulromano:model-fixes
Apr 12, 2023
Merged

jtramm merged 4 commits into
openmc-dev:developfrom
paulromano:model-fixes

Conversation

@paulromano

Copy link
Copy Markdown
Contributor

This PR makes a few small improvements related to the openmc.Model class:

  • When calling mode.run, you can now pass keyword arguments on to export_to_xml or export_to_model_xml, which importantly allows you to call model.run(remove_surfs=True), which was not possible before.
  • When no <plots> are present in a model.xml file, OpenMC will now look for a plots.xml file. This closes plot_inline function doesn't work well when using model.xml #2446.
  • Updated an error message regarding missing settings.xml which might be a little confusing (if you are using model.xml, it doesn't matter that you're missing settings.xml)

@jtramm jtramm 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.

This seems like a good way of fixing the issue. The keyword arguments when exporting to XML seem useful as well.

LGTM!

@jtramm
jtramm merged commit f7c2961 into openmc-dev:develop Apr 12, 2023
@paulromano
paulromano deleted the model-fixes branch April 13, 2023 12:25
apingegno pushed a commit to apingegno/openmc that referenced this pull request May 7, 2026
A few improvements related to the Model class
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.

plot_inline function doesn't work well when using model.xml

2 participants