commit 5b763672a5cac5fe204f7410b4c9b3063e07ca87 parent 2527eb556fd23d71ec627abe220904ed95f1a33c Author: Vincent Forest <vincent.forest@meso-star.com> Date: Wed, 27 Feb 2019 11:35:59 +0100 Fix a possible numerical issues in the conductive path Diffstat:
| M | src/sdis_heat_path_conductive_Xd.h | | | 6 | ++++-- |
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/sdis_heat_path_conductive_Xd.h b/src/sdis_heat_path_conductive_Xd.h @@ -220,8 +220,10 @@ XD(conductive_path) } } - /* Define if the random walk hits something along dir0 */ - if(hit0.distance > delta) { + /* Define if the random walk hits something along dir0. Multiply delta by + * the empirical ray range scale factor to ensure that once moved, the + * random walk does not lie in the uncertainty zone near the geometry */ + if(hit0.distance > delta * RAY_RANGE_MAX_SCALE) { rwalk->hit = SXD_HIT_NULL; rwalk->hit_side = SDIS_SIDE_NULL__; } else {