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

Add test for plotting with DAGMCUniverse.plot #3139

Open
pshriwise opened this issue Sep 23, 2024 · 2 comments
Open

Add test for plotting with DAGMCUniverse.plot #3139

pshriwise opened this issue Sep 23, 2024 · 2 comments

Comments

@pshriwise
Copy link
Contributor

Description

Add a test for plotting a DAGMC universe with the Python API Universe.plot method.

@paulromano
Copy link
Contributor

...which would fail currently. The problem is that the way we currently do this under the hood is by creating a model with a geometry based on that universe, but what is missing on the model are the materials corresponding to the DAGMC cells. Unfortunately, the same problem occurs on Geometry.plot and Model.plot. In principle Model.plot could work because the Model has the material information, but right now it just defaults to calling Geometry.plot which calls Universe.plot.

A partial solution is to move the main plotting logic to Model.plot, which could then be called by Geometry.plot and Universe.plot instead of the other way around. This doesn't solve the problem of missing materials for Geometry.plot and Universe.plot but at least Model.plot would work for a DAGMC model then.

@pshriwise
Copy link
Contributor Author

Ah, too true. I was getting a little ahead of myself here.

In principle, once #3056 is complete we could make DAGMCUniverse.plot viable when the DAGMCCell information has been populated by openmc.lib... and we should add a test for it once enabled 😄. This does currently require a Model object to exist however, so maybe it's a moot point in the end. At the very least it would allow the logic for plotting to remain where it is for the time being.

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

2 participants