commit adc282578b503f76e9451672f199018a4980af34
parent fb6a34a50f758e2ca3b86bdfd48017b784f5e2aa
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 1 Sep 2025 15:48:29 +0200
Revert "Correction of Kmin calculation"
This reverts commit fb6a34a50f758e2ca3b86bdfd48017b784f5e2aa.
The update was actually incorrect. The initial calculation was correct,
because a voxel is not necessarily covered by all components of the
mixture. Consequently, the minimum radiative coefficient of a voxel is
indeed the minimum of a single component, and not the minimum of the sum
of all its components.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/rnatm_voxel.h b/src/rnatm_voxel.h
@@ -74,8 +74,8 @@ voxel_accum(float* dst, const float* src)
dst[ka_max] += src[ka_max];
dst[ks_max] += src[ks_max];
- dst[ka_min] += src[ka_min];
- dst[ks_min] += src[ks_min];
+ dst[ka_min] = MMIN(dst[ka_min], src[ka_min]);
+ dst[ks_min] = MMIN(dst[ks_min], src[ks_min]);
}
#endif /* RNATM_VOXEL_H */