commit a4b15bce9aaf0ed66e0022e68ef9f5c48404cb64
parent c79bea63847a5caf927c3e7251b0183a0a444316
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Sun, 9 Jun 2024 11:57:44 +0200
Fixing media checks when sampling a radiative path
When the trajectory reaches a boundary, we check that the intersecting
interface points to a fluid. Until now, we would return an error if the
medium type was not 0, without being sure that 0 meant a fluid. In fact,
it did, so there wasn't really a noticeable bug, but nobody can
reasonably rely on the assumption that this hard-coded constant is the
right one.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sdis_heat_path_radiative_Xd.h b/src/sdis_heat_path_radiative_Xd.h
@@ -190,7 +190,7 @@ XD(trace_radiative_path)
* is therefore fatal for the calculation */
chk_mdm = rwalk->hit_side == SDIS_FRONT
? interf->medium_front : interf->medium_back;
- if(sdis_medium_get_type(chk_mdm)) {
+ if(sdis_medium_get_type(chk_mdm) == SDIS_SOLID) {
log_err(scn->dev,
"%s: a radiative path cannot evolve in a solid -- pos=(%g, %g, %g)\n",
FUNC_NAME, SPLIT3(rwalk->vtx.P));