commit c67660b013900933fe39ac61ed44f9d0a4e1bd0c
parent 37bc409ec6749656aad716584c19eaf51ab4de6b
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Thu, 5 Dec 2024 14:19:44 +0100
Increase the number of path reinjection attempts
Allowing only one additional attempt could be too restrictive in the
case of geometries with a tiny delta close to the precision of
floating-point representation. Threshold effects could arise, as in the
case of the filter function, which no longer detected that a position
was “on” an edge, since the epsilon used (calculated from delta) could
no longer detect this situation. Hence this adjustment, which attempts
to minimally solve this problem, i.e. without affecting the way
numerical errors are handled in other situations.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sdis_heat_path_boundary_Xd_c.h b/src/sdis_heat_path_boundary_Xd_c.h
@@ -411,7 +411,7 @@ XD(find_reinjection_ray)
ASSERT(XD(check_find_reinjection_ray_args)(scn, args) == RES_OK);
*ray = XD(REINJECTION_RAY_NULL);
- MAX_ATTEMPTS = args->can_move ? 2 : 1;
+ MAX_ATTEMPTS = args->can_move ? 20 : 1;
dst_adjusted = args->distance * RAY_RANGE_MAX_SCALE;
reinject_threshold = (float)args->distance * REINJECT_DST_MIN_SCALE;