stardis

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

commit d313a00f2cc8adaf18651fdca27f806304a6741c
parent 987fd26d4a70dc1bdec3edfe4c2db905283214d1
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Tue, 19 Nov 2019 16:03:58 +0100

Add error messages in log; activate solver logs in release

Diffstat:
Msrc/stardis-compute.c | 18+++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/stardis-compute.c b/src/stardis-compute.c @@ -798,16 +798,10 @@ stardis_compute int htable_interfaces_initialised = 0; struct counts counts = COUNTS_NULL; unsigned i = 0; - int verbose; + int verbose = 1; ASSERT(stardis && (mode & COMPUTE_MODES)); -#ifdef NDEBUG - verbose = 0; -#else - verbose = 1; -#endif - res = sdis_device_create(NULL, &stardis->allocator, stardis->nthreads, verbose, &dev); if (res != RES_OK) goto error; @@ -833,7 +827,10 @@ stardis_compute geometry_get_indices, geometry_get_interface, sa_size(stardis->geometry.vertex), geometry_get_position, &stardis->geometry, &scn); - if (res != RES_OK) goto error; + if(res != RES_OK) { + fprintf(stderr, "%s: could not setup the scene!\n", __FUNCTION__); + goto error; + } /* If the scene has holes dump them */ res = create_edge_file_if(scn, &stardis->allocator); @@ -855,7 +852,10 @@ stardis_compute else if (mode & MAP_COMPUTE) res = compute_map(scn, stardis, mode); else FATAL("Unknown mode.\n"); - if (res != RES_OK) goto error; + if(res != RES_OK) { + fprintf(stderr, "%s: computation failed!\n", __FUNCTION__); + goto error; + } end: if (htable_interfaces_initialised)