From 397d5fe269eecc2fe9acef5b70f202b3b4ac3c82 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 21 Sep 2015 11:34:03 +0700 Subject: [PATCH] Update file format documentation. Use score_bins instead of scores. --- docs/source/usersguide/output/statepoint.rst | 42 +++++----- docs/source/usersguide/output/summary.rst | 80 ++------------------ openmc/statepoint.py | 2 +- openmc/summary.py | 2 +- src/state_point.F90 | 3 +- src/summary.F90 | 3 +- 6 files changed, 28 insertions(+), 104 deletions(-) diff --git a/docs/source/usersguide/output/statepoint.rst b/docs/source/usersguide/output/statepoint.rst index 66fcce27f..42d923351 100644 --- a/docs/source/usersguide/output/statepoint.rst +++ b/docs/source/usersguide/output/statepoint.rst @@ -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) diff --git a/docs/source/usersguide/output/summary.rst b/docs/source/usersguide/output/summary.rst index f924cb1d6..78cf9fbd5 100644 --- a/docs/source/usersguide/output/summary.rst +++ b/docs/source/usersguide/output/summary.rst @@ -75,12 +75,10 @@ do i = 1, n_cells **/geometry/cells/cell /universe** (*int*) - **/geometry/cells/cell /fill_type** (*int*) + **/geometry/cells/cell /fill_type** (*char[]*) **/geometry/cells/cell /material** (*int*) - **/geometry/cells/cell /fill** (*int*) - **/geometry/cells/cell /maps** (*int*) **/geometry/cells/cell /offset** (*int[]*) @@ -109,10 +107,6 @@ do i = 1, n_surfaces **/geometry/surfaces/surface /coefficients** (*double[]*) - **/geometry/surfaces/surface /neighbors_positive** (*int[]*) - - **/geometry/surfaces/surface /neighbors_negative** (*int[]*) - **/geometry/surfaces/surface /boundary_condition** (*char[]*) end do @@ -177,12 +171,6 @@ do i = 1, n_materials **/materials/material /nuclide_densities** (*double[]*) - **/materials/material /n_sab** (*int*) - - **/materials/material /i_sab_nuclides** (*int*) - - **/materials/material /i_sab_tables** (*int*) - **/materials/material /sab_names** (*char[][]*) end do @@ -195,9 +183,7 @@ do i = 1, n_meshes **/tallies/mesh /index** (*int*) - **/tallies/mesh /type** (*int*) - - **/tallies/mesh /n_dimension** (*int*) + **/tallies/mesh /type** (*char[]*) **/tallies/mesh /dimension** (*int[]*) @@ -223,7 +209,7 @@ do i = 1, n_tallies do j = 1, n_filters - **/tallies/tally /filter j/type** (*int*) + **/tallies/tally /filter j/type** (*char[]*) **/tallies/tally /filter j/n_bins** (*int*) @@ -233,66 +219,12 @@ do i = 1, n_tallies end do - **/tallies/tally /n_nuclide_bins** (*int*) + **/tallies/tally /n_nuclides** (*int*) - **/tallies/tally /nuclide_bins** (*int[]*) + **/tallies/tally /nuclides** (*char[][]*) **/tallies/tally /n_score_bins** (*int*) - **/tallies/tally /score_bins** (*int[]*) - -end do - -**/nuclides/n_nuclides** (*int*) - -do i = 1, n_nuclides - - **/nuclides//index** (*int*) - - **/nuclides//zaid** (*int*) - - **/nuclides//alias** (*char[]*) - - **/nuclides//awr** (*double*) - - **/nuclides//kT** (*double*) - - **/nuclides//n_grid** (*int*) - - **/nuclides//n_reactions** (*int*) - - **/nuclides//n_fission** (*int*) - - **/nuclides//size_xs** (*int*) - - do j = 1, n_reactions - - **/nuclides//reactions//Q_value** (*double*) - - **/nuclides//reactions//multiplicity** (*int*) - - **/nuclides//reactions//threshold** (*double*) - - **/nuclides//reactions//size_angle** (*int*) - - **/nuclides//reactions//size_energy** (*int*) - - end do - - **/nuclides//urr_n_energy** (*int*) - - **/nuclides//urr_n_prob** (*int*) - - **/nuclides//urr_interp** (*int*) - - **/nuclides//urr_inelastic** (*int*) - - **/nuclides//urr_absorption** (*int*) - - **/nuclides//urr_min_E** (*double*) - - **/nuclides//urr_max_E** (*double*) - - **/nuclides//size_total** (*int*) + **/tallies/tally /score_bins** (*char[][]*) end do diff --git a/openmc/statepoint.py b/openmc/statepoint.py index ca4fc02ab..f848fe1e7 100644 --- a/openmc/statepoint.py +++ b/openmc/statepoint.py @@ -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 diff --git a/openmc/summary.py b/openmc/summary.py index f599289af..10470bb8e 100644 --- a/openmc/summary.py +++ b/openmc/summary.py @@ -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)][...] diff --git a/src/state_point.F90 b/src/state_point.F90 index bfbbadb57..700d51b1b 100644 --- a/src/state_point.F90 +++ b/src/state_point.F90 @@ -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) diff --git a/src/summary.F90 b/src/summary.F90 index 5fcf0c64e..229fda535 100644 --- a/src/summary.F90 +++ b/src/summary.F90 @@ -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)