mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Address a few more @wbinventor comments. Fix Jupyter notebooks.
This commit is contained in:
parent
7ca46e809c
commit
e40c89b34f
5 changed files with 199 additions and 194 deletions
|
|
@ -332,7 +332,7 @@
|
|||
"outputs": [],
|
||||
"source": [
|
||||
"# Extract all Cells filled by Materials\n",
|
||||
"openmc_cells = openmc_geometry.get_all_material_cells()\n",
|
||||
"openmc_cells = openmc_geometry.get_all_material_cells().values()\n",
|
||||
"\n",
|
||||
"# Create dictionary to store multi-group cross sections for all cells\n",
|
||||
"xs_library = {}\n",
|
||||
|
|
|
|||
|
|
@ -594,7 +594,7 @@
|
|||
"mgxs_lib.domain_type = 'cell'\n",
|
||||
"\n",
|
||||
"# Specify the cell domains over which to compute multi-group cross sections\n",
|
||||
"mgxs_lib.domains = geometry.get_all_material_cells()"
|
||||
"mgxs_lib.domains = geometry.get_all_material_cells().values()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -743,8 +743,8 @@
|
|||
" Copyright | 2011-2017 Massachusetts Institute of Technology\n",
|
||||
" License | http://openmc.readthedocs.io/en/latest/license.html\n",
|
||||
" Version | 0.8.0\n",
|
||||
" Git SHA1 | dfc6f1d9bf1b31fc94dad1cb30bd672b25f47e04\n",
|
||||
" Date/Time | 2017-02-21 15:11:55\n",
|
||||
" Git SHA1 | 7ca46e809ce01fe7857ae36072822a1718f01aaf\n",
|
||||
" Date/Time | 2017-02-23 09:36:51\n",
|
||||
" OpenMP Threads | 4\n",
|
||||
"\n",
|
||||
" ===========================================================================\n",
|
||||
|
|
@ -831,20 +831,20 @@
|
|||
"\n",
|
||||
" =======================> TIMING STATISTICS <=======================\n",
|
||||
"\n",
|
||||
" Total time for initialization = 5.2287E-01 seconds\n",
|
||||
" Reading cross sections = 3.5267E-01 seconds\n",
|
||||
" Total time in simulation = 1.3331E+01 seconds\n",
|
||||
" Time in transport only = 1.3109E+01 seconds\n",
|
||||
" Time in inactive batches = 9.4551E-01 seconds\n",
|
||||
" Time in active batches = 1.2385E+01 seconds\n",
|
||||
" Time synchronizing fission bank = 3.8467E-03 seconds\n",
|
||||
" Sampling source sites = 2.5076E-03 seconds\n",
|
||||
" SEND/RECV source sites = 1.2758E-03 seconds\n",
|
||||
" Time accumulating tallies = 7.0302E-04 seconds\n",
|
||||
" Total time for finalization = 1.5000E-05 seconds\n",
|
||||
" Total time elapsed = 1.3863E+01 seconds\n",
|
||||
" Calculation Rate (inactive) = 26440.9 neutrons/second\n",
|
||||
" Calculation Rate (active) = 8074.24 neutrons/second\n",
|
||||
" Total time for initialization = 4.2238E-01 seconds\n",
|
||||
" Reading cross sections = 3.1986E-01 seconds\n",
|
||||
" Total time in simulation = 1.3628E+01 seconds\n",
|
||||
" Time in transport only = 1.3342E+01 seconds\n",
|
||||
" Time in inactive batches = 1.1012E+00 seconds\n",
|
||||
" Time in active batches = 1.2527E+01 seconds\n",
|
||||
" Time synchronizing fission bank = 3.7750E-03 seconds\n",
|
||||
" Sampling source sites = 2.4760E-03 seconds\n",
|
||||
" SEND/RECV source sites = 1.2253E-03 seconds\n",
|
||||
" Time accumulating tallies = 6.5502E-04 seconds\n",
|
||||
" Total time for finalization = 9.4890E-06 seconds\n",
|
||||
" Total time elapsed = 1.4059E+01 seconds\n",
|
||||
" Calculation Rate (inactive) = 22702.0 neutrons/second\n",
|
||||
" Calculation Rate (active) = 7982.70 neutrons/second\n",
|
||||
"\n",
|
||||
" ============================> RESULTS <============================\n",
|
||||
"\n",
|
||||
|
|
@ -1663,6 +1663,7 @@
|
|||
}
|
||||
],
|
||||
"metadata": {
|
||||
"anaconda-cloud": {},
|
||||
"kernelspec": {
|
||||
"display_name": "Python [default]",
|
||||
"language": "python",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -208,13 +208,16 @@ class Geometry(object):
|
|||
return material_cells
|
||||
|
||||
def get_all_material_universes(self):
|
||||
"""Return all universes having at least one non-fill cell
|
||||
"""Return all universes having at least one material-filled cell.
|
||||
|
||||
This method can be used to find universes that have at least one cell
|
||||
that is filled with a material or is void.
|
||||
|
||||
Returns
|
||||
-------
|
||||
collections.OrderedDict
|
||||
Dictionary mapping universe IDs to :class:`openmc.Universe`
|
||||
instances with non-fill cells
|
||||
instances with at least one material-filled cell
|
||||
|
||||
"""
|
||||
material_universes = OrderedDict()
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import os
|
|||
import copy
|
||||
import pickle
|
||||
from numbers import Integral
|
||||
from collections import OrderedDict
|
||||
from collections import OrderedDict, Iterable
|
||||
from warnings import warn
|
||||
|
||||
from six import string_types
|
||||
|
|
@ -315,16 +315,16 @@ class Library(object):
|
|||
# User specified a list of material, cell or universe domains
|
||||
else:
|
||||
if self.domain_type == 'material':
|
||||
cv.check_iterable_type('domain', domains, openmc.Material)
|
||||
cv.check_type('domain', domains, Iterable, openmc.Material)
|
||||
all_domains = self.geometry.get_all_materials().values()
|
||||
elif self.domain_type in ['cell', 'distribcell']:
|
||||
cv.check_iterable_type('domain', domains, openmc.Cell)
|
||||
cv.check_type('domain', domains, Iterable, openmc.Cell)
|
||||
all_domains = self.geometry.get_all_material_cells().values()
|
||||
elif self.domain_type == 'universe':
|
||||
cv.check_iterable_type('domain', domains, openmc.Universe)
|
||||
cv.check_type('domain', domains, Iterable, openmc.Universe)
|
||||
all_domains = self.geometry.get_all_universes().values()
|
||||
elif self.domain_type == 'mesh':
|
||||
cv.check_iterable_type('domain', domains, openmc.Mesh)
|
||||
cv.check_type('domain', domains, Iterable, openmc.Mesh)
|
||||
|
||||
# The mesh and geometry are independent, so set all_domains
|
||||
# to the input domains
|
||||
|
|
@ -339,7 +339,7 @@ class Library(object):
|
|||
raise ValueError('Domain "{}" could not be found in the '
|
||||
'geometry.'.format(domain))
|
||||
|
||||
self._domains = domains
|
||||
self._domains = list(domains)
|
||||
|
||||
@energy_groups.setter
|
||||
def energy_groups(self, energy_groups):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue