commit e6b39710e388af21b5063173ec7415ed47d27984
parent 947b9dff7949a8305e56bb9f96921ee9339f7c93
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 11 Jan 2023 14:05:35 +0100
Merge branch 'release_0.9'
Diffstat:
6 files changed, 111 insertions(+), 116 deletions(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -27,8 +27,8 @@ set(HTRDR_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src)
set(HTRDR_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(VERSION_MAJOR 0)
-set(VERSION_MINOR 8)
-set(VERSION_PATCH 1)
+set(VERSION_MINOR 9)
+set(VERSION_PATCH 0)
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
option(HTRDR_BUILD_ATMOSPHERE "Build the htrdr-atmosphere program" ON)
@@ -42,7 +42,7 @@ endif()
if(HTRDR_BUILD_COMBUSTION)
set(HTRDR_BUILD_COMMANDS "${HTRDR_BUILD_COMMANDS};HTRDR_BUILD_COMBUSTION")
endif()
-if(HTRDR_BUILD_COMBUSTION)
+if(HTRDR_BUILD_PLANETO)
set(HTRDR_BUILD_COMMANDS "${HTRDR_BUILD_COMMANDS};HTRDR_BUILD_PLANETO")
endif()
diff --git a/cmake/commands/CMakeLists.txt b/cmake/commands/CMakeLists.txt
@@ -33,7 +33,7 @@ if(HTRDR_BUILD_COMBUSTION)
list(APPEND _link_libraries htrdr-combustion)
endif()
if(HTRDR_BUILD_PLANETO)
- list(APPEND _lin_libraries htrdr-planeto)
+ list(APPEND _link_libraries htrdr-planeto)
endif()
################################################################################
diff --git a/src/atmosphere/htrdr_atmosphere_args.c b/src/atmosphere/htrdr_atmosphere_args.c
@@ -32,85 +32,75 @@ static void
print_help(const char* cmd)
{
ASSERT(cmd);
- printf("Usage: %s [<opions>] -a GAS\n", cmd);
+ printf("Usage: %s [option] ... -a gas\n", cmd);
printf(
-"Render an image or compute a flux map in both the longwave and\n"
-"shortwave domains, for scenes with a cloudy atmosphere and a ground\n"
-"geometry.\n\n");
+"Simulate radiative transfer in a plane-parallel atmosphere.\n"
+"See htrdr-atmosphere(1) man page for details\n\n");
printf(
-" -a GAS filename of the gas optical properties.\n");
+" -a gas filename of the gas optical properties\n");
printf(
-" -C <perspective-camera>\n"
-" define the perspective camera. Refer to the man page\n"
-" for the list of camera options.\n");
+" -C camera configure a perspective camera\n");
printf(
-" -c CLOUDS filename of the clouds properties.\n");
+" -c clouds filename of the clouds properties\n");
printf(
-" -D AZIMUTH,ELEVATION\n"
+" -D azimuth,elevation\n"
" direction in degrees toward the sun center. By default\n"
-" AZIMUTH is %g and ELEVATION is %g.\n",
+" azimuth is %g and elevation is %g\n",
HTRDR_ATMOSPHERE_ARGS_DEFAULT.sun_azimuth,
HTRDR_ATMOSPHERE_ARGS_DEFAULT.sun_elevation);
printf(
-" -d dump volumetric acceleration structures to OUTPUT\n"
-" and exit.\n");
+" -d dump volumetric acceleration structures to output\n"
+" and exit\n");
printf(
-" -f overwrite the OUTPUT file if it already exists.\n");
+" -f overwrite the output file if it already exists\n");
printf(
-" -g GROUND filename of the ground geometry.\n");
+" -g ground filename of the ground geometry\n");
printf(
-" -h display this help and exit.\n");
+" -h display this help and exit\n");
printf(
-" -i <image> define the image to compute. Refer to the man\n"
-" page for the list of image options\n");
+" -i image image to compute\n");
printf(
-" -M MATERIALS filename of the ground materials.\n");
+" -M materials filename of the ground materials\n");
printf(
-" -m MIE filename of the Mie's data.\n");
+" -m mie filename of the Mie's data\n");
printf(
-" -n SKY-NAME name used to identify the sky in the MATERIALS file.\n"
-" Its default value is `%s'.\n",
+" -n sky-name name used to identify the sky in the materials file.\n"
+" Its default value is `%s'\n",
HTRDR_ATMOSPHERE_ARGS_DEFAULT.sky_mtl_name);
printf(
-" -O CACHE filenaname of the cache file used to store/restore the\n"
-" volumetric data. By default do not use any cache.\n");
+" -O cache filenaname of the cache file used to store/restore the\n"
+" volumetric data. By default do not use any cache\n");
printf(
-" -o OUTPUT file where data are written. If not defined, data are\n"
-" written to standard output.\n");
+" -o output file where data are written. If not defined, data are\n"
+" written to standard output\n");
printf(
-" -p <rectangle> switch in flux computation by defining the rectangular\n"
-" sensor onto which the flux is computed. Refer to the\n"
-" man page for the list of rectangle options.\n");
+" -p rectangle switch in flux computation by defining the rectangular\n"
+" sensor onto which the flux is computed\n");
printf(
-" -P <orthoraphic-camera>\n"
-" define the orthoraphic camera. Refer to the man page\n"
-" for the list of orthographic camera options.\n");
+" -P camera configure an orthoraphic camera\n");
printf(
-" -R infinitely repeat the ground along the X and Y axis.\n");
+" -R infinitely repeat the ground along the X and Y axis\n");
printf(
-" -r infinitely repeat the clouds along the X and Y axis.\n");
+" -r infinitely repeat the clouds along the X and Y axis\n");
printf(
-" -s <spectral> define the type and range of the spectral\n"
-" integration. Refer to the man page for the list\n"
-" of spectral options\n");
+" -s spectral define the spectral doamin of integration\n");
printf(
-" -T THRESHOLD optical thickness used as threshold during the\n"
-" building of the volumetric acceleration structure.\n"
-" By default its value is `%g'.\n",
+" -T optical_thickness\n"
+" optical thickness criteria for octree building.\n"
+" Default is %g\n",
HTRDR_ATMOSPHERE_ARGS_DEFAULT.optical_thickness);
printf(
-" -t THREADS hint on the number of threads to use. By default use\n"
-" as many threads as CPU cores.\n");
+" -t threads hint on the number of threads to use.\n"
+" Default assumes as many threads as CPU cores\n");
printf(
-" -V X,Y,Z maximum definition along the 3 axis of the 3D\n"
-" volumetric majorant field to partition. By default use\n"
-" the definition of the clouds data.\n");
+" -V octree_definition\n"
+" advice on the definition of the atmospheric\n"
+" acceleration structures. By default use\n"
+" the definition of the clouds data\n");
printf(
-" -v make the command verbose.\n");
+" -v make the command verbose\n");
printf("\n");
-
- htrdr_fprint_copyright(cmd, stdout);
htrdr_fprint_license(cmd, stdout);
}
@@ -311,4 +301,3 @@ htrdr_atmosphere_args_release(struct htrdr_atmosphere_args* args)
ASSERT(args);
*args = HTRDR_ATMOSPHERE_ARGS_DEFAULT;
}
-
diff --git a/src/combustion/htrdr_combustion_args.c b/src/combustion/htrdr_combustion_args.c
@@ -36,98 +36,81 @@ print_help(const char* cmd)
{
ASSERT(cmd);
printf(
-"Usage: %s [<options>] -m TETRAHEDRA -p THERMOPROPS -r REFRACT_IDS\n",
+"Usage: %s [option] ... -m mesh -p props -r refids\n",
cmd);
printf(
-"Render a monochromatic image within a sooting flame described according\n"
-"to the RDG-FA theory and lightened by a laser source.\n\n");
+"Simulate radiative transfer within a sooting flame.\n"
+"See htrdr-combustion(1) man page for details\n\n");
printf(
-" -C <perspective-camera>\n"
-" define the perspective camera. Refer to the man page\n"
-" for the list of camera options.\n");
+" -C camera configure a perspective camera\n");
printf(
-" -D FLUX_DENSITY\n"
-" flux density of the laser in W/m^2\n"
-" (default: %g W/m^2).\n",
+" -D flux_density\n"
+" flux density of the laser in W/m²\n"
+" (default: %g W/m²)\n",
HTRDR_COMBUSTION_ARGS_DEFAULT.laser_flux_density);
printf(
" -d <laser|octree>\n"
" output geometry of the laser sheet or the volumetric\n"
-" acceleration structure and exit.\n");
+" acceleration structure and exit\n");
printf(
-" -F <fractal-coefs>\n"
+" -F fractal-coefs\n"
" value of the fractal dimension and fractal prefactor\n"
-" to use in the RDG-FA model. Refer to the man page\n"
-" for the syntax of the <fractal-coefs> option\n"
-" (default fractal prefactor = %g;\n"
-" default fractal dimension = %g).\n",
- HTRDR_COMBUSTION_ARGS_DEFAULT.fractal_prefactor,
- HTRDR_COMBUSTION_ARGS_DEFAULT.fractal_dimension);
+" to use in the RDG-FA model\n");
printf(
-" -f overwrite the OUTPUT file if it already exists.\n");
+" -f force overwrite the output file\n");
printf(
-" -g <geometry> define the combustion chamber geometry. Refer to the\n"
-" man page for the list of geometry options.\n");
+" -g geometry define the combustion chamber geometry\n");
printf(
-" -h display this help and exit.\n");
+" -h display this help and exit\n");
printf(
-" -I use an isotropic phase function rather than the RDG-FA.\n");
+" -I use an isotropic phase function rather than the RDG-FA\n");
printf(
-" -i <image> define the image to compute. Refer to the man\n"
-" page for the list of image options.\n");
+" -i image image to compute\n");
printf(
-" -l <laser> define the geometry of the laser sheet. Refer to the\n"
-" man page for the list of laser options.\n");
+" -l laser configure the geometry of the laser sheet\n");
printf(
-" -R <rectangle> switch in flux computation bu defining the\n"
-" rectangular sensor onto which the flux is computed.\n"
-" Refer to the man page for the list of rectangle\n"
-" options.\n");
+" -R rectangle switch in flux computation bu defining the\n"
+" rectangular sensor onto which the flux is computed\n");
printf(
-" -m TETRAHEDRA path toward the volumetric mesh.\n");
+" -m mesh path toward the volumetric mesh\n");
printf(
-" -N precompute the tetrahedra normals.\n");
+" -N precompute tetrahedron normals\n");
printf(
-" -O CACHE path of the cache file used to store/restore the\n"
-" volumetric data. By default do not use any cache.\n");
+" -O cache path of the cache file used to store/restore the\n"
+" volumetric data\n");
printf(
-" -o OUTPUT file where data are written\n"
-" (default: write data to standard output).\n");
+" -o output file where data are written.\n"
+" (default: write data to standard output)\n");
printf(
-" -p THERMOPROPS path toward the thermodynamic properties.\n");
+" -p props path toward the thermodynamic properties\n");
printf(
-" -P <orthoraphic-camera>\n"
-" define the orthoraphic camera. Refer to the man page\n"
-" for the list of orthographic camera options.\n");
+" -P camera configure an orthoraphic camera\n");
printf(
-" -r REFRACT_ID path toward the per wavelength refractive\n"
-" indices.\n");
+" -r refids path toward the per wavelength refractive\n"
+" indices\n");
printf(
-" -s use of the SIMD instruction set if available.\n");
+" -s use of the SIMD instruction set if available\n");
printf(
-" -T THRESHOLD optical thickness used as threshold during the octree\n"
-" building. (default: %g).\n",
+" -T threshold optical thickness used as threshold during the octree\n"
+" building (default: %g)\n",
HTRDR_COMBUSTION_ARGS_DEFAULT.optical_thickness);
printf(
-" -t NTHREADS hint on the number of threads to use. By default use\n"
-" as many threads as CPU cores.\n");
+" -t threads hint on the number of threads to use.\n"
+" Default assumes as many threads as CPU cores\n");
printf(
-" -V <HINT|X,Y,Z>\n"
+" -V octree_definition\n"
" definition of the volumetric acceleration grids along\n"
" the 3 axis. By default it is computed automatically\n"
-" with a hint on the expected definition set to %u.\n",
+" with a hint on the expected definition set to %u\n",
HTRDR_COMBUSTION_ARGS_DEFAULT.grid.definition.hint);
printf(
" -v make the command verbose.\n");
printf(
" -w WAVELENGTH wavelength definition of the laser in nanometre.\n"
-" (default: %g).\n",
+" (default: %g)\n",
HTRDR_COMBUSTION_ARGS_DEFAULT.wavelength);
-
printf("\n");
-
- htrdr_fprint_copyright(cmd, stdout);
htrdr_fprint_license(cmd, stdout);
}
diff --git a/src/commands/htrdr_cmd.c b/src/commands/htrdr_cmd.c
@@ -25,6 +25,9 @@
#ifdef HTRDR_BUILD_COMBUSTION
#include "combustion/htrdr_combustion.h"
#endif
+#ifdef HTRDR_BUILD_PLANETO
+ #include "planeto/htrdr_planeto.h"
+#endif
#include "core/htrdr_log.h"
#include "core/htrdr_version.h"
@@ -39,7 +42,7 @@ static void
print_usage(const char* cmd)
{
ASSERT(cmd);
- printf("Usage: %s [--version] [--help] <mode> [<args>]\n", cmd);
+ printf("Usage: %s [-v] [-h] <mode> [option] ...\n", cmd);
}
static void
@@ -48,20 +51,24 @@ print_help(const char* cmd)
ASSERT(cmd);
print_usage(cmd);
+ printf("Simulate radiative transfer.\n");
+ printf("See htrdr(1) man page for details\n");
printf("\n");
printf(
-" --version display version information and exit.\n");
+" -h display this help and exit\n");
printf(
-" --help display this help and exit.\n");
+" -v display version information and exit\n");
printf("\n");
printf("These are %s modes:\n", cmd);
printf("\n");
printf(
-" atmosphere Radiative transfer computations in a cloudy atmosphere.\n");
+" atmosphere Radiative transfer in a plane-parallel atmosphere\n");
+ printf(
+" combustion Radiative transfer within a sooting flame\n");
printf(
-" combustion Radiative transfer computations in a combustion medium.\n");
+" planeto Radiative transfer in a 3D planetory atmosphere\n");
printf("\n");
htrdr_fprint_license(cmd, stdout);
@@ -106,8 +113,20 @@ main(int argc, char** argv)
goto error;
#endif
+ /* Planeto mode */
+ } else if(!strcmp(argv[1], "planeto")) {
+#ifdef HTRDR_BUILD_PLANETO
+ err = htrdr_planeto_main(argc-1, argv+1);
+ if(err) goto error;
+#else
+ fprintf(stderr,
+ "The planeto mode is not available in this htrdr build.\n");
+ err = 1;
+ goto error;
+#endif
+
/* Version */
- } else if(!strcmp(argv[1], "--version")) {
+ } else if(!strcmp(argv[1], "-v")) {
printf("%s version %d.%d.%d\n",
argv[0],
HTRDR_VERSION_MAJOR,
@@ -116,7 +135,7 @@ main(int argc, char** argv)
goto exit;
/* Help */
- } else if(!strcmp(argv[1], "--help")) {
+ } else if(!strcmp(argv[1], "-h")) {
print_help(cmd_name);
goto exit;
diff --git a/src/core/htrdr.h b/src/core/htrdr.h
@@ -71,9 +71,13 @@ htrdr_fprint_copyright(const char* cmd, FILE* stream)
{
(void)cmd;
fprintf(stream,
-"Copyright (C) 2018, 2019, 2020, 2021 |Meso|Star> <contact@meso-star.com>\n"
-"Copyright (C) 2018, 2019, 2021 CNRS\n"
-"Copyright (C) 2018, 2019 Université Paul Sabatier\n");
+"Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique\n"
+"Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux\n"
+"Copyright (C) 2022-2023 Institut de Physique du Globe de Paris\n"
+"Copyright (C) 2018-2023 |Méso|Star> <contact@meso-star.com>\n"
+"Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne\n"
+"Copyright (C) 2022-2023 Université de Versaille Saint-Quentin\n"
+"Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier\n");
}
static INLINE void