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

DAGMC Test via Python Interface #1119

Merged
merged 13 commits into from
Nov 12, 2018

Conversation

pshriwise
Copy link
Contributor

This adds a test for DAGMC with a model setup using the Python interface.

The only external change needed was a check during model export to determine if it uses a DAGMC geometry - in which case no geometry.xml file is created.

This was to avoid having to spoof a universe for the OpenMC geometry like this.

@pshriwise
Copy link
Contributor Author

pshriwise commented Nov 8, 2018

Oops, one more is in here too. The dagmc attribute of the Python settings class has been updated so it is always a Boolean, rather than being set to None by default.

Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! We don't really need a separate dagmc_xml test though, so I'd suggest just having this test be the sole dagmc test in regression_tests/dagmc/

@paulromano
Copy link
Contributor

Can you remove the extra dagmc_py subdirectory and have test.py and the results directly in regression_tests/dagmc/?

@pshriwise
Copy link
Contributor Author

@paulromano for sure. Error in the directory move. Thanks!

mats = openmc.Materials([u235, water])
model.materials = mats

harness = HashedPyAPITestHarness('statepoint.5.h5', model=model)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's stick with PyAPITestHarness so the results don't get hashed (we generally only use that if the results file would be huge). Sorry, last request, I promise!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha no worries! That makes sense. Updating...

@paulromano paulromano merged commit bde1203 into openmc-dev:develop Nov 12, 2018
@pshriwise pshriwise deleted the add_dagmc_py_test branch November 17, 2018 01:36
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