commit 3db1bc717b238457002e2a4143352209bde33672
parent 942ee2563dab26ab1d95762ef50ea6cdeb2c435f
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 24 Oct 2025 15:18:48 +0200
Small update to the calculation of external net flux
The source power was retrieved by querying the source again during the
Monte Carlo weight update, even though it is already stored in the
source properties retrieved at the beginning of the radiative subpath
sampling. However, it is not necessary to query the source again, as the
power only depends on time and the radiative transfer is instantaneous.
Furthermore, this query can take a long time if, for example, the power
is not constant and requires heavy calculations. Hence this commit,
which instead uses the power stored in the source properties.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sdis_heat_path_boundary_Xd_handle_external_net_flux.h b/src/sdis_heat_path_boundary_Xd_handle_external_net_flux.h
@@ -367,7 +367,7 @@ XD(handle_external_net_flux)
green.dir[1] = incident_flux_diffuse.dir[1];
green.dir[2] = incident_flux_diffuse.dir[2];
- T->value += green.term_wrt_power * source_get_power(scn->source, green.time);
+ T->value += green.term_wrt_power * src_props.power;
if(green.term_wrt_diffuse_radiance) {
T->value +=
green.term_wrt_diffuse_radiance