stardis

Perform coupled heat transfer calculations
git clone git://git.meso-star.fr/stardis.git
Log | Files | Refs | README | LICENSE

commit 6d9579871ff4905dfa26fdbf69768fbef22e15de
parent 03ea5f7ca645f39ec62d7a0dca6032061911777f
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Thu, 18 Feb 2021 09:10:17 +0100

Add information on some probe interface related error message

Diffstat:
Msrc/stardis-app.c | 3---
Msrc/stardis-compute.c | 14++++++++++----
2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/stardis-app.c b/src/stardis-app.c @@ -378,9 +378,6 @@ stardis_init struct sdis_scene_create_args scn_args = SDIS_SCENE_CREATE_ARGS_DEFAULT; ASSERT(darray_interface_ptrs_size_get(&stardis->geometry.interf_bytrg) == tcount); - /* Can release enclosures as they are no longer needed if compute */ - SENC3D(scene_ref_put(stardis->senc3d_scn)); - stardis->senc3d_scn = NULL; scn_args.get_indices = sg3d_sdisXd_geometry_get_indices; scn_args.get_interface = sg3d_sdisXd_geometry_get_interface; scn_args.get_position = sg3d_sdisXd_geometry_get_position; diff --git a/src/stardis-compute.c b/src/stardis-compute.c @@ -535,17 +535,23 @@ compute_probe_on_interface(struct stardis* stardis, struct time* start) if(med_id != fmat_id && med_id != bmat_id) { /* Not here */ logger_print(stardis->logger, LOG_ERROR, - "Medium '%s' is not used at this interface (prim id=%lu)\n", - solve_name, (unsigned long)iprim); + "Medium '%s' is not used at this interface (prim id=%u)\n", + solve_name, iprim); res = RES_BAD_ARG; goto error; } if(fmat_id == bmat_id) { /* Cannot differentiate */ + unsigned encs[2]; + ERR(senc3d_scene_get_triangle_enclosures(stardis->senc3d_scn, iprim, + encs)); logger_print(stardis->logger, LOG_ERROR, - "Medium '%s' is used on both sides of this interface (prim id=%lu)\n", - solve_name, (unsigned long)iprim); + "Medium '%s' is used on both sides of this interface (prim id=%u)\n", + solve_name,iprim); logger_print(stardis->logger, LOG_ERROR, "Side must be defined using either FRONT or BACK.\n"); + logger_print(stardis->logger, LOG_ERROR, + "FRONT side is related to enclosure %u, BACK side to enclosure %u.\n", + encs[SENC3D_FRONT], encs[SENC3D_BACK]); res = RES_BAD_ARG; goto error; }