stardis-solver

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

commit e7d835c7847f778cbbeba9ef7fc8496958302a43
parent f978c4204897b5b1a377792e54250c0e95b7b55e
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu, 14 Dec 2023 12:17:45 +0100

Warn when resolving multiple probes with path saving enabled

Saving paths is not supported by the sdis_solve_probe_list function.
Although it actually seems quite simple to implement, with MPI we would
have to implement path gathering on the master process, which adds
questionable complexity. This is because this function was designed for
calculation purposes while path logging is used for analysis purposes.
In the latter case, the number of sampled paths is generally limited:
only a few realizations are calculated and the estimated values
are simply ignored.

As an exception, we will highlight the recording of rejected paths,
which if saved for analysis, are sampled during an actual calculation.
This use case remains limited for the moment so that it does not seem to
justify the addition of the recording of paths for the
sdis_solve_probe_list function.

Diffstat:
Msrc/sdis_solve_probe_Xd.h | 14++++++++++++--
Msrc/test_sdis_solve_probe_list.c | 2+-
2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/sdis_solve_probe_Xd.h b/src/sdis_solve_probe_Xd.h @@ -68,9 +68,12 @@ check_solve_probe_args(const struct sdis_solve_probe_args* args) } static INLINE res_T -check_solve_probe_list_args(const struct sdis_solve_probe_list_args* args) +check_solve_probe_list_args + (struct sdis_device* dev, + const struct sdis_solve_probe_list_args* args) { size_t iprobe = 0; + if(!args) return RES_BAD_ARG; /* Check the list of probes */ @@ -86,6 +89,13 @@ check_solve_probe_list_args(const struct sdis_solve_probe_list_args* args) FOR_EACH(iprobe, 0, args->nprobes) { const res_T res = check_solve_probe_args(args->probes+iprobe); if(res != RES_OK) return res; + + if(args->probes[iprobe].register_paths != SDIS_HEAT_PATH_NONE) { + log_warn(dev, + "Unable to save paths for probe %lu. " + "Saving path is not supported when solving multiple probes\n", + (unsigned long)iprobe); + } } return RES_OK; @@ -572,7 +582,7 @@ XD(solve_probe_list) /* Check input arguments */ if(!scn || !out_estim_buf) { res = RES_BAD_ARG; goto error; } - res = check_solve_probe_list_args(args); + res = check_solve_probe_list_args(scn->dev, args); if(res != RES_OK) goto error; res = XD(scene_check_dimensionality)(scn); if(res != RES_OK) goto error; diff --git a/src/test_sdis_solve_probe_list.c b/src/test_sdis_solve_probe_list.c @@ -184,7 +184,7 @@ view_compute_delta(struct s3d_scene_view* view) OK(s3d_scene_view_compute_volume(view, &V)); CHK(S > 0 && V > 0); - return (4.0*V/S)/20.0; + return (4.0*V/S)/30.0; } static void