From ccc7da103283b1d45bc362e42cb16e1349671b9f Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Wed, 25 May 2016 21:26:06 -0400 Subject: [PATCH] Removing transport score capability and replacing with error message to let users know of deprecation. Also removed that same error message for diffusion --- src/constants.F90 | 29 +++++++++++----------- src/endf.F90 | 2 -- src/input_xml.F90 | 8 ++---- src/output.F90 | 1 - src/tally.F90 | 38 ----------------------------- tests/test_tallies/inputs_true.dat | 2 +- tests/test_tallies/results_true.dat | 2 +- tests/test_tallies/test_tallies.py | 2 +- 8 files changed, 19 insertions(+), 65 deletions(-) diff --git a/src/constants.F90 b/src/constants.F90 index 5b58f409dd..be13f47f2f 100644 --- a/src/constants.F90 +++ b/src/constants.F90 @@ -279,7 +279,7 @@ module constants EVENT_ABSORB = 2 ! Tally score type - integer, parameter :: N_SCORE_TYPES = 22 + integer, parameter :: N_SCORE_TYPES = 21 integer, parameter :: & SCORE_FLUX = -1, & ! flux SCORE_TOTAL = -2, & ! total reaction rate @@ -289,20 +289,19 @@ module constants SCORE_SCATTER_PN = -6, & ! system for scoring 0th through nth moment SCORE_NU_SCATTER_N = -7, & ! arbitrary nu-scattering moment SCORE_NU_SCATTER_PN = -8, & ! system for scoring 0th through nth nu-scatter moment - SCORE_TRANSPORT = -9, & ! transport reaction rate - SCORE_N_1N = -10, & ! (n,1n) rate - SCORE_ABSORPTION = -11, & ! absorption rate - SCORE_FISSION = -12, & ! fission rate - SCORE_NU_FISSION = -13, & ! neutron production rate - SCORE_KAPPA_FISSION = -14, & ! fission energy production rate - SCORE_CURRENT = -15, & ! partial current - SCORE_FLUX_YN = -16, & ! angular moment of flux - SCORE_TOTAL_YN = -17, & ! angular moment of total reaction rate - SCORE_SCATTER_YN = -18, & ! angular flux-weighted scattering moment (0:N) - SCORE_NU_SCATTER_YN = -19, & ! angular flux-weighted nu-scattering moment (0:N) - SCORE_EVENTS = -20, & ! number of events - SCORE_DELAYED_NU_FISSION = -21, & ! delayed neutron production rate - SCORE_INVERSE_VELOCITY = -22 ! flux-weighted inverse velocity + SCORE_N_1N = -9, & ! (n,1n) rate + SCORE_ABSORPTION = -10, & ! absorption rate + SCORE_FISSION = -11, & ! fission rate + SCORE_NU_FISSION = -12, & ! neutron production rate + SCORE_KAPPA_FISSION = -13, & ! fission energy production rate + SCORE_CURRENT = -14, & ! partial current + SCORE_FLUX_YN = -15, & ! angular moment of flux + SCORE_TOTAL_YN = -16, & ! angular moment of total reaction rate + SCORE_SCATTER_YN = -17, & ! angular flux-weighted scattering moment (0:N) + SCORE_NU_SCATTER_YN = -18, & ! angular flux-weighted nu-scattering moment (0:N) + SCORE_EVENTS = -19, & ! number of events + SCORE_DELAYED_NU_FISSION = -20, & ! delayed neutron production rate + SCORE_INVERSE_VELOCITY = -21 ! flux-weighted inverse velocity ! Maximum scattering order supported integer, parameter :: MAX_ANG_ORDER = 10 diff --git a/src/endf.F90 b/src/endf.F90 index 64f26539a9..9f14ea6b72 100644 --- a/src/endf.F90 +++ b/src/endf.F90 @@ -34,8 +34,6 @@ contains string = "nu-scatter-n" case (SCORE_NU_SCATTER_PN) string = "nu-scatter-pn" - case (SCORE_TRANSPORT) - string = "transport" case (SCORE_N_1N) string = "n1n" case (SCORE_ABSORPTION) diff --git a/src/input_xml.F90 b/src/input_xml.F90 index d06fe1f9d2..eb8859bec5 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -3493,13 +3493,9 @@ contains j = j + n_bins - 1 case('transport') - t % score_bins(j) = SCORE_TRANSPORT - - ! Set tally estimator to analog - t % estimator = ESTIMATOR_ANALOG - case ('diffusion') - call fatal_error("Diffusion score no longer supported for tallies, & + call fatal_error("Transport score no longer supported for tallies, & &please remove") + case ('n1n') if (run_CE) then t % score_bins(j) = SCORE_N_1N diff --git a/src/output.F90 b/src/output.F90 index d56de1f3d2..76e3cfc024 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -777,7 +777,6 @@ contains score_names(abs(SCORE_TOTAL)) = "Total Reaction Rate" score_names(abs(SCORE_SCATTER)) = "Scattering Rate" score_names(abs(SCORE_NU_SCATTER)) = "Scattering Production Rate" - score_names(abs(SCORE_TRANSPORT)) = "Transport Rate" score_names(abs(SCORE_N_1N)) = "(n,1n) Rate" score_names(abs(SCORE_ABSORPTION)) = "Absorption Rate" score_names(abs(SCORE_FISSION)) = "Fission Rate" diff --git a/src/tally.F90 b/src/tally.F90 index c4eaf30c8c..0c41b6f987 100644 --- a/src/tally.F90 +++ b/src/tally.F90 @@ -346,30 +346,6 @@ contains end if - case (SCORE_TRANSPORT) - ! Only analog estimators are available. - ! Skip any event where the particle didn't scatter - if (p % event /= EVENT_SCATTER) cycle SCORE_LOOP - ! get material macros - macro_total = material_xs % total - macro_scatt = material_xs % total - material_xs % absorption - ! Score total rate - p1 scatter rate Note estimator needs to be - ! adjusted since tallying is only occuring when a scatter has - ! happened. Effectively this means multiplying the estimator by - ! total/scatter macro - score = (macro_total - p % mu * macro_scatt) * (ONE / macro_scatt) - - - case (SCORE_N_1N) - ! Only analog estimators are available. - ! Skip any event where the particle didn't scatter - if (p % event /= EVENT_SCATTER) cycle SCORE_LOOP - ! Skip any events where weight of particle changed - if (p % wgt /= p % last_wgt) cycle SCORE_LOOP - ! All events that reach this point are (n,1n) reactions - score = p % last_wgt - - case (SCORE_ABSORPTION) if (t % estimator == ESTIMATOR_ANALOG) then if (survival_biasing) then @@ -1021,20 +997,6 @@ contains end if - case (SCORE_TRANSPORT) - ! Only analog estimators are available. - ! Skip any event where the particle didn't scatter - if (p % event /= EVENT_SCATTER) cycle SCORE_LOOP - ! Score total rate - p1 scatter rate Note estimator needs to be - ! adjusted since tallying is only occuring when a scatter has - ! happened. Effectively this means multiplying the estimator by - ! total/scatter macro - score = (material_xs % total - p % mu * material_xs % elastic) - if (material_xs % elastic /= ZERO) then - score = score / material_xs % elastic - end if - - case (SCORE_ABSORPTION) if (t % estimator == ESTIMATOR_ANALOG) then if (survival_biasing) then diff --git a/tests/test_tallies/inputs_true.dat b/tests/test_tallies/inputs_true.dat index be789fc838..61d09f8ea6 100644 --- a/tests/test_tallies/inputs_true.dat +++ b/tests/test_tallies/inputs_true.dat @@ -1 +1 @@ -0597eff3fddbc45a09b5b324c9704e540b694b07c136f2040426fdcfe5ec544f036073e4afa34a5fb0fbd721a4c0a609b9b68bf17ce4ec78302023b46b71930c \ No newline at end of file +35e3e1a2c2ef7c707ea585e6cd697ea5e4ae8ec0ec070985dcfd1917a6a569cb7354bee7bbdd259ecdad7198823b4dad98b17452f9cba1122f22635e0aa0a046 \ No newline at end of file diff --git a/tests/test_tallies/results_true.dat b/tests/test_tallies/results_true.dat index fd5eb91a1a..904f62a770 100644 --- a/tests/test_tallies/results_true.dat +++ b/tests/test_tallies/results_true.dat @@ -1 +1 @@ -9f14aaa1694489032b3ce193ad29ecf6ac8976c88c2dd6b26d4c30ae88348e249a9b702b1d39c22204350b8f3bd689800c1b6a6003f19c7bdaf64084a209a2cc \ No newline at end of file +264bc2cb19f7d81dfb1c326ee044f89cd09549b3b6836f334bb06f63bf586058e9825788a90ca7b84c77fd53ee23871727fd0d2b0139cb008192c533be4b84e3 \ No newline at end of file diff --git a/tests/test_tallies/test_tallies.py b/tests/test_tallies/test_tallies.py index 52d4084fde..0b7fabef28 100644 --- a/tests/test_tallies/test_tallies.py +++ b/tests/test_tallies/test_tallies.py @@ -161,7 +161,7 @@ class TalliesTestHarness(PyAPITestHarness): total_tallies[3].estimator = 'collision' questionable_tally = Tally() - questionable_tally.scores = ['transport', 'n1n'] + questionable_tally.scores = ['n1n'] all_nuclide_tallies = [Tally(), Tally()] for t in all_nuclide_tallies: