star-gf

Compute Gebhart factors
git clone git://git.meso-star.fr/star-gf.git
Log | Files | Refs | README | LICENSE

commit 860cea807ebed07d6e6f8ef9fcf5cfb7a398c04b
parent 8c28a1fb39f66e66f57f8be63365bce2efa668f7
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 18 Oct 2021 15:41:48 +0200

Merge branch 'release_0.2.4'

Diffstat:
MREADME.md | 24++++++++++++++----------
Mcmake/CMakeLists.txt | 4++--
Msrc/test_sgf_cube.c | 6+++---
Msrc/test_sgf_estimator.c | 6+++---
Msrc/test_sgf_scene.c | 8++++----
Msrc/test_sgf_square.c | 6+++---
Msrc/test_sgf_tetrahedron.c | 6+++---
7 files changed, 32 insertions(+), 28 deletions(-)

diff --git a/README.md b/README.md @@ -55,22 +55,26 @@ for further informations on CMake). ## Release notes +### Version 0.2.4 + +Sets the required version of Star-SampPling to 0.12. This version fixes +compilation errors with gcc 11 but introduces API breaks. + ### Version 0.2.3 -- Fix API break on filter function introduced by Star-3D 0.8. +Fix API break on filter function introduced by Star-3D 0.8. ### Version 0.2.2 -- Bump the version of the dependencies and fix the code to handle their - updates. +Bump the version of the dependencies and fix the code to handle their updates. ### Version 0.2.1 -- Fix a crash that occurred in scenes having medium with a null absorption. In - such scenes, radiative flux going to infinity are not allowed and must be - handled as a numerical imprecision or a scene inconsistency. This was not the - case: this flux was accumulated into a specific counter that was not - initialised since, in this situation, such flux could not exist. +Fix a crash that occurred in scenes having medium with a null absorption. In +such scenes, radiative flux going to infinity are not allowed and must be +handled as a numerical imprecision or a scene inconsistency. This was not the +case: this flux was accumulated into a specific counter that was not +initialised since, in this situation, such flux could not exist. ### Version 0.2 @@ -79,8 +83,8 @@ for further informations on CMake). ## License -Copyright (C) 2021 |Meso|Star> (<contact@meso-star.com>). -Copyright (C) 2015-2018 EDF S.A., France (<syrthes-support@edf.fr>). +Copyright (C) 2021 |Meso|Star> (<contact@meso-star.com>). +Copyright (C) 2015-2018 EDF S.A., France (<syrthes-support@edf.fr>). Star-GF is free software released under the GPL v3+ license: GNU GPL version 3 or later. You are welcome to redistribute it under certain conditions; refer to diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -26,7 +26,7 @@ option(NO_TEST "Disable the test" OFF) ################################################################################ find_package(RCMake 0.2.3 REQUIRED) find_package(RSys 0.6 REQUIRED) -find_package(StarSP 0.7 REQUIRED) +find_package(StarSP 0.12 REQUIRED) find_package(Star3D 0.8 REQUIRED) find_package(Star2D 0.5 REQUIRED) find_package(OpenMP 1.2 REQUIRED) @@ -45,7 +45,7 @@ include(rcmake_runtime) ################################################################################ set(VERSION_MAJOR 0) set(VERSION_MINOR 2) -set(VERSION_PATCH 3) +set(VERSION_PATCH 4) set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) set(SGF_FILES_SRC diff --git a/src/test_sgf_cube.c b/src/test_sgf_cube.c @@ -47,7 +47,7 @@ static const float vertices[] = { 0.f, 1.f, 1.f, 1.f, 1.f, 1.f }; -static const size_t nvertices = sizeof(vertices) / sizeof(float[3]); +static const size_t nvertices = sizeof(vertices) / (3*sizeof(float)); /* Front faces are CW. The normals point into the cube */ static const unsigned indices[] = { @@ -58,7 +58,7 @@ static const unsigned indices[] = { 2, 6, 3, 3, 6, 7, /* Top */ 0, 1, 4, 4, 1, 5 /* Bottom */ }; -static const size_t nprims = (int)(sizeof(indices) / sizeof(unsigned[3])); +static const size_t nprims = sizeof(indices) / (3*sizeof(unsigned)); static const double emissivity[] = { 0.6, 0.6, /* Front */ @@ -165,7 +165,7 @@ main(int argc, char** argv) mem_init_proxy_allocator(&allocator, &mem_default_allocator); nbuckets = (unsigned)omp_get_num_procs(); - CHK(ssp_rng_proxy_create(&allocator, &ssp_rng_threefry, nbuckets, &proxy) == RES_OK); + CHK(ssp_rng_proxy_create(&allocator, SSP_RNG_THREEFRY, nbuckets, &proxy) == RES_OK); CHK(sgf_device_create(NULL, &allocator, 1, &sgf) == RES_OK); CHK(sgf_scene_create(sgf, &scn) == RES_OK); diff --git a/src/test_sgf_estimator.c b/src/test_sgf_estimator.c @@ -34,7 +34,7 @@ static const float vertices[] = { 0.f, 1.f, 1.f, 1.f, 1.f, 1.f }; -static const size_t nvertices = sizeof(vertices) / sizeof(float[3]); +static const size_t nvertices = sizeof(vertices) / (3*sizeof(float)); /* Front faces are CW. The normals point into the cube */ static const unsigned indices[] = { @@ -45,7 +45,7 @@ static const unsigned indices[] = { 2, 6, 3, 3, 6, 7, /* Top */ 0, 1, 4, 4, 1, 5 /* Bottom */ }; -static const size_t nprims = (int)(sizeof(indices) / sizeof(unsigned[3])); +static const size_t nprims = sizeof(indices) / (3*sizeof(unsigned)); static const double emissivity[] = { 0.6, 0.6, /* Front */ @@ -80,7 +80,7 @@ main(int argc, char** argv) mem_init_proxy_allocator(&allocator, &mem_default_allocator); - CHK(ssp_rng_create(&allocator, &ssp_rng_threefry, &rng) == RES_OK); + CHK(ssp_rng_create(&allocator, SSP_RNG_THREEFRY, &rng) == RES_OK); CHK(sgf_device_create(NULL, &allocator, 1, &sgf) == RES_OK); CHK(sgf_scene_create(sgf, &scn) == RES_OK); diff --git a/src/test_sgf_scene.c b/src/test_sgf_scene.c @@ -26,9 +26,9 @@ static const float plane_verts[] = { 0.f, 1.f, 0.f, 1.f, 1.f, 0.f, }; -static const size_t plane_nverts = sizeof(plane_verts) / sizeof(float[3]); +static const size_t plane_nverts = sizeof(plane_verts) / (3*sizeof(float)); static const unsigned plane_ids[] = { 0, 2, 1, 1, 2, 3 }; -static const size_t plane_nprims = (int)(sizeof(plane_ids) / sizeof(unsigned[3])); +static const size_t plane_nprims = sizeof(plane_ids) / (3*sizeof(unsigned)); static const double plane_emi[] = { 0.6, 0.6 }; static const double plane_emi_bad[] = { 0.6, 1.1 }; static const double plane_spec[] = { 0.0, 0.0 }; @@ -45,14 +45,14 @@ static const float square_verts[] = { 0.f, 1.f, 1.f, 1.f }; -const unsigned square_nverts = sizeof(square_verts)/sizeof(float[2]); +const unsigned square_nverts = sizeof(square_verts)/(2*sizeof(float)); const unsigned square_ids[] = { 0, 1, /* Bottom */ 1, 2, /* Left */ 2, 3, /* Top */ 3, 0 /* Right */ }; -const unsigned square_nprims = sizeof(square_ids)/sizeof(unsigned[2]); +const unsigned square_nprims = sizeof(square_ids)/(2*sizeof(unsigned)); static const double square_emi[] = { 1.0, /* Bottom */ 1.0, /* Left */ diff --git a/src/test_sgf_square.c b/src/test_sgf_square.c @@ -31,7 +31,7 @@ static const float vertices[] = { 0.f, 1.f, 1.f, 1.f }; -const unsigned nverts = sizeof(vertices)/sizeof(float[2]); +const unsigned nverts = sizeof(vertices)/(2*sizeof(float)); const unsigned indices[] = { 0, 1, /* Bottom */ @@ -39,7 +39,7 @@ const unsigned indices[] = { 2, 3, /* Top */ 3, 0 /* Right */ }; -const unsigned nsegs = sizeof(indices)/sizeof(unsigned[2]); +const unsigned nsegs = sizeof(indices)/(2*sizeof(unsigned)); static const double emissivity[] = { 1.0, /* Bottom */ @@ -120,7 +120,7 @@ main(int argc, char** argv) mem_init_proxy_allocator(&allocator, &mem_default_allocator); - CHK(ssp_rng_create(&allocator, &ssp_rng_threefry, &rng) == RES_OK); + CHK(ssp_rng_create(&allocator, SSP_RNG_THREEFRY, &rng) == RES_OK); CHK(sgf_device_create(NULL, &allocator, 1, &sgf) == RES_OK); CHK(sgf_scene_create(sgf, &scn) == RES_OK); diff --git a/src/test_sgf_tetrahedron.c b/src/test_sgf_tetrahedron.c @@ -32,7 +32,7 @@ static const float vertices[] = { -0.28867513459481288225f, -0.5f, 0.f, 0.f, 0.f, 0.81649658092772603273f }; -static const size_t nvertices = sizeof(vertices) / sizeof(float[3]); +static const size_t nvertices = sizeof(vertices) / (3*sizeof(float)); /* Front faces are CW. The normals point into the cube */ static const unsigned indices[] = { @@ -41,7 +41,7 @@ static const unsigned indices[] = { 1, 2, 3, 0, 3, 2 }; -static const size_t nprims = sizeof(indices) / sizeof(unsigned[3]); +static const size_t nprims = sizeof(indices) / (3*sizeof(unsigned)); static const double emissivity[] = { 0.5, 1.0, 1.0, 1.0 }; static const double specularity[] = { 0.0, 0.0, 0.0, 0.0 }; @@ -64,7 +64,7 @@ main(int argc, char** argv) mem_init_proxy_allocator(&allocator, &mem_default_allocator); nbuckets = (unsigned)omp_get_num_procs(); - CHK(ssp_rng_proxy_create(&allocator, &ssp_rng_threefry, nbuckets, &proxy) == RES_OK); + CHK(ssp_rng_proxy_create(&allocator, SSP_RNG_THREEFRY, nbuckets, &proxy) == RES_OK); CHK(sgf_device_create(NULL, &allocator, 1, &sgf) == RES_OK); CHK(sgf_scene_create(sgf, &scn) == RES_OK);