From 013892fbf920476ff6826fda4c2a7a53bccac840 Mon Sep 17 00:00:00 2001 From: Frederic Tessier Date: Thu, 23 May 2024 12:17:27 -0400 Subject: [PATCH] Fix #1131: clarify comment about ms conditional 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. --- HEN_HOUSE/src/egsnrc.mortran | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/HEN_HOUSE/src/egsnrc.mortran b/HEN_HOUSE/src/egsnrc.mortran index 16180a574..4beb359ff 100644 --- a/HEN_HOUSE/src/egsnrc.mortran +++ b/HEN_HOUSE/src/egsnrc.mortran @@ -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