stardis-solver

Solve coupled heat transfers
git clone git://git.meso-star.fr/stardis-solver.git
Log | Files | Refs | README | LICENSE

commit a5a2a005071b8a2cf884e025dfaff4c518fa2c14
parent 26ed6ea2875667be10599303e79a95af80f36305
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 10 Apr 2024 19:34:55 +0200

Correct treatment of NULL radiative environment

It should have been treated as a field of unknown temperature, which was
not the case. Hence this commit.

Diffstat:
Msrc/sdis_radiative_env_c.h | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/sdis_radiative_env_c.h b/src/sdis_radiative_env_c.h @@ -32,8 +32,8 @@ radiative_env_get_temperature (const struct sdis_radiative_env* radenv, const struct sdis_radiative_ray* ray) { - ASSERT(radenv && ray && d3_is_normalized(ray->dir)); - return radenv->shader.temperature + ASSERT(ray && d3_is_normalized(ray->dir)); + return radenv && radenv->shader.temperature ? radenv->shader.temperature(ray, radenv->data) : SDIS_TEMPERATURE_NONE; } @@ -43,8 +43,8 @@ radiative_env_get_reference_temperature (const struct sdis_radiative_env* radenv, const struct sdis_radiative_ray* ray) { - ASSERT(radenv && ray && d3_is_normalized(ray->dir)); - return radenv->shader.reference_temperature + ASSERT(ray && d3_is_normalized(ray->dir)); + return radenv && radenv->shader.reference_temperature ? radenv->shader.reference_temperature(ray, radenv->data) : SDIS_TEMPERATURE_NONE; }