avoid need to set particles and batches for dagmc models when calling convert_to_multigroup#3801
Merged
pshriwise merged 10 commits intoopenmc-dev:developfrom Feb 18, 2026
Merged
Conversation
Ensure all materials have a valid name for HDF5 dataset.
Contributor
|
One alternative might be to initialize OpenMC in a non-transport mode when synchronizing DAGMC universes |
Member
Author
|
Thanks for the suggestion @pshriwise I've had a go at implementing the transport free option and also added a test. |
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
Contributor
|
note to self CI is failing with |
Contributor
Hrmmm yeah it seems we allow only a subset of command line arguments to go through to the |
GuySten
requested changes
Feb 15, 2026
Co-authored-by: GuySten <62616591+GuySten@users.noreply.github.com>
Reset auto IDs before creating material in the test.
GuySten
approved these changes
Feb 15, 2026
Member
Author
|
Thanks for fixing this @GuySten and in particular getting the CI passing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
If we call convert_to_multigroup with a dagmc model currently and the settings have no particles or batches then it fails validation.
IMO we shouldn't need to set particles or batches before calling convert_to_multigroup as convert_to_multigroup has an argument for nparticles and decides internally the batches particles split.
This PR just sets the batches and particles to a valid, this will help it pass validation but it does not actually get used in simulation
If we ask user to set particles and batches on the model.settings then this could be a bit confusing as they are not used by convert_to_multigroup
What do people think is this an acceptable hack?
Fixes # (issue)
Checklist