stardis-solver

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

commit e27d13c5b26089726146d4dbc744fae79dee252d
parent fe1a72621ad22f8bdc9e2d1036a70e0fc39c6aa5
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri,  8 Dec 2023 15:48:45 +0100

Fix sdis_solve_probe_list function

The probe index was not obtained correctly when scanning the probes. In
addition, we forget updating the number of realisations of the
accumulators.

Diffstat:
Msrc/sdis_solve_probe_Xd.h | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/sdis_solve_probe_Xd.h b/src/sdis_solve_probe_Xd.h @@ -143,8 +143,10 @@ XD(solve_one_probe) /* Update MC weights */ acc_temp->sum += w; acc_temp->sum2 += w*w; + acc_temp->count += 1; acc_time->sum += usec; acc_time->sum2 += usec*usec; + acc_time->count += 1; } exit: @@ -553,7 +555,7 @@ XD(solve_probe_list) struct accum* probe_acc_temp = NULL; struct accum* probe_acc_time = NULL; const struct sdis_solve_probe_args* probe_args = NULL; /* Solve args */ - const size_t iprobe = process_probes[i]; /* Probe ID */ + const size_t iprobe = process_probes[0] + (size_t)i; /* Probe ID */ /* Misc */ size_t n = 0; /* Number of solved probes */