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

Source / Independent Source #14

Open
cfichtlscherer opened this issue Aug 20, 2023 · 1 comment
Open

Source / Independent Source #14

cfichtlscherer opened this issue Aug 20, 2023 · 1 comment

Comments

@cfichtlscherer
Copy link

Hey Julien,

In OpenMC Source has been renamed to IndependentSource, this is not yet part of OpenMC 0.13.3, but already in the developement branch and will be part of OpenMC 0.13.4. So it should be updated, I think.

Compare: openmc-dev/openmc#1706

Simply changing Source to IndependentSource worked for me.

Not sure whats the best strategy to enable users with different OpenMC versions to run ONIX.

@cfichtlscherer
Copy link
Author

Maybe you could add something like:

if openmc.__version__ > 0.13.3:
     .... IndependentSource ....
else:
    ..... Source ....

An alternative would be using try: and except AttributeError:

I hope this helps a bit 😃

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

No branches or pull requests

1 participant