solstice-solver

Solver library of the solstice app
git clone git://git.meso-star.com/solstice-solver.git
Log | Files | Refs | README | LICENSE

commit e70ebf135cf13985a59c827c9dd8542839c8962d
parent baf003b7f49e869c6508f281f920ba2f74d32a16
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 19 Apr 2017 11:36:49 +0200

Fix the type of tracked radiative paths

Path with the "success" flag was not only the paths that reached a
receiver.

Diffstat:
Msrc/ssol_solver.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/ssol_solver.c b/src/ssol_solver.c @@ -761,6 +761,7 @@ trace_radiative_path float org[3], dir[3], range[2] = { 0, FLT_MAX }; size_t depth = 0; int is_lit = 0; + int hit_a_receiver = 0; res_T res = RES_OK; ASSERT(thread_ctx && scn && view_samp && view_rt && ran_sun_dir && ran_sun_wl); @@ -827,6 +828,7 @@ trace_radiative_path } if(point_is_receiver(&pt)) { + hit_a_receiver = 1; res = update_mc(&pt, path_id, depth, thread_ctx, output); if(res != RES_OK) goto error; } @@ -893,7 +895,7 @@ trace_radiative_path #undef ACCUM_WEIGHT if(tracker) { - path.type = pt.absorbed_irradiance ? SSOL_PATH_SUCCESS : SSOL_PATH_MISSING; + path.type = hit_a_receiver ? SSOL_PATH_SUCCESS : SSOL_PATH_MISSING; } }