commit a1bdec6fca554fb55d62fb23b21bd58957bc641a
parent 4df31981118ddb14090351d262eb76ddaa8d25db
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 13 May 2026 15:25:33 +0200
Merge branch 'release_0.5'
Diffstat:
16 files changed, 419 insertions(+), 199 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1,11 +1,12 @@
+.config
.gitignore
-CMakeCache.txt
-CMakeFiles
-Makefile
-tmp
-[Bb]uild*
+.test
+*.[aod]
+*.pc
+*.so
*.sw[po]
-*.[ao]
*~
+[Bb]uild*
tags
-
+test*
+!test*.[ch]
diff --git a/Makefile b/Makefile
@@ -0,0 +1,190 @@
+# Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique
+# Copyright (C) 2026 Clermont Auvergne INP
+# Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux
+# Copyright (C) 2020, 2021, 2023, 2026 |Méso|Star> (contact@meso-star.com)
+# Copyright (C) 2026 Université de Lorraine
+# Copyright (C) 2026 Université de Toulouse
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+.POSIX:
+.SUFFIXES: # Clean up default inference rules
+
+include config.mk
+
+LIBNAME_STATIC = libsschiff.a
+LIBNAME_SHARED = libsschiff.so
+LIBNAME = $(LIBNAME_$(LIB_TYPE))
+
+default: library
+all: default tests
+
+################################################################################
+# Star-3D building
+################################################################################
+SRC =\
+ src/sschiff_device.c\
+ src/sschiff_estimator.c\
+ src/sschiff_scattering_angles_distributions.c
+OBJ = $(SRC:.c=.o)
+DEP = $(SRC:.c=.d)
+
+CFLAGS_LIB = $(CFLAGS_SO) $(INCS) -DSSCHIFF_SHARED_BUILD
+LDFLAGS_LIB = $(LDFLAGS_SO) $(LIBS)
+
+library: .config $(DEP)
+ @$(MAKE) -fMakefile $$(for i in $(DEP); do echo -f "$${i}"; done) \
+ $$(if [ -n "$(LIBNAME)" ]; then \
+ echo "$(LIBNAME)"; \
+ else \
+ echo "$(LIBNAME_SHARED)"; \
+ fi)
+
+$(DEP) $(OBJ): config.mk
+
+$(LIBNAME_SHARED): $(OBJ)
+ $(CC) $(CFLAGS_LIB) -o $@ $(OBJ) $(LDFLAGS_LIB)
+
+$(LIBNAME_STATIC): libsschiff.o
+ $(AR) -rc $@ $?
+ $(RANLIB) $@
+
+libsschiff.o: $(OBJ)
+ $(LD) -r $(OBJ) -o $@
+ $(OBJCOPY) $(OCPFLAGS) $@
+
+.config: Makefile config.mk
+ $(PKG_CONFIG) --atleast-version $(GSL_VERSION) gsl
+ $(PKG_CONFIG) --atleast-version $(RSYS_VERSION) rsys
+ $(PKG_CONFIG) --atleast-version $(S3D_VERSION) s3d
+ $(PKG_CONFIG) --atleast-version $(SSP_VERSION) star-sp
+ echo "config done" > $@
+
+.SUFFIXES: .c .d .o
+.c.d:
+ @$(CC) $(CFLAGS_LIB) -MM -MT "$(@:.d=.o) $@" $< -MF $@
+
+.c.o:
+ $(CC) $(CFLAGS_LIB) -c $< -o $@
+
+################################################################################
+# Installation
+################################################################################
+pkg:
+ sed -e 's#@PREFIX@#$(PREFIX)#g'\
+ -e 's#@VERSION@#$(VERSION)#g'\
+ -e 's#@GSL_VERSION@#$(GSL_VERSION)#g'\
+ -e 's#@RSYS_VERSION@#$(RSYS_VERSION)#g'\
+ -e 's#@S3D_VERSION@#$(S3D_VERSION)#g'\
+ -e 's#@SSP_VERSION@#$(SSP_VERSION)#g'\
+ sschiff.pc.in > sschiff.pc
+
+sschiff-local.pc: sschiff.pc.in
+ sed -e '1d'\
+ -e 's#^includedir=.*#includedir=./src/#'\
+ -e 's#^libdir=.*#libdir=./#'\
+ -e 's#@VERSION@#$(VERSION)#g'\
+ -e 's#@GSL_VERSION@#$(GSL_VERSION)#g'\
+ -e 's#@RSYS_VERSION@#$(RSYS_VERSION)#g'\
+ -e 's#@S3D_VERSION@#$(S3D_VERSION)#g'\
+ -e 's#@SSP_VERSION@#$(SSP_VERSION)#g'\
+ sschiff.pc.in > $@
+
+install: library pkg
+ install() { mode="$$1"; prefix="$$2"; shift 2; \
+ mkdir -p "$${prefix}"; \
+ cp "$$@" "$${prefix}"; \
+ printf '%s\n' "$${@}" | while read -r i; do \
+ chmod "$${mode}" "$${prefix}/$${i##*/}"; \
+ done; \
+ }; \
+ if [ "$(LIB_TYPE)" = "STATIC" ]; then mode=644; else mode=755; fi; \
+ install "$${mode}" "$(DESTDIR)$(LIBPREFIX)" $(LIBNAME); \
+ install 644 "$(DESTDIR)$(LIBPREFIX)/pkgconfig" sschiff.pc; \
+ install 644 "$(DESTDIR)$(INCPREFIX)/star" src/sschiff.h; \
+ install 644 "$(DESTDIR)$(PREFIX)/share/doc/star-schiff" COPYING README.md
+
+uninstall:
+ rm -f "$(DESTDIR)$(LIBPREFIX)/$(LIBNAME)"
+ rm -f "$(DESTDIR)$(LIBPREFIX)/pkgconfig/sschiff.pc"
+ rm -f "$(DESTDIR)$(INCPREFIX)/star/sschiff.h"
+ rm -f "$(DESTDIR)$(PREFIX)/share/doc/star-schiff/COPYING"
+ rm -f "$(DESTDIR)$(PREFIX)/share/doc/star-schiff/README.md"
+
+clean: clean_test
+ rm -f $(OBJ) $(DEP) $(LIBNAME)
+ rm -f .config libsschiff.o sschiff.pc sschiff-local.pc
+
+################################################################################
+# Tests
+################################################################################
+TEST_SRC =\
+ src/test_sschiff_device.c\
+ src/test_sschiff_estimator_cylinder.c\
+ src/test_sschiff_estimator_rhodo.c\
+ src/test_sschiff_estimator_sphere.c
+TEST_OBJ = $(TEST_SRC:.c=.o)
+TEST_DEP = $(TEST_SRC:.c=.d)
+TEST_TGT = $(TEST_SRC:.c=.t)
+
+PKG_CONFIG_LOCAL = PKG_CONFIG_PATH="./:$${PKG_CONFIG_PATH}" $(PKG_CONFIG)
+INCS_TEST = $$($(PKG_CONFIG_LOCAL) $(PCFLAGS) --cflags rsys s3d star-sp sschiff-local)
+LIBS_TEST = $$($(PKG_CONFIG_LOCAL) $(PCFLAGS) --libs rsys s3d star-sp sschiff-local) -lm
+
+CFLAGS_TEST = $(CFLAGS_EXE) $(INCS_TEST)
+LDFLAGS_TEST = $(LDFLAGS_EXE) $(LIBS_TEST)
+
+tests: library $(TEST_DEP) $(TEST_TGT)
+ @$(MAKE) -fMakefile \
+ $$(for i in $(TEST_DEP); do echo -f"$${i}"; done) \
+ $$(for i in $(TEST_TGT); do echo -f"$${i}"; done) \
+ test_list
+
+$(TEST_TGT):
+ @{ \
+ exe="$$(basename "$@" ".t")"; \
+ printf '%s: %s\n' "$${exe}" $(@:.t=.o); \
+ printf 'test_list: %s\n' "$${exe}"; \
+ } > $@
+
+$(TEST_DEP): config.mk sschiff-local.pc
+ @$(CC) $(CFLAGS_TEST) -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@
+
+$(TEST_OBJ): config.mk sschiff-local.pc
+ $(CC) $(CFLAGS_TEST) -c $(@:.o=.c) -o $@
+
+clean_test:
+ rm -f $(TEST_DEP) $(TEST_OBJ) $(TEST_TGT) mixture.txt
+ for i in $(TEST_SRC); do rm -f "$$(basename "$${i}" ".c")"; done
+
+test_sschiff_device\
+test_sschiff_estimator_cylinder\
+test_sschiff_estimator_rhodo\
+test_sschiff_estimator_sphere\
+: config.mk sschiff-local.pc $(LIBNAME)
+ $(CC) $(CFLAGS_TEST) -o $@ src/$@.o $(LDFLAGS_TEST)
+
+test: tests
+ @err=0; \
+ for i in $(TEST_SRC); do \
+ test="$$(basename "$${i}" ".c")"; \
+ printf '%s' "$${test}"; \
+ if "./$${test}" > /dev/null 2>&1; then \
+ printf '\n'; \
+ else \
+ printf ': error %s\n' "$$?"; \
+ err=$$((err+1)); \
+ fi \
+ done; \
+ [ "$${err}" -eq 0 ]
diff --git a/README.md b/README.md
@@ -1,64 +1,83 @@
# Star Schiff
-The purpose of this library is to numerically solve the radiative properties of
-soft particles with respect to an "Approximation Method for Short Wavelength or
-High-Energy Scattering" (L. Schiff, 1956). The Monte-Carlo Method is used in
-order to solve Maxwell's equations within Schiff's approximation, as presented
-in
+Star Schiff is a C library that estimates the radiative properties of
+soft particles following an "Approximation Method for Short Wavelength
+or High-Energy Scattering" (L. Schiff, 1956).
+The Monte Carlo Method is used in order to solve Maxwell's equations
+within Schiff's approximation, as presented in
[Charon et al.2015](http://www.sciencedirect.com/science/article/pii/S0022407315003283).
-The main advantages of using this method are: the possibility to address any shape
-of particle, and the results are provided with a numerical accuracy. The user
-has therefore the ability to increase the computation time in order to obtain
-more accurate results if needed.
-
-Monte-Carlo is used to estimates total cross-sections (absorption, scattering
-and extinction cross-sections) in addition to the phase function, its
-cumulative and its inverse cumulative, for a mixture of several particles.
-These set of particles is defined by its optical properties (refractive index,
-provided at various wavelengths) and a geometry distribution that controls the
-shape of the particles.
-
-## How to build
-
-The Star-Schiff library relies on the [CMake](http://www.cmake.org) and the
-[RCMake](https://gitlab.com/vaplv/rcmake/) package to build. It also depends on the
-[GNU Scientific Library](http://www.gnu.org/software/gsl/),
-[RSys](https://gitlab.com/vaplv/rsys/),
-[Star-3D](https://gitlab.com/meso-star/star-3d/) and
-[Star-SP](https://gitlab.com/meso-star/star-sp/) libraries.
-
-First ensure that CMake is installed on your system. Then install the RCMake
-package as well as all the aforementioned Star-Schiff prerequisites. Then
-generate the project from the `cmake/CMakeLists.txt` file by appending to the
-`CMAKE_PREFIX_PATH` variable the install directories of its dependencies.
+The main advantages of using this method are the possibility to address
+any shape of particle, and the results are provided with a numerical
+accuracy.
+The user has therefore the ability to increase the computation time to
+obtain more accurate results if needed.
+
+Monte Carlo is used to estimate total cross-sections (absorption,
+scattering and extinction cross-sections) in addition to the phase
+function, its cumulative and its inverse cumulative, for a mixture of
+several particles.
+These set of particles is defined by its optical properties (refractive
+index, provided at various wavelengths) and a geometry distribution that
+controls the shape of the particles.
+
+## Prerequisites
+
+- C compiler with OpenMP support
+- POSIX make
+- pkg-config
+- [GNU Scientific Library](http://www.gnu.org/software/gsl)
+- [RSys](https://gitlab.com/vaplv/rsys)
+- [Star 3D](https://gitlab.com/meso-star/star-3d)
+- [Star SamPling](https://gitlab.com/meso-star/star-sp)
+
+## Installation
+
+Edit config.mk as needed, then run:
+
+ make clean install
## Release notes
+### Version 0.5
+
+- Replace CMake by Makefile as build system.
+- Update compiler and linker flags to increase the security and
+ robustness of generated binaries.
+- Provide a pkg-config file to link the library as an external
+ dependency.
+
### Version 0.4.1
-Sets the required version of Star-SampPling to 0.12. This version fixes
-compilation errors with gcc 11 but introduces API breaks.
+Sets the required version of Star-SampPling to 0.12.
+This version fixes compilation errors with gcc 11 but introduces API
+breaks.
### Version 0.4
-- Update the `struct sschiff_geometry_distribution` data structure. The
- `sample` function now only samples the particle geometry. Its volume scaling
- is sampled through the new `sample_volume_scaling` function. This scaling
- factor is now sampled at the same frequency than the particle orientation,
- i.e. several times per sampled particle geometry.
-- Relax constraints on the minimum number of scattering angles. It is now set
- to 2 rather than 3, i.e. the scattering can be purely forward or backward.
-- Overall update of the project dependencies. Most notably, the update of the
- Star-3D library drastically improves the performances of sampling particles
- with the same shape.
+- Update the `struct sschiff_geometry_distribution` data structure.
+ The `sample` function now only samples the particle geometry.
+ Its volume scaling is sampled through the new `sample_volume_scaling`
+ function.
+ This scaling factor is now sampled at the same frequency than the
+ particle orientation, i.e. several times per sampled particle
+ geometry.
+- Relax constraints on the minimum number of scattering angles. It is
+ now set to 2 rather than 3, i.e. the scattering can be purely forward
+ or backward.
+- Overall update of the project dependencies.
+ Most notably, the update of the Star 3D library drastically improves
+ the performances of sampling particles with the same shape.
- Add an option to avoid the analytic computations of wide angles.
## Copying
-Copyright (C) 2020, 2021 |Meso|Star> (<contact@meso-star.com>).
-Copyright (C) 2015, 2016 CNRS.
+Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique
+Copyright (C) 2026 Clermont Auvergne INP
+Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux
+Copyright (C) 2020, 2021, 2023, 2026 |Méso|Star> (contact@meso-star.com)
+Copyright (C) 2026 Université de Lorraine
+Copyright (C) 2026 Université de Toulouse
Star-Schiff 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 the COPYING file for details.
-
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -1,126 +0,0 @@
-# Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com)
-# Copyright (C) 2015, 2016 CNRS
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-cmake_minimum_required(VERSION 3.1)
-project(star-schiff C)
-enable_testing()
-
-set(SSCHIFF_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src)
-option(NO_TEST "Disable the test" OFF)
-
-################################################################################
-# Check dependencies
-################################################################################
-find_package(RCMake 0.4 REQUIRED)
-find_package(RSys 0.8 REQUIRED)
-find_package(StarSP 0.12 REQUIRED)
-find_package(Star3D 0.8 REQUIRED)
-find_package(OpenMP 1.2 REQUIRED)
-find_package(PkgConfig REQUIRED)
-
-# Resolve the absolute paths of the submitted prefix paths. This is required
-# by the pkg_check_modules routine to correctly handle the paths listed in
-# CMAKE_PREFIX_PATH
-set(_prefix_paths ${CMAKE_PREFIX_PATH})
-set(CMAKE_PREFIX_PATH)
-foreach(_path ${_prefix_paths})
- get_filename_component(_abs_path ${_path} ABSOLUTE)
- list(APPEND CMAKE_PREFIX_PATH ${_abs_path})
-endforeach()
-
-set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH 1)
-pkg_check_modules(GSL REQUIRED gsl)
-find_package(GSL REQUIRED)
-
-include_directories(
- ${RSys_INCLUDE_DIR}
- ${StarSP_INCLUDE_DIR}
- ${Star3D_INCLUDE_DIR}
- ${GSL_INCLUDE_DIRS})
-
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR})
-include(rcmake)
-include(rcmake_runtime)
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-omit-frame-pointer")
-
-################################################################################
-# Configure and define targets
-################################################################################
-set(VERSION_MAJOR 0)
-set(VERSION_MINOR 4)
-set(VERSION_PATCH 1)
-set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
-
-set(SSCHIFF_FILES_SRC
- sschiff_device.c
- sschiff_estimator.c
- sschiff_scattering_angles_distributions.c)
-set(SSCHIFF_FILES_INC_API sschiff.h)
-set(SSCHIFF_FILES_INC sschiff_device.h)
-set(SSCHIFF_FILES_DOC COPYING README.md)
-
-# Prepend each file in the `SSCHIFF_FILES_<SRC|INC>' list by `SSCHIFF_SOURCE_DIR'
-rcmake_prepend_path(SSCHIFF_FILES_SRC ${SSCHIFF_SOURCE_DIR})
-rcmake_prepend_path(SSCHIFF_FILES_INC_API ${SSCHIFF_SOURCE_DIR})
-rcmake_prepend_path(SSCHIFF_FILES_INC ${SSCHIFF_SOURCE_DIR})
-rcmake_prepend_path(SSCHIFF_FILES_DOC ${PROJECT_SOURCE_DIR}/../)
-
-add_library(sschiff SHARED ${SSCHIFF_FILES_SRC} ${SSCHIFF_FILES_INC_API} ${SSCHIFF_FILES_INC})
-set_target_properties(sschiff PROPERTIES
- DEFINE_SYMBOL SSCHIFF_SHARED_BUILD
- VERSION ${VERSION}
- SOVERSION ${VERSION_MAJOR})
-
-target_link_libraries(sschiff RSys Star3D StarSP ${GSL_LIBRARIES})
-if(CMAKE_COMPILER_IS_GNUCC)
- target_link_libraries(sschiff m)
-endif()
-
-set_target_properties(sschiff PROPERTIES
- COMPILE_FLAGS ${OpenMP_C_FLAGS}
- COMPILE_DEFINITIONS SSCHIFF_USE_OPENMP)
-if(CMAKE_COMPILER_IS_GNUCC)
- set_target_properties(sschiff PROPERTIES LINK_FLAGS ${OpenMP_C_FLAGS})
-endif()
-
-rcmake_setup_devel(sschiff StarSchiff ${VERSION} star/sschiff_version.h)
-
-################################################################################
-# Add tests
-################################################################################
-if(NOT NO_TEST)
- function(new_test _name)
- add_executable(${_name} ${SSCHIFF_SOURCE_DIR}/${_name}.c)
- target_link_libraries(${_name} sschiff RSys)
- add_test(${_name} ${_name})
- endfunction(new_test)
- new_test(test_sschiff_device)
- new_test(test_sschiff_estimator_sphere)
- new_test(test_sschiff_estimator_cylinder)
- new_test(test_sschiff_estimator_rhodo)
- rcmake_copy_runtime_libraries(test_sschiff_device)
-endif()
-
-################################################################################
-# Define output & install directories
-################################################################################
-install(TARGETS sschiff
- ARCHIVE DESTINATION bin
- LIBRARY DESTINATION lib
- RUNTIME DESTINATION bin)
-install(FILES ${SSCHIFF_FILES_INC_API} DESTINATION include/star)
-install(FILES ${SSCHIFF_FILES_DOC} DESTINATION share/doc/star-schiff)
-
diff --git a/config.mk b/config.mk
@@ -0,0 +1,81 @@
+VERSION = 0.5
+
+PREFIX = /usr/local
+LIBPREFIX = $(PREFIX)/lib
+INCPREFIX = $(PREFIX)/include
+
+LIB_TYPE = SHARED
+#LIB_TYPE = STATIC
+
+BUILD_TYPE = RELEASE
+#BUILD_TYPE = DEBUG
+
+################################################################################
+# Tools
+################################################################################
+AR = ar
+CC = cc
+LD = ld
+OBJCOPY = objcopy
+PKG_CONFIG = pkg-config
+RANLIB = ranlib
+
+################################################################################
+# Dependencies
+################################################################################
+PCFLAGS_SHARED =
+PCFLAGS_STATIC = --static
+PCFLAGS = $(PCFLAGS_$(LIB_TYPE))
+
+GSL_VERSION = 2.4
+RSYS_VERSION = 0.8
+S3D_VERSION = 0.8
+SSP_VERSION = 0.12
+
+INCS = $$($(PKG_CONFIG) $(PCFLAGS) --cflags gsl rsys s3d star-sp) -fopenmp
+LIBS = $$($(PKG_CONFIG) $(PCFLAGS) --libs gsl rsys s3d star-sp) -fopenmp -lm
+
+################################################################################
+# Compilation options
+################################################################################
+WFLAGS =\
+ -Wall\
+ -Wcast-align\
+ -Wconversion\
+ -Wextra\
+ -Wmissing-declarations\
+ -Wmissing-prototypes\
+ -Wshadow
+
+CFLAGS_HARDENED =\
+ -D_FORTIFY_SOURCES=2\
+ -fcf-protection=full\
+ -fstack-clash-protection\
+ -fstack-protector-strong
+
+CFLAGS_COMMON =\
+ -std=c89\
+ -pedantic\
+ -fvisibility=hidden\
+ -fstrict-aliasing\
+ $(CFLAGS_HARDENED)\
+ $(WFLAGS)
+
+CFLAGS_RELEASE = -O2 -DNDEBUG $(CFLAGS_COMMON)
+CFLAGS_DEBUG = -g $(CFLAGS_COMMON)
+CFLAGS_SO = $(CFLAGS_$(BUILD_TYPE)) -fPIC
+CFLAGS_EXE = $(CFLAGS_$(BUILD_TYPE)) -fPIE
+
+################################################################################
+# Linker options
+################################################################################
+LDFLAGS_HARDENED = -Wl,-z,relro,-z,now
+LDFLAGS_DEBUG = $(LDFLAGS_HARDENED)
+LDFLAGS_RELEASE = -s $(LDFLAGS_HARDENED)
+
+LDFLAGS_SO = $(LDFLAGS_$(BUILD_TYPE)) -shared -Wl,--no-undefined
+LDFLAGS_EXE = $(LDFLAGS_$(BUILD_TYPE)) -pie
+
+OCPFLAGS_DEBUG = --localize-hidden
+OCPFLAGS_RELEASE = --localize-hidden --strip-unneeded
+OCPFLAGS = $(OCPFLAGS_$(BUILD_TYPE))
diff --git a/src/sschiff.h b/src/sschiff.h
@@ -1,5 +1,9 @@
-/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2015, 2016 CNRS
+/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique
+ * Copyright (C) 2026 Clermont Auvergne INP
+ * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux
+ * Copyright (C) 2020, 2021, 2023, 2026 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2026 Université de Lorraine
+ * Copyright (C) 2026 Université de Toulouse
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/sschiff_device.c b/src/sschiff_device.c
@@ -1,5 +1,9 @@
-/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2015, 2016 CNRS
+/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique
+ * Copyright (C) 2026 Clermont Auvergne INP
+ * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux
+ * Copyright (C) 2020, 2021, 2023, 2026 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2026 Université de Lorraine
+ * Copyright (C) 2026 Université de Toulouse
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/sschiff_device.h b/src/sschiff_device.h
@@ -1,5 +1,9 @@
-/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2015, 2016 CNRS
+/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique
+ * Copyright (C) 2026 Clermont Auvergne INP
+ * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux
+ * Copyright (C) 2020, 2021, 2023, 2026 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2026 Université de Lorraine
+ * Copyright (C) 2026 Université de Toulouse
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/sschiff_estimator.c b/src/sschiff_estimator.c
@@ -1,5 +1,9 @@
-/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2015, 2016 CNRS
+/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique
+ * Copyright (C) 2026 Clermont Auvergne INP
+ * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux
+ * Copyright (C) 2020, 2021, 2023, 2026 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2026 Université de Lorraine
+ * Copyright (C) 2026 Université de Toulouse
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1625,7 +1629,7 @@ sschiff_integrate
/* Merge the per thread integration results */
FOR_EACH(i, 0, dev->nthreads) {
- FOR_EACH(iwlen, 0, nwavelengths) {
+ FOR_EACH(iwlen, 0, (int)nwavelengths) {
size_t iangle;
#define MC_ACCUM(Data) { \
const struct mc_accum* mc_accum = ctxs[i].mc_accums + iwlen; \
diff --git a/src/sschiff_scattering_angles_distributions.c b/src/sschiff_scattering_angles_distributions.c
@@ -1,5 +1,9 @@
-/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2015, 2016 CNRS
+/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique
+ * Copyright (C) 2026 Clermont Auvergne INP
+ * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux
+ * Copyright (C) 2020, 2021, 2023, 2026 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2026 Université de Lorraine
+ * Copyright (C) 2026 Université de Toulouse
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/test_sschiff_device.c b/src/test_sschiff_device.c
@@ -1,5 +1,9 @@
-/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2015, 2016 CNRS
+/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique
+ * Copyright (C) 2026 Clermont Auvergne INP
+ * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux
+ * Copyright (C) 2020, 2021, 2023, 2026 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2026 Université de Lorraine
+ * Copyright (C) 2026 Université de Toulouse
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/test_sschiff_estimator_cylinder.c b/src/test_sschiff_estimator_cylinder.c
@@ -1,5 +1,9 @@
-/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2015, 2016 CNRS
+/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique
+ * Copyright (C) 2026 Clermont Auvergne INP
+ * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux
+ * Copyright (C) 2020, 2021, 2023, 2026 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2026 Université de Lorraine
+ * Copyright (C) 2026 Université de Toulouse
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/test_sschiff_estimator_rhodo.c b/src/test_sschiff_estimator_rhodo.c
@@ -1,5 +1,9 @@
-/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2015, 2016 CNRS
+/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique
+ * Copyright (C) 2026 Clermont Auvergne INP
+ * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux
+ * Copyright (C) 2020, 2021, 2023, 2026 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2026 Université de Lorraine
+ * Copyright (C) 2026 Université de Toulouse
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/test_sschiff_estimator_sphere.c b/src/test_sschiff_estimator_sphere.c
@@ -1,5 +1,9 @@
-/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2015, 2016 CNRS
+/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique
+ * Copyright (C) 2026 Clermont Auvergne INP
+ * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux
+ * Copyright (C) 2020, 2021, 2023, 2026 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2026 Université de Lorraine
+ * Copyright (C) 2026 Université de Toulouse
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/test_sschiff_utils.h b/src/test_sschiff_utils.h
@@ -1,5 +1,9 @@
-/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com)
- * Copyright (C) 2015, 2016 CNRS
+/* Copyright (C) 2015, 2016, 2026 Centre National de la Recherche Scientifique
+ * Copyright (C) 2026 Clermont Auvergne INP
+ * Copyright (C) 2026 Institut Mines Télécom Albi-Carmaux
+ * Copyright (C) 2020, 2021, 2023, 2026 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2026 Université de Lorraine
+ * Copyright (C) 2026 Université de Toulouse
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/sschiff.pc.in b/sschiff.pc.in
@@ -0,0 +1,15 @@
+prefix=@PREFIX@
+includedir=${prefix}/include
+libdir=${prefix}/lib
+
+Requires: rsys >= @RSYS_VERSION@
+Requires.private:\
+ gsl >= @GSL_VERSION@,\
+ s3d >= @S3D_VERSION@,\
+ star-sp >= @SSP_VERSION@
+Name: Star Schiff
+Description: Star Schiff library
+Version: @VERSION@
+Libs: -L${libdir} -lsschiff
+Libs.private: -lm -fopenmp
+CFlags: -I${includedir}