Few minor fixes for #454. Mesh ID is no longer written for statepoint.

This commit is contained in:
Paul Romano 2015-09-25 20:34:39 +07:00
parent f3f6753820
commit 3d2fe2a0ef
4 changed files with 5 additions and 11 deletions

View file

@ -134,11 +134,7 @@ if run_mode == 'k-eigenvalue':
**/tally/meshes/keys** (*int[]*)
User-identified unique ID of each mesh
**/tallies/meshes/mesh <uid>/id** (*int*)
Unique identifier of the mesh.
User-identified unique ID of each mesh.
**/tallies/meshes/mesh <uid>/type** (*char[]*)

View file

@ -243,7 +243,7 @@ The current revision of the summary file format is 1.
**/tallies/mesh <uid>/index** (*int*)
Index in the meshes array used internally in OpenMC
Index in the meshes array used internally in OpenMC.
**/tallies/mesh <uid>/type** (*char[]*)

View file

@ -265,8 +265,7 @@ class StatePoint(object):
# Iterate over all Meshes
for mesh_key in mesh_keys:
# Read the user-specified Mesh ID and type
mesh_id = self._f['{0}{1}/id'.format(base, mesh_key)].value
# Read the mesh type
mesh_type = self._f['{0}{1}/type'.format(base, mesh_key)].value.decode()
# Read the mesh dimensions, lower-left coordinates,
@ -277,7 +276,7 @@ class StatePoint(object):
width = self._f['{0}{1}/width'.format(base, mesh_key)].value
# Create the Mesh and assign properties to it
mesh = openmc.Mesh(mesh_id)
mesh = openmc.Mesh(mesh_key)
mesh.dimension = dimension
mesh.width = width
mesh.lower_left = lower_left
@ -285,7 +284,7 @@ class StatePoint(object):
mesh.type = mesh_type
# Add mesh to the global dictionary of all Meshes
self._meshes[mesh_id] = mesh
self._meshes[mesh_key] = mesh
self._meshes_read = True

View file

@ -176,7 +176,6 @@ contains
meshp => meshes(id_array(i))
mesh_group = create_group(meshes_group, "mesh " // trim(to_str(meshp%id)))
call write_dataset(mesh_group, "id", meshp%id)
select case (meshp%type)
case (MESH_REGULAR)
call write_dataset(mesh_group, "type", "regular")