Update file format documentation. Use score_bins instead of scores.

This commit is contained in:
Paul Romano 2015-09-21 11:34:03 +07:00
parent 75e37efac3
commit 397d5fe269
6 changed files with 28 additions and 104 deletions

View file

@ -39,7 +39,7 @@ The current revision of the statepoint file format is 13.
Pseudo-random number generator seed.
**/run_mode** (*int*)
**/run_mode** (*char[]*)
Run mode used. A value of 1 indicates a fixed-source run and a value of 2
indicates an eigenvalue run.
@ -142,14 +142,10 @@ if (run_mode == MODE_EIGENVALUE)
Unique identifier of the mesh.
**/tallies/meshes/mesh i/type** (*int*)
**/tallies/meshes/mesh i/type** (*char[]*)
Type of mesh.
**/tallies/meshes/mesh i/n_dimension** (*int*)
Number of dimensions for mesh (2 or 3).
**/tallies/meshes/mesh i/dimension** (*int*)
Number of mesh cells in each dimension.
@ -180,9 +176,9 @@ if (run_mode == MODE_EIGENVALUE)
*do i = 1, n_tallies*
**/tallies/tally i/estimator** (*int*)
**/tallies/tally i/estimator** (*char[]*)
Type of tally estimator: analog (1) or tracklength (2).
Type of tally estimator.
**/tallies/tally i/n_realizations** (*int*)
@ -194,7 +190,7 @@ if (run_mode == MODE_EIGENVALUE)
*do j = 1, tallies(i) % n_filters*
**/tallies/tally i/filter j/type** (*int*)
**/tallies/tally i/filter j/type** (*char[]*)
Type of tally filter.
@ -214,28 +210,32 @@ if (run_mode == MODE_EIGENVALUE)
Number of nuclide bins. If none are specified, this is just one.
**/tallies/tally i/nuclides** (*int[]*)
**/tallies/tally i/nuclides** (*char[][]*)
Values of specified nuclide bins (ZAID identifiers)
Values of specified nuclide bins.
**/tallies/tally i/n_score_bins** (*int*)
Number of scoring bins.
Number of scores.
**/tallies/tally i/score_bins** (*int*)
**/tallies/tally i/score_bins** (*char[][]*)
Values of specified scoring bins (e.g. SCORE_FLUX).
Values of specified scores.
**/tallies/tally i/n_user_score_bins** (*int*)
**/tallies/tally i/n_user_scores** (*int*)
Number of scoring bins without accounting for those added by
expansions, e.g. scatter-PN.
Number of scores without accounting for those added by expansions,
e.g. scatter-PN.
**/tallies/tally i/moment_orders** (*char[][]*)
Tallying moment orders for Legendre and spherical harmonic tally
expansions (*e.g.*, 'P2', 'Y1,2', etc.).
**/tallies/tally i/results** (Compound type)
Accumulated sum and sum-of-squares for each bin of the i-th tally.
**/source_present** (*int*)
Flag indicated if source bank is present in the file
@ -257,13 +257,7 @@ if (run_mode == MODE_EIGENVALUE)
Flag indicated if tallies are present in the file.
*do i = 1, n_tallies*
**/tallies/tally i/results** (Compound type)
Accumulated sum and sum-of-squares for each bin of the tally i-th tally
if (run_mode == MODE_EIGENVALUE and source_present)
if (run_mode == 'k-eigenvalue' and source_present > 0)
**/source_bank** (Compound type)

View file

