diff --git a/docs/source/io_formats/statepoint.rst b/docs/source/io_formats/statepoint.rst index 8026c258e..cbd916d23 100644 --- a/docs/source/io_formats/statepoint.rst +++ b/docs/source/io_formats/statepoint.rst @@ -19,10 +19,10 @@ The current version of the statepoint file format is 16.0. - **path** (*char[]*) -- Path to directory containing input files. - **cmfd_on** (*int*) -- Flag indicating whether CMFD is on (1) or off (0). - - **tallies_present** (*int*) -- Flag indicating if tallies are - present in the file. - - **source_present** (*int*) -- Flag indicating if source bank is - present in the file. + - **tallies_present** (*int*) -- Flag indicating whether tallies + are present (1) or not (0). + - **source_present** (*int*) -- Flag indicating whether the source + bank is present (1) or not (0). :Datasets: - **seed** (*int8_t*) -- Pseudo-random number generator seed. - **energy_mode** (*char[]*) -- Energy mode of the run, either @@ -79,7 +79,7 @@ The current version of the statepoint file format is 16.0. **/tallies/meshes/** :Attributes: - **n_meshes** (*int*) -- Number of meshes in the problem. - - **ids** (*int[]*) -- User-identified unique ID of each mesh. + - **ids** (*int[]*) -- User-defined unique ID of each mesh. **/tallies/meshes/mesh /** @@ -143,37 +143,32 @@ The current version of the statepoint file format is 16.0. **/runtime/** -:Datasets: - **total initialization** (*double*) -- Time (in seconds on the - master process) spent reading inputs, allocating arrays, etc. - - **reading cross sections** (*double*) -- Time (in seconds on the - master process) spent loading cross section libraries (this is a - subset of initialization). - - **simulation** (*double*) -- Time (in seconds on the master - process) spent between initialization and finalization. - - **transport** (*double*) -- Time (in seconds on the master process) - spent transporting particles. - - **inactive batches** (*double*) -- Time (in seconds on the master - process) spent in the inactive batches (including non-transport - activities like communcating sites). - - **active batches** (*double*) -- Time (in seconds on the master - process) spent in the active batches (including non-transport - activities like communicating sites). - - **synchronizing fission bank** (*double*) -- Time (in seconds on - the master process) spent sampling source particles from fission - sites and communicating them to other processes for load balancing. - - **sampling source sites** (*double*) -- Time (in seconds on the - master process) spent sampling source particles from fission sites. - - **SEND-RECV source sites** (*double*) -- Time (in seconds on the - master process) spent communicating source sites between processes - for load balancing. - - **accumulating tallies** (*double*) -- Time (in seconds on the - master process) spent communicating tally results and evaluating - their statistics. - - **CMFD** (*double*) -- Time (in seconds on the master process) - spent evaluating CMFD. - - **CMFD building matrices** (*double*) -- Time (in seconds on the - master process) spent buliding CMFD matrices. - - **CMFD solving matrices** (*double*) -- Time (in seconds on the - master process) spent solving CMFD matrices. - - **total** (*double*) -- Total time spent (in seconds on the master - process) in the program. +All values are given in seconds and are measured on the master process. + +:Datasets: - **total initialization** (*double*) -- Time spent reading inputs, + allocating arrays, etc. + - **reading cross sections** (*double*) -- Time spent loading cross + section libraries (this is a subset of initialization). + - **simulation** (*double*) -- Time spent between initialization and + finalization. + - **transport** (*double*) -- Time spent transporting particles. + - **inactive batches** (*double*) -- Time spent in the inactive + batches (including non-transport activities like communcating + sites). + - **active batches** (*double*) -- Time spent in the active batches + (including non-transport activities like communicating sites). + - **synchronizing fission bank** (*double*) -- Time spent sampling + source particles from fission sites and communicating them to other + processes for load balancing. + - **sampling source sites** (*double*) -- Time spent sampling source + particles from fission sites. + - **SEND-RECV source sites** (*double*) -- Time spent communicating + source sites between processes for load balancing. + - **accumulating tallies** (*double*) -- Time spent communicating + tally results and evaluating their statistics. + - **CMFD** (*double*) -- Time spent evaluating CMFD. + - **CMFD building matrices** (*double*) -- Time spent buliding CMFD + matrices. + - **CMFD solving matrices** (*double*) -- Time spent solving CMFD + matrices. + - **total** (*double*) -- Total time spent in the program. diff --git a/docs/source/io_formats/summary.rst b/docs/source/io_formats/summary.rst index 671fa3334..f88270549 100644 --- a/docs/source/io_formats/summary.rst +++ b/docs/source/io_formats/summary.rst @@ -27,7 +27,7 @@ The current version of the summary file format is 5.0. **/geometry/cells/cell /** -:Datasets: - **name** (*char[]*) -- Name of the cell. +:Datasets: - **name** (*char[]*) -- User-defined name of the cell. - **universe** (*int*) -- Universe assigned to the cell. If none is specified, the default universe (0) is assigned. - **fill_type** (*char[]*) -- Type of fill for the cell. Can be diff --git a/docs/source/pythonapi/examples/mgxs-part-iii.ipynb b/docs/source/pythonapi/examples/mgxs-part-iii.ipynb index 40e195d65..b76696d7f 100644 --- a/docs/source/pythonapi/examples/mgxs-part-iii.ipynb +++ b/docs/source/pythonapi/examples/mgxs-part-iii.ipynb @@ -1303,7 +1303,7 @@ }, "outputs": [], "source": [ - "# Create an OpenMOC Geometry from the OpenCG Geometry\n", + "# Create an OpenMOC Geometry from an equivalent OpenCG Geometry\n", "opencg_geometry = get_opencg_geometry(mgxs_lib.geometry)\n", "openmoc_geometry = get_openmoc_geometry(opencg_geometry)" ] diff --git a/openmc/checkvalue.py b/openmc/checkvalue.py index 06e524004..aa4dc067f 100644 --- a/openmc/checkvalue.py +++ b/openmc/checkvalue.py @@ -263,9 +263,10 @@ def check_filetype_version(obj, expected_type, expected_version): # Check version if this_version[0] != expected_version: - raise IOError('Statepoint file has a version of {} which is not ' + raise IOError('{} file has a version of {} which is not ' 'consistent with the version expected by OpenMC, {}' - .format('.'.join(this_version), expected_version)) + .format(this_filetype, '.'.join(this_version), + expected_version)) except AttributeError: raise IOError('Could not read {} file. This most likely means the {} ' 'file was produced by a different version of OpenMC than ' diff --git a/openmc/statepoint.py b/openmc/statepoint.py index f29829a41..9c9640885 100644 --- a/openmc/statepoint.py +++ b/openmc/statepoint.py @@ -113,6 +113,7 @@ class StatePoint(object): self._f = h5py.File(filename, 'r') self._meshes = {} self._tallies = {} + self._derivs = {} # Check filetype and version cv.check_filetype_version(self._f, 'statepoint', _VERSION_STATEPOINT) @@ -326,7 +327,7 @@ class StatePoint(object): # Read a list of the IDs for each Tally if n_tallies > 0: - # Tally used-defined IDs + # Tally user-defined IDs tally_ids = tallies_group.attrs['ids'] else: tally_ids = [] @@ -405,11 +406,6 @@ class StatePoint(object): @property def tally_derivatives(self): if not self._derivs_read: - # Initialize dictionaries for the Meshes - # Keys - Derivative IDs - # Values - TallyDerivative objects - self._derivs = {} - # Populate the dictionary if any derivatives are present. if 'derivatives' in self._f['tallies']: # Read the derivative ids. @@ -429,9 +425,6 @@ class StatePoint(object): deriv.nuclide = group['nuclide'].value.decode() elif deriv.variable == 'temperature': deriv.material = group['material'].value - else: - raise ValueError('Unrecognized tally differential ' - 'variable') self._derivs[d_id] = deriv self._derivs_read = True diff --git a/openmc/surface.py b/openmc/surface.py index 193afe310..e7d999b15 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -14,7 +14,7 @@ from openmc.region import Region, Intersection, Union # A static variable for auto-generated Surface IDs AUTO_SURFACE_ID = 10000 -_BC_TYPES = ['transmission', 'vacuum', 'reflective', 'periodic'] +_BOUNDARY_TYPES = ['transmission', 'vacuum', 'reflective', 'periodic'] def reset_auto_surface_id(): @@ -141,7 +141,7 @@ class Surface(object): @boundary_type.setter def boundary_type(self, boundary_type): check_type('boundary type', boundary_type, string_types) - check_value('boundary type', boundary_type, _BC_TYPES) + check_value('boundary type', boundary_type, _BOUNDARY_TYPES) self._boundary_type = boundary_type def bounding_box(self, side): @@ -204,7 +204,7 @@ class Surface(object): surface_id = int(group.name.split('/')[-1].lstrip('surface ')) name = group['name'].value.decode() surf_type = group['type'].value.decode() - bc = group['boundary_condition'].value.decode() + bc = group['boundary_type'].value.decode() coeffs = group['coefficients'][...] # Create the Surface based on its type diff --git a/src/hdf5_interface.F90 b/src/hdf5_interface.F90 index 6ca39e000..3a2582511 100644 --- a/src/hdf5_interface.F90 +++ b/src/hdf5_interface.F90 @@ -2067,7 +2067,7 @@ contains call h5tcopy_f(H5T_C_S1, filetype, hdf5_err) call h5tset_size_f(filetype, n, hdf5_err) - ! Crate memory space and attribute + ! Create memory space and attribute call h5screate_f(H5S_SCALAR_F, dspace_id, hdf5_err) call h5acreate_f(obj_id, trim(name), filetype, dspace_id, & attr_id, hdf5_err) diff --git a/src/initialize.F90 b/src/initialize.F90 index ed1e663fd..be4b0f28a 100644 --- a/src/initialize.F90 +++ b/src/initialize.F90 @@ -13,18 +13,18 @@ module initialize use set_header, only: SetInt use energy_grid, only: logarithmic_grid, grid_method use error, only: fatal_error, warning - use geometry, only: neighbor_lists, count_instance, calc_offsets, & + use geometry, only: neighbor_lists, count_instance, calc_offsets, & maximum_levels use geometry_header, only: Cell, Universe, Lattice, RectLattice, HexLattice,& &BASE_UNIVERSE use global - use hdf5_interface, only: file_open, read_attribute, file_close, & + use hdf5_interface, only: file_open, read_attribute, file_close, & hdf5_bank_t, hdf5_integer8_t use input_xml, only: read_input_xml, cells_in_univ_dict, read_plots_xml use material_header, only: Material use message_passing use mgxs_data, only: read_mgxs, create_macro_xs - use output, only: title, header, print_version, write_message, & + use output, only: title, header, print_version, write_message, & print_usage, print_plot use random_lcg, only: initialize_prng use state_point, only: load_state_point diff --git a/src/summary.F90 b/src/summary.F90 index fa5681052..e6ad6f5d9 100644 --- a/src/summary.F90 +++ b/src/summary.F90 @@ -329,16 +329,16 @@ contains call write_dataset(surface_group, "coefficients", coeffs) deallocate(coeffs) - ! Write boundary condition + ! Write boundary type select case (s%bc) case (BC_TRANSMIT) - call write_dataset(surface_group, "boundary_condition", "transmission") + call write_dataset(surface_group, "boundary_type", "transmission") case (BC_VACUUM) - call write_dataset(surface_group, "boundary_condition", "vacuum") + call write_dataset(surface_group, "boundary_type", "vacuum") case (BC_REFLECT) - call write_dataset(surface_group, "boundary_condition", "reflective") + call write_dataset(surface_group, "boundary_type", "reflective") case (BC_PERIODIC) - call write_dataset(surface_group, "boundary_condition", "periodic") + call write_dataset(surface_group, "boundary_type", "periodic") end select call close_group(surface_group)