Skip to content

Commit

Permalink
Fix #125: Sync DOSXYZnrc source 20 with IAEA phsp
Browse files Browse the repository at this point in the history
Monitor unit (MU) index from IAEA phase space sources was not read in by
DOSXYZnrc. The issue was twofold:

1. For all iaea phase space sources, regardless of whether MU was stored
   or not: iaea_i_muidx, the index at which MU values are stored in a
   floating point array, was automatically reset to -99 (i.e., no MU
   values stored) due to erroneous invoking of the $INIT_PHSP_COUNTERS
   macro at the beginning of subroutine srcinit.

2. For iaea phase space sources storing one or more floating point
   values (e.g., ZLAST) but not MU: The DOSXYZnrc flag, i_mu_phsp,
   indicating MU is stored in this data, was erroneously set to 1. This
   resulted in DOSXYZnrc failing to set a value of MU for each incident
   particle, defaulting to a value of 0 instead. The erroneous setting
   of i_mu_phsp was due to a bug in the macro $IAEA_READ_PHSP_HEADER
   (in $HEN_HOUSE/utils/iaea_phsp_macros.mortran).
  • Loading branch information
blakewalters authored and ftessier committed Aug 17, 2016
1 parent 3eb8a1e commit cf8b24d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions HEN_HOUSE/user_codes/dosxyznrc/srcxyznrc.mortran
Expand Up @@ -2397,8 +2397,6 @@ $REAL weight,
cosphi,sinphi;
$INTEGER i;

$INIT_PHSP_COUNTERS;

OUTPUT61;(' ');

"------------------------------------------------------------------------"
Expand Down
2 changes: 1 addition & 1 deletion HEN_HOUSE/utils/iaea_phsp_macros.mortran
Expand Up @@ -253,7 +253,7 @@ ELSE[
"we assume this is the first float after zlast, if zlast is scored,"
"and has generic user type = 0"
iaea_i_muidx=MAX(1,iaea_i_zlast+1);
IF(iaea_n_extra_floats=0 | iaea_extra_float_types(iaea_i_muidx)~=0) [
IF(iaea_i_muidx>iaea_n_extra_floats | iaea_extra_float_types(iaea_i_muidx)~=0) [
iaea_i_muidx=-99;"reset this to no scoring"
{P8}=0;
]
Expand Down

0 comments on commit cf8b24d

Please sign in to comment.