Skip to content

Enabling MCPL source files to be read when using surf_source_read - #3472

Merged
paulromano merged 4 commits into
openmc-dev:developfrom
JoffreyDorville:surf_source_read_mcpl
Jul 18, 2025
Merged

paulromano merged 4 commits into
openmc-dev:developfrom
JoffreyDorville:surf_source_read_mcpl

Conversation

@JoffreyDorville

@JoffreyDorville JoffreyDorville commented Jun 26, 2025 •

Copy link
Copy Markdown
Contributor

Description

When using surf_source_read from the settings with MCPL files, OpenMC fails and complains about not being able to read it as a HDF5 file. One easy way to avoid this error was to use a openmc.FileSource object and pass it as a settings.source instead.

This PR enables source files in MCPL format to be read when using surf_source_read.

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 for the fix @JoffreyDorville!

@paulromano
paulromano enabled auto-merge (squash) July 18, 2025 06:33
@paulromano
paulromano merged commit 659e43a into openmc-dev:develop Jul 18, 2025
apingegno pushed a commit to apingegno/openmc that referenced this pull request May 7, 2026
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