commit 4644c34db6bc93608968cc249799fa4d61fcf0f3
parent 87d5bdc07c3aa08e2887a05826bd9a396ec4629f
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 10 Sep 2025 08:51:08 +0200
Add comments on issues while sampling radiative paths
Improve explanations on why the position of the next surface is
retrieved directly from the find_next_fragment function, rather than
recalculated from the hit distance and sampled direction
(commit 87d5bdc).
Diffstat:
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/sdis_heat_path_radiative_Xd.h b/src/sdis_heat_path_radiative_Xd.h
@@ -248,8 +248,16 @@ XD(trace_radiative_path)
break; /* Stop the radiative path */
}
- /* Move the random walk to the hit position, i.e. the next position on the
- * interface returned as a fragment by the previous function */
+ /* Move the random walk to the hit position, i.e., the next position on the
+ * interface returned as a fragment by the find_next_fragment function. Do
+ * not use the sampled direction and distance to the hit point to
+ * calculate the new position, as the current position may have been slightly
+ * shifted on the starting triangle by the find_next_fragment function in
+ * order to avoid numerical inaccuracy issues, making it impossible to
+ * reconstruct the position actually returned by the function. The starting
+ * point and distance returned are not, in any case, those used by the
+ * function to calculate the new wall position. So simply use the position
+ * returned by this function. */
d3_set(rwalk->vtx.P, frag.P);
rwalk->hit_side = frag.side;