commit f74abdfb354d45329817cb98b2f715b2896b19a4
parent 08b849807dff0083a77670ba980357287b88633d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Sat, 16 Sep 2017 15:30:18 +0200
Merge branch 'release_0.4'
Diffstat:
5 files changed, 46 insertions(+), 25 deletions(-)
diff --git a/README.md b/README.md
@@ -60,6 +60,14 @@ informations on CMake.
## Release notes
+### Version 0.4
+
+- Update the color of the paths outputted with the `-p` option. A path is blue,
+ turquoise or yellow if it reaches a receiver, misses the receivers or is
+ occluded before it reaches a primary reflector, respectively.
+- Add a new type of paths tracked with the `-p` option: a path is red if it
+ travels unforeseen mediums.
+
### Version 0.3
- Fix several issues in the output results. Refer to the Solsice-Solver 0.3
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -45,7 +45,7 @@ find_package(LibYAML REQUIRED)
find_package(RCMake 0.2.3 REQUIRED)
find_package(RSys 0.4 REQUIRED)
find_package(SolAnim 0.1 REQUIRED)
-find_package(SolSolver 0.3 REQUIRED)
+find_package(SolSolver 0.4 REQUIRED)
find_package(Star3DUT 0.2 REQUIRED)
find_package(StarSP 0.4 REQUIRED)
find_package(StarSTL 0.3.1 REQUIRED)
@@ -96,7 +96,7 @@ configure_file(${SOLSTICE_SOURCE_DIR}/../doc/solstice.1.txt.in
${CMAKE_CURRENT_BINARY_DIR}/doc/solstice.1.txt @ONLY)
set(VERSION_MAJOR 0)
-set(VERSION_MINOR 3)
+set(VERSION_MINOR 4)
set(VERSION_PATCH 0)
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
diff --git a/doc/solstice-output.5.txt b/doc/solstice-output.5.txt
@@ -415,10 +415,13 @@ DUMP RADIATIVE PATHS
For each sun direction, the *dump-radiative-paths-output* lists the geometric
data of the radiative paths sampled during a simulation. Each path is colored
-with respect to its trajectory: the path is blue or yellow whether it reaches
-or not a receiver, respectively. A path can be red if its first segment, i.e.
-the ray starting from the sun toward a primary geometry, is occluded by a non
-virtual object. The following grammar describes the formatting of a
+with respect to its type: the path is yellow if its first segment, i.e.
+the ray starting from the sun towards a primary geometry, is occluded by a non
+virtual object. If not occluded, the path can be blue or turquoise whether it
+reaches a receiver or not, respectively. Finally, the path can also be red if
+it was canceled due to a topologically incoherent impact (i.e. an impact on
+a surface not at the boundary of the medium in which the rays was propagating).
+The following grammar describes the formatting of a
*VTK-RADIATIVE-PATHS* file. Refer to the VTK format specification [2] for more
informations on the VTK file format.
@@ -436,10 +439,12 @@ VTK-RADIATIVE-PATHS ::= # vtk DataFile Version 2.0
SCALAR Radiative_path_type float 1
LOOKUP_TABLE path_type
<paths-type>
- LOOKUP_TABLE path_type 3
- <color-occlude>
+ LOOKUP_TABLE path_type 5
+ <color-error>
+ <color-unused>
<color-success>
<color-missing>
+ <color-occluded>
<paths-vertices> ::= <real3>
[ <real3> ... ] # up to <#vertices>
@@ -452,13 +457,17 @@ VTK-RADIATIVE-PATHS ::= # vtk DataFile Version 2.0
<paths-type> ::= <color-id>
[ <color-id> ... ] # up to <#paths>
-<color-id> ::= 0.0 # occlude
- | 0.5 # success
- | 1.0 # missing
-
-<color-occlude> ::= 1.0 0.0 0.0 1.0
+<color-id> ::= 0.0 # Red: for error paths
+ | 0.25 # Green: unused
+ | 0.5 # Blue: for success paths
+ | 0.75 # Turquoise: for missing paths
+ | 1.0 # Yellow: for occluded paths
+
+<color-error> ::= 1.0 0.0 0.0 1.0
+<color-unused> ::= 0.0 1.0 0.0 1.0
<color-success> ::= 0.0 0.0 1.0 1.0
-<color-missing> ::= 1.0 1.0 0.0 1.0
+<color-missing> ::= 0.0 1.0 1.0 1.0
+<color-occluded> ::= 1.0 1.0 0.0 1.0
<#paths> ::= INTEGER
<#path-segments> ::= INTEGER
diff --git a/src/solstice_object.c b/src/solstice_object.c
@@ -217,7 +217,8 @@ create_cylinder
cylinder = solparser_get_shape_cylinder(solstice->parser, cylinder_id);
ASSERT(cylinder->nslices > 0 && cylinder->nslices < UINT_MAX);
res = s3dut_create_cylinder(solstice->allocator, cylinder->radius,
- cylinder->height, (unsigned)cylinder->nslices, 1, &mesh);
+ cylinder->height, (unsigned)cylinder->nslices, (unsigned)cylinder->nstacks,
+ &mesh);
if(res != RES_OK) {
fprintf(stderr, "Could not create the cylinder 3D data.\n");
goto error;
diff --git a/src/solstice_solve.c b/src/solstice_solve.c
@@ -107,8 +107,8 @@ write_mc_global(struct solstice* solstice, struct ssol_estimator* estimator)
str_cget(name), (unsigned)id, area,
front.absorbed_flux.E, front.absorbed_flux.SE,
front.incoming_flux.E, front.incoming_flux.SE,
- front.incoming_lost_in_field.E, front.incoming_lost_in_field.SE,
- front.incoming_lost_in_atmosphere.E, front.incoming_lost_in_atmosphere.SE,
+ front.absorbed_lost_in_field.E, front.absorbed_lost_in_field.SE,
+ front.absorbed_lost_in_atmosphere.E, front.absorbed_lost_in_atmosphere.SE,
f_eff_E, f_eff_SE,
back.absorbed_flux.E, back.absorbed_flux.SE,
back.incoming_flux.E, back.incoming_flux.SE,
@@ -181,8 +181,8 @@ write_mc_global(struct solstice* solstice, struct ssol_estimator* estimator)
(unsigned) rcv_id, (unsigned) prim_id,
front.absorbed_flux.E, front.absorbed_flux.SE,
front.incoming_flux.E, front.incoming_flux.SE,
- front.incoming_lost_in_field.E, front.incoming_lost_in_field.SE,
- front.incoming_lost_in_atmosphere.E, front.incoming_lost_in_atmosphere.SE,
+ front.absorbed_lost_in_field.E, front.absorbed_lost_in_field.SE,
+ front.absorbed_lost_in_atmosphere.E, front.absorbed_lost_in_atmosphere.SE,
back.absorbed_flux.E, back.absorbed_flux.SE,
back.incoming_flux.E, back.incoming_flux.SE,
back.absorbed_lost_in_field.E, back.absorbed_lost_in_field.SE,
@@ -449,16 +449,19 @@ write_paths(struct solstice* solstice, struct ssol_estimator* estimator)
SSOL(estimator_get_tracked_path(estimator, ipath, &path));
SSOL(path_get_type(&path, &type));
switch(type) {
- case SSOL_PATH_MISSING: fprintf(solstice->output, "1.0\n"); break;
+ case SSOL_PATH_ERROR: fprintf(solstice->output, "0.0\n"); break;
case SSOL_PATH_SUCCESS: fprintf(solstice->output, "0.5\n"); break;
- case SSOL_PATH_SHADOW: fprintf(solstice->output, "0.0\n"); break;
+ case SSOL_PATH_MISSING: fprintf(solstice->output, "0.75\n"); break;
+ case SSOL_PATH_SHADOW: fprintf(solstice->output, "1.0\n"); break;
default: FATAL("Unreachable code.\n"); break;
}
}
- fprintf(solstice->output, "LOOKUP_TABLE path_type 3\n");
- fprintf(solstice->output, "1.0 0.0 0.0 1.0\n");
- fprintf(solstice->output, "0.0 0.0 1.0 1.0\n");
- fprintf(solstice->output, "1.0 1.0 0.0 1.0\n");
+ fprintf(solstice->output, "LOOKUP_TABLE path_type 5\n");
+ fprintf(solstice->output, "1.0 0.0 0.0 1.0\n"); /* 0.0 = Red: for error paths */
+ fprintf(solstice->output, "0.0 1.0 0.0 1.0\n"); /* 0.25 = Green: unused */
+ fprintf(solstice->output, "0.0 0.0 1.0 1.0\n"); /* 0.5 = Blue: for success paths */
+ fprintf(solstice->output, "0.0 1.0 1.0 1.0\n"); /* 0.75 = Turquoise: for missing paths */
+ fprintf(solstice->output, "1.0 1.0 0.0 1.0\n"); /* 1.0 = Yellow: for occluded paths */
}
/*******************************************************************************