commit d3af7d0470dd13e6845af0ac9051cf78d158b358
parent 887403bbd0cdc05d10285509d381cdcefd8e2b6a
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 27 Sep 2019 14:33:06 +0200
Fix an issue on boundary reinjection
When the reinjection distances in a solid on both sampled directions
were strictly the same and lie on a surface, the reinjected position was
considered as it was in the solid and not on its surrounding surface as
it had to be. Consequently, when the medium consistency was checked at
this new position, Stardis might detect an error leading to the
rejection of the corresponding realisation.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/sdis_heat_path_boundary_Xd.h b/src/sdis_heat_path_boundary_Xd.h
@@ -345,7 +345,9 @@ XD(select_reinjection_dir)
* randomly selected by the sample_reinjection_dir procedure and adjust
* the displacement distance. */
dir = dir0;
- if(dst0 < dst1) {
+
+ /* Define the reinjection distance along dir0 and its corresponding hit */
+ if(dst0 <= dst1) {
dst = dst0;
hit = hit0;
} else {