@ -75,12 +75,10 @@ do i = 1, n_cells
**/geometry/cells/cell <uid>/universe** (*int*)
**/geometry/cells/cell <uid>/fill_type** (*int*)
**/geometry/cells/cell <uid>/fill_type** (*char[]*)
**/geometry/cells/cell <uid>/material** (*int*)
**/geometry/cells/cell <uid>/fill** (*int*)
**/geometry/cells/cell <uid>/maps** (*int*)
**/geometry/cells/cell <uid>/offset** (*int[]*)
@ -109,10 +107,6 @@ do i = 1, n_surfaces
**/geometry/surfaces/surface <uid>/coefficients** (*double[]*)
**/geometry/surfaces/surface <uid>/neighbors_positive** (*int[]*)
**/geometry/surfaces/surface <uid>/neighbors_negative** (*int[]*)
**/geometry/surfaces/surface <uid>/boundary_condition** (*char[]*)
end do
@ -177,12 +171,6 @@ do i = 1, n_materials
**/materials/material <uid>/nuclide_densities** (*double[]*)
**/materials/material <uid>/n_sab** (*int*)
**/materials/material <uid>/i_sab_nuclides** (*int*)
**/materials/material <uid>/i_sab_tables** (*int*)
**/materials/material <uid>/sab_names** (*char[][]*)
end do
@ -195,9 +183,7 @@ do i = 1, n_meshes
**/tallies/mesh <uid>/index** (*int*)
**/tallies/mesh <uid>/type** (*int*)
**/tallies/mesh <uid>/n_dimension** (*int*)
**/tallies/mesh <uid>/type** (*char[]*)
**/tallies/mesh <uid>/dimension** (*int[]*)
@ -223,7 +209,7 @@ do i = 1, n_tallies
do j = 1, n_filters
**/tallies/tally <uid>/filter j/type** (*int*)
**/tallies/tally <uid>/filter j/type** (*char[]*)
**/tallies/tally <uid>/filter j/n_bins** (*int*)
@ -233,66 +219,12 @@ do i = 1, n_tallies
end do
**/tallies/tally <uid>/n_nuclide_bins** (*int*)
**/tallies/tally <uid>/n_nuclides** (*int*)
**/tallies/tally <uid>/nuclide_bins** (*int[]*)
**/tallies/tally <uid>/nuclides** (*char[][]*)
**/tallies/tally <uid>/n_score_bins** (*int*)
**/tallies/tally <uid>/score_bins** (*int[]*)
end do
**/nuclides/n_nuclides** (*int*)
do i = 1, n_nuclides
**/nuclides/<name>/index** (*int*)
**/nuclides/<name>/zaid** (*int*)
**/nuclides/<name>/alias** (*char[]*)
**/nuclides/<name>/awr** (*double*)
**/nuclides/<name>/kT** (*double*)
**/nuclides/<name>/n_grid** (*int*)
**/nuclides/<name>/n_reactions** (*int*)
**/nuclides/<name>/n_fission** (*int*)
**/nuclides/<name>/size_xs** (*int*)
do j = 1, n_reactions
**/nuclides/<name>/reactions/<reaction_name>/Q_value** (*double*)
**/nuclides/<name>/reactions/<reaction_name>/multiplicity** (*int*)
**/nuclides/<name>/reactions/<reaction_name>/threshold** (*double*)
**/nuclides/<name>/reactions/<reaction_name>/size_angle** (*int*)
**/nuclides/<name>/reactions/<reaction_name>/size_energy** (*int*)
end do
**/nuclides/<name>/urr_n_energy** (*int*)
**/nuclides/<name>/urr_n_prob** (*int*)
**/nuclides/<name>/urr_interp** (*int*)
**/nuclides/<name>/urr_inelastic** (*int*)
**/nuclides/<name>/urr_absorption** (*int*)
**/nuclides/<name>/urr_min_E** (*double*)
**/nuclides/<name>/urr_max_E** (*double*)
**/nuclides/<name>/size_total** (*int*)
**/tallies/tally <uid>/score_bins** (*char[][]*)
end do

View file

@ -422,7 +422,7 @@ class StatePoint(object):
tally.num_score_bins = n_score_bins
scores = self._f['{0}{1}/scores'.format(
scores = self._f['{0}{1}/score_bins'.format(
base, tally_key)].value
n_user_scores = self._f['{0}{1}/n_user_score_bins'
.format(base, tally_key)].value

View file

@ -505,7 +505,7 @@ class Summary(object):
tally = openmc.Tally(tally_id, tally_name)
# Read score metadata
scores = self._f['{0}/scores'.format(subbase)].value
scores = self._f['{0}/score_bins'.format(subbase)].value
for score in scores:
tally.add_score(score.decode())
num_score_bins = self._f['{0}/n_score_bins'.format(subbase)][...]

View file

@ -344,8 +344,7 @@ contains
str_array(j) = reaction_name(tally%score_bins(j))
end select
end do
call write_dataset(tally_group, "scores", str_array)
call write_dataset(tally_group, "score_bins", tally%score_bins)
call write_dataset(tally_group, "score_bins", str_array)
call write_dataset(tally_group, "n_user_score_bins", tally%n_user_score_bins)
deallocate(str_array)

View file

@ -623,8 +623,7 @@ contains
str_array(j) = reaction_name(t%score_bins(j))
end select
end do
call write_dataset(tally_group, "scores", str_array)
call write_dataset(tally_group, "score_bins", t%score_bins)
call write_dataset(tally_group, "score_bins", str_array)
deallocate(str_array)