mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Check for macroscopic data in materials when running Universe.plot
This commit is contained in:
parent
8a6dc7e9f8
commit
8965dd1e66
1 changed files with 7 additions and 0 deletions
|
|
@ -334,6 +334,13 @@ class Universe(UniverseBase):
|
|||
if seed is not None:
|
||||
model.settings.seed = seed
|
||||
|
||||
# Determine whether any materials contains macroscopic data and if
|
||||
# so, set energy mode accordingly
|
||||
for mat in self.get_all_materials().values():
|
||||
if mat._macroscopic is not None:
|
||||
model.settings.energy_mode = 'multi-group'
|
||||
break
|
||||
|
||||
# Create plot object matching passed arguments
|
||||
plot = openmc.Plot()
|
||||
plot.origin = origin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue