schiff

Estimate the radiative properties of soft particless
git clone git://git.meso-star.com/schiff.git
Log | Files | Refs | README | LICENSE

commit bd69e8b92cb5ee44ee416ad205b2f030e2edb632
parent d9fcd27a759d806fe899a78c201ebd0d3fcfcd1d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 28 Oct 2015 09:35:32 +0100

Use the sbox [P]RNG type

The schiff integration relies us the [P]RNG type defined by SBox.

Diffstat:
MREADME.md | 1+
Mcmake/CMakeLists.txt | 3++-
Msrc/sbox_schiff_sphere.c | 7+++++--
3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md @@ -12,6 +12,7 @@ The library relies on the [CMake](http://www.cmake.org) and the on the [RSys](https://gitlab.com/vaplv/rsys/) [Star-3D](https://gitlab.com/meso-star/star-3d/), [Star-Schiff](https://gitlab.com/meso-star/star-schiff/), +[Star-MC](https://gitlab.com/meso-star/star-mc/), [Star-SP](https://gitlab.com/meso-star/star-sp/) libraries, and the [Star-Box](https://gitlab.com/meso-schiff/star-box/) software development kit. diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -39,6 +39,7 @@ find_package(RSys 0.2.1 REQUIRED) find_package(Star3D 0.3 REQUIRED) find_package(StarBox 0.3 REQUIRED) find_package(StarSchiff 0.3 REQUIRED) +find_package(StarMC 0.3 REQUIRED) find_package(StarSP 0.3 REQUIRED) if(MSVC) find_package(MuslGetopt REQUIRED) @@ -85,7 +86,7 @@ if(CMAKE_COMPILER_IS_GNUCC) endif() add_library(sbox-schiff SHARED ${SBOX_SCHIFF_FILES_SRC} ${SBOX_SCHIFF_FILES_INC}) -target_link_libraries(sbox-schiff RSys Star3D StarBox StarSchiff StarSP ${MATH_LIB}) +target_link_libraries(sbox-schiff RSys Star3D StarBox StarSchiff StarMC StarSP ${MATH_LIB}) set_target_properties(sbox-schiff PROPERTIES VERSION ${VERSION} SOVERSION ${VERSION_MAJOR}) diff --git a/src/sbox_schiff_sphere.c b/src/sbox_schiff_sphere.c @@ -36,6 +36,7 @@ #include <star/s3d.h> #include <star/sbox_parse.h> #include <star/ssp.h> +#include <star/smc.h> #include <star/sschiff.h> #include <rsys/clock_time.h> @@ -339,6 +340,7 @@ schiff_sphere_run struct sschiff_estimator* estimator = NULL; struct sschiff_estimator_state* states = NULL; struct sschiff_device* sschiff = NULL; + struct ssp_rng_type rng_type; struct ssp_rng* rng = NULL; struct sbox_schiff_mesh mesh; struct time t0, t1; @@ -354,8 +356,9 @@ schiff_sphere_run args->nthetas); goto error; } - /* FIXME use the rng type defined in sbox */ - res = ssp_rng_create(&schiff->allocator, &ssp_rng_threefry, &rng); + + SMC(device_get_rng_type(sbox->smc, &rng_type)); + res = ssp_rng_create(&schiff->allocator, &rng_type, &rng); if(res != RES_OK) { logger_print(&sbox->logger, LOG_ERROR, "Couldn't create the Star Schiff Random Number Generator.\n");