commit d99d9c0bce611814c963b8ec0379bca52b33d61a
parent 273140d19f85be710342e548e7d732610066ee7e
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 27 Nov 2019 12:10:48 +0100
Merge branch 'release_0.8.2'
Diffstat:
4 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
@@ -25,6 +25,15 @@ variable the install directories of its dependencies.
## Release notes
+### Version 0.8.2
+
+- Fix an issue when the `sdis_solve_boundary_flux` function was invoked on a
+ boundary with radiative transfer: several sampled paths were rejected due to
+ data inconsistencies.
+- Fix a memory leak when the scene creation failed.
+- Enable parallelism on Star-Enclosure[2D] to improve the performances of the
+ enclosure extraction on the setup of the Stardis scene.
+
### Version 0.8.1
- Fix a solver issue that led to reject valid sampled paths.
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -56,7 +56,7 @@ rcmake_append_runtime_dirs(_runtime_dirs RSys Star3D StarSP StarEnc StarEnc2D)
################################################################################
set(VERSION_MAJOR 0)
set(VERSION_MINOR 8)
-set(VERSION_PATCH 1)
+set(VERSION_PATCH 2)
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
set(SDIS_FILES_SRC
diff --git a/src/sdis_realisation_Xd.h b/src/sdis_realisation_Xd.h
@@ -298,6 +298,9 @@ XD(boundary_flux_realisation)
struct XD(temperature) T;
struct sXd(attrib) attr;
struct sXd(primitive) prim;
+ struct sdis_interface* interf = NULL;
+ struct sdis_medium* fluid_mdm = NULL;
+
#if SDIS_XD_DIMENSION == 2
float st;
#else
@@ -354,9 +357,13 @@ XD(boundary_flux_realisation)
if(res != RES_OK) return res;
weight[0] = T.value;
+ /* Fetch the fluid medium */
+ interf = scene_get_interface(scn, (unsigned)iprim);
+ fluid_mdm = interface_get_medium(interf, fluid_side);
+
/* Compute radiative temperature */
if(compute_radiative) {
- RESET_WALK(fluid_side, NULL);
+ RESET_WALK(fluid_side, fluid_mdm);
T.func = XD(radiative_path);
res = XD(compute_temperature)(scn, fp_to_meter, &ctx, &rwalk, rng, &T);
if(res != RES_OK) return res;
@@ -365,10 +372,7 @@ XD(boundary_flux_realisation)
/* Compute fluid temperature */
if(compute_convective) {
- struct sdis_interface* interf = scene_get_interface(scn, (unsigned)iprim);
- struct sdis_medium* mdm = interface_get_medium(interf, fluid_side);
-
- RESET_WALK(fluid_side, mdm);
+ RESET_WALK(fluid_side, fluid_mdm);
T.func = XD(convective_path);
res = XD(compute_temperature)(scn, fp_to_meter, &ctx, &rwalk, rng, &T);
if(res != RES_OK) return res;
diff --git a/src/sdis_scene_Xd.h b/src/sdis_scene_Xd.h
@@ -552,7 +552,7 @@ XD(run_analyze)
ASSERT(scn && nprims && indices && interf && nverts && position && out_desc);
res = sencXd(device_create)(scn->dev->logger, scn->dev->allocator,
- 1/*scn->dev->nthreads*/, scn->dev->verbose, &senc);
+ scn->dev->nthreads, scn->dev->verbose, &senc);
if(res != RES_OK) goto error;
res = sencXd(scene_create)(senc,
@@ -896,6 +896,8 @@ XD(setup_enclosures)(struct sdis_scene* scn, struct sencXd(descriptor)* desc)
double tmp[DIM];
unsigned indices[DIM];
unsigned i;
+ log_warn(scn->dev, "# Found internal enclosure with %u materials:\n",
+ header.enclosed_media_count);
#if DIM == 2
FOR_EACH(i, 0, header.vertices_count) {
SENCXD(enclosure_get_vertex(enc, i, tmp));
@@ -916,7 +918,12 @@ XD(setup_enclosures)(struct sdis_scene* scn, struct sencXd(descriptor)* desc)
indices[0]+1, indices[1]+1, indices[2]+1);
}
#endif
+#else
+ log_warn(scn->dev, "Found internal enclosure with %u materials.\n",
+ header.enclosed_media_count);
#endif
+ SENCXD(enclosure_ref_put(enc));
+ enc = NULL;
res = RES_BAD_ARG;
goto error;
}
@@ -1012,6 +1019,7 @@ exit:
if(out_scn) *out_scn = scn;
return res;
error:
+ if(desc) SENCXD(descriptor_ref_put(desc));
if(scn) {
SDIS(scene_ref_put(scn));
scn = NULL;