Skip to content

Commit

Permalink
Fix #1131: clarify comment about ms conditional
Browse files Browse the repository at this point in the history
Clarify that multiple-scattering transport is triggered only if the
intended electron step is longer than a skin depth, even in bulk media
away from any region boundaries. This improves efficiency, because a
multiple-scattering step costs about the same as 3 single-scattering
steps (the default skin depth is 3 mean free paths). Below a skin depth,
it is more efficient (and more accurate) to use single-scattering.
  • Loading branch information
ftessier authored and rtownson committed Jun 18, 2024
1 parent 4850d0d commit 013892f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions HEN_HOUSE/src/egsnrc.mortran
Original file line number Diff line number Diff line change
Expand Up @@ -1246,8 +1246,10 @@ $start_new_particle;
is_ch_step = .false.;
IF((tustep <= tperp) & ((~exact_bca) | (tustep > skindepth)))
[
"We are further way from a boundary than a skindepth, so
"perform a normal condensed-history step
"We are further away from a boundary than a skindepth and
"either: we are not using exact boundary-crossing, or the
"requested condensed-history step is greater than the
"skindepth. So perform a normal condensed-history step
callhowfar = .false.; "Do not call HAWFAR
domultiple = .false.; "Multiple scattering done here
dosingle = .false.; "MS => no single scattering
Expand Down

0 comments on commit 013892f

Please sign in to comment.