Modified user input for state points and added ability to do intervals.

This commit is contained in:
Paul Romano 2012-08-23 16:43:40 -04:00
parent fced38901f
commit d46b466411
2 changed files with 36 additions and 10 deletions

View file

@ -44,6 +44,7 @@ contains
use xml_data_settings_t
integer :: i ! loop index
integer :: n
integer :: coeffs_reqd
logical :: file_exists
@ -68,7 +69,6 @@ contains
verbosity_ = 0
energy_grid_ = "union"
seed_ = 0_8
source_separate_ = ""
no_reduce_ = ""
source_ % file = ''
source_ % space % type = ''
@ -459,17 +459,38 @@ contains
ufs_mesh % dimension(2), ufs_mesh % dimension(3)))
end if
! Check if the user has specified to write binary source file
if (trim(source_separate_) == 'on') source_separate = .true.
! Check if the user has specified to write state points
if (associated(write_state_point_)) then
if (size(state_point_) > 0) then
! Determine number of batches at which to store state points
n_state_points = size(write_state_point_)
n_state_points = size(state_point_(1) % batches)
! Allocate and store batches
if (n_state_points > 0) then
! User gave specific batches to write state points
allocate(statepoint_batch(n_state_points))
statepoint_batch = state_point_(1) % batches
elseif (state_point_(1) % interval /= 0) then
! User gave an interval for writing state points
n_state_points = n_batches / state_point_(1) % interval
allocate(statepoint_batch(n_state_points))
statepoint_batch = (/ (state_point_(1) % interval * i, i = 1, &
n_state_points) /)
else
! If neither were specified, write state point at last batch
n_state_points = 1
allocate(statepoint_batch(n_state_points))
statepoint_batch(1) = n_batches
end if
! Check if the user has specified to write binary source file
if (trim(state_point_(1) % source_separate) == 'on') &
source_separate = .true.
else
! If no <state_point> tag was present, by default write state point at
! last batch only
n_state_points = 1
allocate(statepoint_batch(n_state_points))
statepoint_batch = write_state_point_
statepoint_batch(1) = n_batches
end if
! Check if the user has specified to not reduce tallies at the end of every

View file

@ -35,6 +35,12 @@
<component name="upper_right" type="double-array" />
</typedef>
<typedef name="statepoint_xml">
<component name="batches" type="integer-array" />
<component name="interval" type="integer" default="0" />
<component name="source_separate" type="word" length="3" default="''" />
</typedef>
<variable name="confidence_intervals_" tag="confidence_intervals" type="word" length="3" />
<variable name="criticality_" tag="criticality" type="run_parameters_xml" />
<variable name="cross_sections_" tag="cross_sections" type="word" length="255" />
@ -46,11 +52,10 @@
<variable name="ptables_" tag="ptables" type="word" length="3" />
<variable name="seed_" tag="seed" type="integer" />
<variable name="source_" tag="source" type="source_xml" />
<variable name="source_separate_" tag="source_separate" type="word" length="3" />
<variable name="survival_" tag="survival_biasing" type="word" length="3" />
<variable name="verbosity_" tag="verbosity" type="integer" />
<variable name="trace_" tag="trace" type="integer-array" />
<variable name="uniform_fs_" tag="uniform_fs" type="mesh_xml" dimension="1" />
<variable name="write_state_point_" tag="write_state_point" type="integer-array" />
<variable name="state_point_" tag="state_point" type="statepoint_xml" dimension="1" />
</template>