diff --git a/src/global.F90 b/src/global.F90 index baefc53b9f..81c6cbb6e9 100644 --- a/src/global.F90 +++ b/src/global.F90 @@ -95,6 +95,9 @@ module global ! Flag for turning tallies on logical :: tallies_on + ! Assume all tallies are spatially distinct + logical :: assume_separate = .false. + ! ============================================================================ ! CRITICALITY SIMULATION VARIABLES diff --git a/src/input_xml.F90 b/src/input_xml.F90 index 278693c5fd..ab3c2af18b 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -661,6 +661,9 @@ contains allocate(tallies(n_tallies)) end if + ! Check for setting + if (separate_ == 'yes') assume_separate = .true. + ! ========================================================================== ! READ MESH DATA diff --git a/src/tally.F90 b/src/tally.F90 index 67393d46ac..bab721bf66 100644 --- a/src/tally.F90 +++ b/src/tally.F90 @@ -448,6 +448,13 @@ contains end do + ! If the user has specified that we can assume all tallies are spatially + ! separate, this implies that once a tally has been scored to, we needn't + ! check the others. This cuts down on overhead when there are many + ! tallies specified + + if (assume_separate) return + ! Reset tally map positioning position = 0 @@ -588,6 +595,13 @@ contains end do + ! If the user has specified that we can assume all tallies are spatially + ! separate, this implies that once a tally has been scored to, we needn't + ! check the others. This cuts down on overhead when there are many + ! tallies specified + + if (assume_separate) return + ! Reset tally map positioning position = 0 diff --git a/src/xml-fortran/templates/tallies_t.xml b/src/xml-fortran/templates/tallies_t.xml index 695ef8f6a8..d1ed9b868d 100644 --- a/src/xml-fortran/templates/tallies_t.xml +++ b/src/xml-fortran/templates/tallies_t.xml @@ -32,5 +32,6 @@ +