solstice-solver

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

commit 7570add016a59057c3d3683e24c84c38aa6ebcae
parent b53e8da9b5584cf37078449c9a53b28bbbe57e0c
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Sat, 16 Sep 2017 16:26:54 +0200

Fix the "medium inconsistency" check for segments going to infinity

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

diff --git a/src/ssol_solver.c b/src/ssol_solver.c @@ -891,7 +891,12 @@ trace_radiative_path if (res != RES_OK) goto error; } last_segment = 1; /* Path reached its last segment */ - if(!in_atm) { + + /* Check medium consistency. Note that one has to check `out_medium' - + * and not `in_medium' - against the atmosphere since it is actually + * the medium in which the ray was traced; at this step, `in_medium' is + * still the medium of the previous path segment. */ + if(!media_ceq(&out_medium, &scn->air)) { log_error(scn->dev, "Inconsistent medium description.\n"); res = RES_BAD_OP; goto error;