commit 706c02ea4116e351750e834930ae0b5e86c2672a
parent 1c15ef901058ae5d973b8e69f4dea1a18b5e0f73
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 10 Sep 2025 08:22:10 +0200
Record the number of bounces of radiative sub-paths
This facilitates debugging by allowing the program to be conditionally
interrupted at a given bounce.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/sdis_heat_path_radiative_Xd.h b/src/sdis_heat_path_radiative_Xd.h
@@ -208,6 +208,7 @@ XD(trace_radiative_path)
double dir[3] = {0,0,0};
double pos[3] = {0,0,0};
int branch_id;
+ size_t nbounces = 0; /* For debug */
res_T res = RES_OK;
ASSERT(scn && ray_dir && ctx && rwalk && rng && T);
@@ -301,6 +302,8 @@ XD(trace_radiative_path)
}
brdf_sample(&brdf, rng, wi, N, &bounce);
d3_set(dir, bounce.dir); /* Always in 3D */
+
+ ++nbounces;
}
exit: