commit 8d62300c2f175bdeb0868c2908dfdc08d7d1c71e parent 2bbd9f122af9b0185c99a91c8d9e3ce0380df094 Author: Vincent Forest <vincent.forest@meso-star.com> Date: Mon, 19 Nov 2018 15:00:24 +0100 Deep refactor the projet structure Diffstat:
| M | .gitignore | | | 1 | - |
| M | Makefile | | | 90 | ++++++------------------------------------------------------------------------- |
| A | index.html | | | 10 | ++++++++++ |
| D | kspectrum.html.in | | | 165 | ------------------------------------------------------------------------------- |
| A | kspectrum/Makefile | | | 32 | ++++++++++++++++++++++++++++++++ |
| R | k001.svg -> kspectrum/k001.svg | | | 0 | |
| A | kspectrum/kspectrum.html.in | | | 165 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | kspectrum/spectral.sh | | | 68 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| R | tau_cumulated_1180-1200.svg -> kspectrum/tau_cumulated_1180-1200.svg | | | 0 | |
| M | meso-menu.sh | | | 46 | ++++++++++++++++++++++++---------------------- |
| D | misc.sh | | | 44 | -------------------------------------------- |
| A | misc/Makefile | | | 29 | +++++++++++++++++++++++++++++ |
| R | about.html.in -> misc/about.html.in | | | 0 | |
| A | misc/misc.sh | | | 37 | +++++++++++++++++++++++++++++++++++++ |
| R | pgp_signatures.html.in -> misc/pgp_signatures.html.in | | | 0 | |
| D | schiff.html.in | | | 134 | ------------------------------------------------------------------------------- |
| D | schiff.sh | | | 137 | ------------------------------------------------------------------------------- |
| A | schiff/Makefile | | | 33 | +++++++++++++++++++++++++++++++++ |
| R | particles.png -> schiff/particles.png | | | 0 | |
| A | schiff/schiff.html.in | | | 134 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | schiff/schiff.sh | | | 137 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| D | solstice.html.in | | | 157 | ------------------------------------------------------------------------------- |
| D | solstice.sh | | | 263 | ------------------------------------------------------------------------------- |
| A | solstice/Makefile | | | 50 | ++++++++++++++++++++++++++++++++++++++++++++++++++ |
| R | solstice-abg.html.in -> solstice/solstice-abg.html.in | | | 0 | |
| R | solstice-pp.html.in -> solstice/solstice-pp.html.in | | | 0 | |
| A | solstice/solstice.html.in | | | 157 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | solstice/solstice.sh | | | 268 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| R | themis.png -> solstice/themis.png | | | 0 | |
| D | spectral.sh | | | 68 | -------------------------------------------------------------------- |
| D | star-engine.html.in | | | 206 | ------------------------------------------------------------------------------- |
| D | star-engine.sh | | | 106 | ------------------------------------------------------------------------------- |
| A | star-engine/Makefile | | | 37 | +++++++++++++++++++++++++++++++++++++ |
| A | star-engine/star-engine.html.in | | | 208 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | star-engine/star-engine.sh | | | 106 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| R | IGBT.png -> stardis/IGBT.png | | | 0 | |
| A | stardis/Makefile | | | 29 | +++++++++++++++++++++++++++++ |
| R | foam.png -> stardis/foam.png | | | 0 | |
| R | green_script.js -> stardis/green_script.js | | | 0 | |
| R | stardis.html.in -> stardis/stardis.html.in | | | 0 | |
| A | stardis/stardis.sh | | | 30 | ++++++++++++++++++++++++++++++ |
| R | syrthes.png -> stardis/syrthes.png | | | 0 |
42 files changed, 1560 insertions(+), 1387 deletions(-)
diff --git a/.gitignore b/.gitignore @@ -1,7 +1,6 @@ kspectrum.html schiff.html stardis.html -index.html about.html pgp_signatures.html solstice.html diff --git a/Makefile b/Makefile @@ -13,95 +13,17 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -SOLSTICE-VERSION=0.8.1 -SOLSTICE-ABG=~/mesdocs/meso-star/solstice-docs/Solstice-ABG/ -SOLSTICE-PP=~/code/meso-star/solstice-scripts/ - -SCHIFF-VERSION=0.3.1 -SCHIFF-SCRIPTS=~/code/meso-star/schiff-scripts/src/ - -STAR-ENGINE-VERSION=0.6.0 -STAR-ENGINE-README=~/code/star-engine/README.md - -KSPECTRUM-VERSION=1.3 - REMOTE=OVH:www/projects/ +SUBDIRS=schiff solstice star-engine stardis kspectrum misc -.PHONY: default +.PHONY: default all publish default: all -.PHONY: all -all: spectral misc solstice schiff star-engine +all: + @for subdir in ${SUBDIRS}; do make -C $$subdir; done -.PHONY: clean clean: - @rm -rf \ - man \ - kspectrum.html \ - schiff.html \ - solstice.html \ - solstice-downloads.html \ - solstice-resources.html \ - solstice-release-notes.html.in \ - solstice-pp-release-notes.html.in \ - star-engine.html \ - star-engine-downloads.html \ - stardis.html \ - star-engine-release-notes.html.in \ - downloads/*.sig \ - downloads/Solstice-ABG.pdf \ - downloads/Solstice-ABG-rsrc.zip + @for subdir in ${SUBDIRS}; do make -C $$subdir clean; done -.PHONY: publish publish: - rsync -avz \ - index.html \ - pgp_signatures.html \ - kspectrum.html \ - schiff.html \ - solstice.html \ - solstice-downloads.html \ - solstice-resources.html \ - star-engine-downloads.html \ - star-engine.html \ - stardis.html \ - green_script.js \ - meso.css \ - IGBT.png \ - k001.svg \ - foam.png \ - particles.png \ - syrthes.png \ - tau_cumulated_1180-1200.svg \ - themis.png \ - $(REMOTE) - rsync -avz \ - downloads/Solstice-ABG.pdf \ - downloads/schiff_pretty_results.sh \ - downloads/kspectrum* \ - downloads/*.tar.gz \ - downloads/*.zip \ - downloads/*.sig \ - $(REMOTE)/downloads/ - rsync -avzr man $(REMOTE) - -.PHONY: spectral -spectral: - @sh spectral.sh $(KSPECTRUM-VERSION) - -.PHONY: star-engine -star-engine: - @sh star-engine.sh $(STAR-ENGINE-VERSION) $(STAR-ENGINE-README) - -.PHONY: schiff -schiff: schiff.html.in - @sh schiff.sh $(SCHIFF-VERSION) $(SCHIFF-SCRIPTS) - -.PHONY: solstice -solstice: - @sh solstice.sh $(SOLSTICE-VERSION) $(SOLSTICE-ABG) $(SOLSTICE-PP) - -.PHONY: misc -misc: - @sh misc.sh - + @for subdir in ${SUBDIRS}; do make -C $$subdir publish; done diff --git a/index.html b/index.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> + +<html lang=en> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta http-equiv="Refresh" content="0; url=./misc/about.html"> + <title>|Meso|Star></title> +</head> +</html> + diff --git a/kspectrum.html.in b/kspectrum.html.in @@ -1,165 +0,0 @@ -<header> - <h1>Kspectrum - molecular absorption spectra for arbitrary gas mixtures.</h1> -</header> - -<div id="news"> - <p><b>Download Kspectrum ${VERSION}</b></p> - <ul> - <li>Sources: - <a href="downloads/kspectrum${VERSION}.tgz">tarball</a> / - <a href="downloads/kspectrum${VERSION}.tgz.sig">pgp</a></li> - <li>Installation script: - <a href="downloads/kspectrum${VERSION}_install.bash">bash</a></li> - <li>Manual: - <a href="downloads/kspectrum${VERSION}_manual.pdf">pdf</a></li> - </ul> -</div> - -<p>Kspectrum computes the synthetic absorption spectrum for a gas mixture in -arbitrary thermodynamic conditions (pressure, temperature and molar -composition) from public spectroscopic databases. The main and only purpose of -the code is to produce high-resolution absorption spectra for a given set of -thermodynamic conditions; in particular, Kspectrum will <b>NOT</b> perform the -following tasks:</p> - -<ul> - <li> compute molecular absorption for any other source than allowed energetic - transitions: even if some limited effort has been put into the representation - of collision-induced absorption and continua, these sources of opacity will - have to be computed separately for each application in a separate step.</li> - - <li> perform radiative transfer computations: one of the main ideas behind - Kspectrum is that the resulting absorption spectra can be used for a wide - variety of applications, possibly in complex 3D scenes (as, for instance, in - combustion engines). Dedicated tools will have to be used in order to solve - radiative transfer; Kspectrum by itself will only be used to produce the - input spectral data.</li> -</ul> - -<div class="img" style="width: 20em"> - <a href="k001.svg"> - <img src="k001.svg" alt="k001"> - </a> - <div class="caption"> - Absorption spectrum for terrestrial air, at ground level, for a - Mid-Latitude Summer standard atmospheric profile. The absorption - coefficient is also provided for each one of the three molecular species - used in the gas mixture (logscale). - </div> -</div> - -<h3>Spectroscopic databases</h3> - -<p>Kspectrum uses the -<a href="http://hitran.org">HITRAN</a> spectroscopic database in -order to retrieve transition parameters (versions 2004, 2008 and 2012). -Additionally, it can use the -<a href="http://hitran.org/hitemp/">HITEMP</a>-2010 and -<a href="ftp://ftp.iao.ru/pub">CDSD</a>-4000 databases (respectively -for water and carbon dioxide) at high-temperature levels. Further development -would be required for additional databases (HITRAN-2016 ? GEISA ?)</p> - -<h3>Reference results</h3> -<p>The main idea behind Kspectrum was initially to develop a code that would -not need to use numerical simplifications such as a line profile truncation -(assuming the distant line-wing profile is well known, which is obviously not -the case). The resulting code was therefore capable of adding the contribution -of every known transition at every wavenumber, in order to produce a value of -the absorption coefficient with a known accuracy; also, a custom spectral -discretisation algorithm was implemented in order to produce a non-uniform -spectral grid according to a second accuracy criteria. Further versions quickly -acquired the possibility to perform a line-wings truncation and use a specified -constant spectral step, but the original algorithms that give the possibility -to compute reference results (in the sense that a numerical accuracy is -provided over resulting spectra) are still available.</p> - -<div class="img" style="width: 20em"> - <a href="tau_cumulated_1180-1200.svg"> - <img src="tau_cumulated_1180-1200.svg" alt="tau-cumul"> - </a> - <div class="caption"> - Plot of the atmospheric cumulated optical depth as a function of - wavenumber, for a clear-sky Mid-Latitude Summer standard terrestrial - atmospheric profile. Two kspectrum results are provided: using a 25 inverse - centimeters truncation of the line profile, and without any truncation. The - same result (with a truncation) obtained from the 4A code is also - presented. - </div> -</div> - -<h3>Physical models</h3> - -<p>This code can take into account the Lorentz and the Voigt line profiles, as -well as common sub-lorentzian corrective profiles. The isotopic composition can -be specified, making this code suitable for non-terrestrial applications. The -code was mainly thought for thermal infrared applications, but absorption -spectra can be produced for any spectral range as long as transition parameters -are available. As a general rule, Kspectrum was designed to remain as -polyvalent as possible; one immediate disadvantage is that special sources of -opacity, such as collision-induced absorption or continua, should be computed -separately for any given application. Also, line-mixing processes have not yet -been taken into consideration, and require further developments.</p> - -<h3>Some neat features</h3> -<p>Every time-consuming step of the computation has been parallelised, even -though the parallel architecture is far from optimal and should require a major -revision: the computation time does not scale very well with the number of -processes because of inter-processes communication, and also it was not thought -for multi-node clusters. But at least Kspectrum will run faster on a reasonably -good single node (approx. 20 cores). Also, the code has been implemented with -the obsessions of:</p> - -<ul> - <li>working with arbitrary large numbers of transitions. For instance, the - CDSD-4000 database holds the parameters for more than 6 hundred millions of - transitions for carbon dioxide; Kspectrum will, in time, eventually compute - the contribution of every transition at every wavenumber of the spectrum.</li> - - <li>being able to resume interrupted runs: whether your PC crashes or Kspectrum - reaches the maximum computation time allowed by the cluster's queue, it will - be possible to resume an interrupted computation instead of starting over from - scratch: as in a video game, Kspectrum performs frequent backups of the - current run.</li> -</ul> - -<h3>License</h3> - -<p>Kspectrum is free software released under the CeCILL license. You are -welcome to redistribute it under certain conditions; refer to the <a -href="http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt">license</a> for -details.</p> - -<h2>Installation</h2> - -<p>You will have to download both the <code>.tgz</code> file and the -installation script, and place both files in the same directory. Then run the -installation script. This will uncompress the archive, compile and run a small -program that will generate an example composition file (for Venus' atmosphere). -The installation script will also try to link Line-by-Line spectroscopic -databases to your new installation of Kspectrum, but will most probably fail if -you are not a frequent Kspectrum user, and you will have to read the -documentation in order to link LBL databases yourself (and probably download -then first if you have not already done so). Please <a -href="mailto:vincent.eymet@meso-star.com">contact us</a> if you want a specific -setup script for your machine so that the linking step is performed when you -download the next version.</p> - -<p><b>Prerequisites:</b> all you need is a fortran compiler. We are using -gfortran for development, but it should also work with other fortran compilers -(ifort, pgfortran, <i>etc.</i>). You should export the name of your fortran -compiler into the F77 environment variable; for instance, using the bash -interpreter:</p> - -<pre class="code"> -export F77=gfortran -</pre> - -<p>Then you can try to compile Kspectrum: go to the main Kspectrum directory, -then use the <code>make all</code> command to compile. The most common sources -of failure can be fixed by editing the "Makefile" file in order to check -compilation options (and more specifically options related to the target -architecture and optimisations). Whenever you modify a source file, you can -re-compile using the <code>make all</code> command. But in the case you have to -modify an include file, you will have to erase all existing object files first -using the <code>make clean</code> command, before recompiling from scratch -using the <code>make all</code> command again.</p> diff --git a/kspectrum/Makefile b/kspectrum/Makefile @@ -0,0 +1,32 @@ +# Copyright (C) 2017-2018 |Meso|Star> +# +# 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/>. + +KSPECTRUM-VERSION=1.3 + +SRC = kspectrum.html.in +IMG = k001.svg tau_cumulated_1180-1200.svg + +.PHONY: all clean default publish +default: all + +all: ${SRC} + @sh spectral.sh ${KSPECTRUM-VERSION} + +clean: + rm kspectrum.html + +publish: + rsync -arvz kspectrum.html ${IMG} downloads/ ${REMOTE}/kspectrum/ + diff --git a/k001.svg b/kspectrum/k001.svg diff --git a/kspectrum/kspectrum.html.in b/kspectrum/kspectrum.html.in @@ -0,0 +1,165 @@ +<header> + <h1>Kspectrum - molecular absorption spectra for arbitrary gas mixtures.</h1> +</header> + +<div id="news"> + <p><b>Download Kspectrum ${VERSION}</b></p> + <ul> + <li>Sources: + <a href="downloads/kspectrum${VERSION}.tgz">tarball</a> / + <a href="downloads/kspectrum${VERSION}.tgz.sig">pgp</a></li> + <li>Installation script: + <a href="downloads/install_kspectrum${VERSION}.bash">bash</a></li> + <li>Manual: + <a href="downloads/kspectrum${VERSION}_manual.pdf">pdf</a></li> + </ul> +</div> + +<p>Kspectrum computes the synthetic absorption spectrum for a gas mixture in +arbitrary thermodynamic conditions (pressure, temperature and molar +composition) from public spectroscopic databases. The main and only purpose of +the code is to produce high-resolution absorption spectra for a given set of +thermodynamic conditions; in particular, Kspectrum will <b>NOT</b> perform the +following tasks:</p> + +<ul> + <li> compute molecular absorption for any other source than allowed energetic + transitions: even if some limited effort has been put into the representation + of collision-induced absorption and continua, these sources of opacity will + have to be computed separately for each application in a separate step.</li> + + <li> perform radiative transfer computations: one of the main ideas behind + Kspectrum is that the resulting absorption spectra can be used for a wide + variety of applications, possibly in complex 3D scenes (as, for instance, in + combustion engines). Dedicated tools will have to be used in order to solve + radiative transfer; Kspectrum by itself will only be used to produce the + input spectral data.</li> +</ul> + +<div class="img" style="width: 20em"> + <a href="k001.svg"> + <img src="k001.svg" alt="k001"> + </a> + <div class="caption"> + Absorption spectrum for terrestrial air, at ground level, for a + Mid-Latitude Summer standard atmospheric profile. The absorption + coefficient is also provided for each one of the three molecular species + used in the gas mixture (logscale). + </div> +</div> + +<h3>Spectroscopic databases</h3> + +<p>Kspectrum uses the +<a href="http://hitran.org">HITRAN</a> spectroscopic database in +order to retrieve transition parameters (versions 2004, 2008 and 2012). +Additionally, it can use the +<a href="http://hitran.org/hitemp/">HITEMP</a>-2010 and +<a href="ftp://ftp.iao.ru/pub">CDSD</a>-4000 databases (respectively +for water and carbon dioxide) at high-temperature levels. Further development +would be required for additional databases (HITRAN-2016 ? GEISA ?)</p> + +<h3>Reference results</h3> +<p>The main idea behind Kspectrum was initially to develop a code that would +not need to use numerical simplifications such as a line profile truncation +(assuming the distant line-wing profile is well known, which is obviously not +the case). The resulting code was therefore capable of adding the contribution +of every known transition at every wavenumber, in order to produce a value of +the absorption coefficient with a known accuracy; also, a custom spectral +discretisation algorithm was implemented in order to produce a non-uniform +spectral grid according to a second accuracy criteria. Further versions quickly +acquired the possibility to perform a line-wings truncation and use a specified +constant spectral step, but the original algorithms that give the possibility +to compute reference results (in the sense that a numerical accuracy is +provided over resulting spectra) are still available.</p> + +<div class="img" style="width: 20em"> + <a href="tau_cumulated_1180-1200.svg"> + <img src="tau_cumulated_1180-1200.svg" alt="tau-cumul"> + </a> + <div class="caption"> + Plot of the atmospheric cumulated optical depth as a function of + wavenumber, for a clear-sky Mid-Latitude Summer standard terrestrial + atmospheric profile. Two kspectrum results are provided: using a 25 inverse + centimeters truncation of the line profile, and without any truncation. The + same result (with a truncation) obtained from the 4A code is also + presented. + </div> +</div> + +<h3>Physical models</h3> + +<p>This code can take into account the Lorentz and the Voigt line profiles, as +well as common sub-lorentzian corrective profiles. The isotopic composition can +be specified, making this code suitable for non-terrestrial applications. The +code was mainly thought for thermal infrared applications, but absorption +spectra can be produced for any spectral range as long as transition parameters +are available. As a general rule, Kspectrum was designed to remain as +polyvalent as possible; one immediate disadvantage is that special sources of +opacity, such as collision-induced absorption or continua, should be computed +separately for any given application. Also, line-mixing processes have not yet +been taken into consideration, and require further developments.</p> + +<h3>Some neat features</h3> +<p>Every time-consuming step of the computation has been parallelised, even +though the parallel architecture is far from optimal and should require a major +revision: the computation time does not scale very well with the number of +processes because of inter-processes communication, and also it was not thought +for multi-node clusters. But at least Kspectrum will run faster on a reasonably +good single node (approx. 20 cores). Also, the code has been implemented with +the obsessions of:</p> + +<ul> + <li>working with arbitrary large numbers of transitions. For instance, the + CDSD-4000 database holds the parameters for more than 6 hundred millions of + transitions for carbon dioxide; Kspectrum will, in time, eventually compute + the contribution of every transition at every wavenumber of the spectrum.</li> + + <li>being able to resume interrupted runs: whether your PC crashes or Kspectrum + reaches the maximum computation time allowed by the cluster's queue, it will + be possible to resume an interrupted computation instead of starting over from + scratch: as in a video game, Kspectrum performs frequent backups of the + current run.</li> +</ul> + +<h3>License</h3> + +<p>Kspectrum is free software released under the CeCILL license. You are +welcome to redistribute it under certain conditions; refer to the <a +href="http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt">license</a> for +details.</p> + +<h2>Installation</h2> + +<p>You will have to download both the <code>.tgz</code> file and the +installation script, and place both files in the same directory. Then run the +installation script. This will uncompress the archive, compile and run a small +program that will generate an example composition file (for Venus' atmosphere). +The installation script will also try to link Line-by-Line spectroscopic +databases to your new installation of Kspectrum, but will most probably fail if +you are not a frequent Kspectrum user, and you will have to read the +documentation in order to link LBL databases yourself (and probably download +then first if you have not already done so). Please <a +href="mailto:vincent.eymet@meso-star.com">contact us</a> if you want a specific +setup script for your machine so that the linking step is performed when you +download the next version.</p> + +<p><b>Prerequisites:</b> all you need is a fortran compiler. We are using +gfortran for development, but it should also work with other fortran compilers +(ifort, pgfortran, <i>etc.</i>). You should export the name of your fortran +compiler into the F77 environment variable; for instance, using the bash +interpreter:</p> + +<pre class="code"> +export F77=gfortran +</pre> + +<p>Then you can try to compile Kspectrum: go to the main Kspectrum directory, +then use the <code>make all</code> command to compile. The most common sources +of failure can be fixed by editing the "Makefile" file in order to check +compilation options (and more specifically options related to the target +architecture and optimisations). Whenever you modify a source file, you can +re-compile using the <code>make all</code> command. But in the case you have to +modify an include file, you will have to erase all existing object files first +using the <code>make clean</code> command, before recompiling from scratch +using the <code>make all</code> command again.</p> diff --git a/kspectrum/spectral.sh b/kspectrum/spectral.sh @@ -0,0 +1,68 @@ +#!/bin/bash + +# Copyright (C) 2017-2018 |Meso|Star> +# +# 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/>. + +set -e + +source ../meso-menu.sh + +if [ $# -lt 1 ]; then + echo "Usage: $0 VERSION" + exit 1 +fi + +required_files=( + "./downloads/kspectrum$1.tgz" + "./downloads/install_kspectrum$1.bash" + "./downloads/kspectrum$1_manual.pdf" +) + +# Check files +for((i=0; i < ${#required_files[@]}; ++i)); do + if [ ! -f "${required_files[$i]}" ]; then + echo "$0:$LINENO: Cannot find ${required_files[$i]}" + exit 1 + fi +done + +################################################################################ +# Sign the tarball +################################################################################ +tput bold; echo ">>> Kspectrum tarball"; tput sgr0 + +arch="./downloads/kspectrum$1.tgz" +if [ ! -f "$arch.sig" ]; then + echo "Sign $arch" + gpg -a -o $arch.sig --detach-sign $arch +else + echo "Nothing to do" +fi + +echo "" + +################################################################################ +# Generate the Kspectrum page +################################################################################ +tput bold; echo ">>> Kspectrum web pages"; tput sgr0 +echo "Write kspectrum.html" +{ + print_header Kspectrum dummy + VERSION=$1 envsubst < kspectrum.html.in + print_footer +} > kspectrum.html + +echo "" + diff --git a/tau_cumulated_1180-1200.svg b/kspectrum/tau_cumulated_1180-1200.svg diff --git a/meso-menu.sh b/meso-menu.sh @@ -37,7 +37,7 @@ print_schiff_sub_menu() { if [ "$name" == "Overview" ]; then echo ' <li id=cur>Overview</li>' else - echo " <li><a href=${root}schiff.html>Overview</a></li>" + echo " <li><a href=${root}schiff/schiff.html>Overview</a></li>" fi echo ' <li>Reference documentation</li>' echo ' </ul>' @@ -48,7 +48,7 @@ print_schiff_sub_menu() { if [ "$name" == "${entry[0]}" ]; then echo " <li id=cur>$name</li>" else - local link_path="${root}man/man${entry[1]}/${entry[0]}.${entry[1]}.html" + local link_path="${root}schiff/man/man${entry[1]}/${entry[0]}.${entry[1]}.html" echo " <li><a href=\"$link_path\">${entry[0]}</a></li>" fi done @@ -74,7 +74,7 @@ print_solstice_sub_menu() { if [ "$name" == "Overview" ]; then echo ' <li id=cur>Overview</li>' else - echo " <li><a href=${root}solstice.html>Overview</a></li>" + echo " <li><a href=${root}solstice/solstice.html>Overview</a></li>" fi echo ' <li>Reference documentation</li>' echo ' </ul>' @@ -85,7 +85,7 @@ print_solstice_sub_menu() { if [ "$name" == "${entry[0]}" ]; then echo " <li id=cur>$name</li>" else - local link_path="${root}man/man${entry[1]}/${entry[0]}.${entry[1]}.html" + local link_path="${root}solstice/man/man${entry[1]}/${entry[0]}.${entry[1]}.html" echo " <li><a href=\"$link_path\">${entry[0]}</a></li>" fi done @@ -94,12 +94,12 @@ print_solstice_sub_menu() { if [ "$name" == "Downloads" ]; then echo ' <li id=cur>Downloads</li>' else - echo " <li><a href=${root}solstice-downloads.html>Downloads</a></li>" + echo " <li><a href=${root}solstice/solstice-downloads.html>Downloads</a></li>" fi if [ "$name" == "Resources" ]; then echo ' <li id=cur>Additional resources</li>' else - echo " <li><a href=${root}solstice-resources.html>Additional resources</a></li>" + echo " <li><a href=${root}solstice/solstice-resources.html>Additional resources</a></li>" fi echo " <li><a href=https://gitlab.com/meso-star/solstice>Source code repository</a></li>" echo ' </ul>' @@ -127,12 +127,12 @@ print_star_engine_sub_menu() { if [ "$name" == "Overview" ]; then echo ' <li id=cur>Overview</li>' else - echo " <li><a href=${root}star-engine.html>Overview</a></li>" + echo " <li><a href=${root}/star-engine/star-engine.html>Overview</a></li>" fi if [ "$name" == "Downloads" ]; then echo ' <li id=cur>Downloads</li>' else - echo " <li><a href=${root}star-engine-downloads.html>Downloads</a></li>" + echo " <li><a href=${root}/star-engine/star-engine-downloads.html>Downloads</a></li>" fi echo " <li><a href=https://gitlab.com/meso-star/star-engine>Repository</a></li>" echo ' </ul>' @@ -145,9 +145,11 @@ print_star_engine_sub_menu() { print_header() { local section=$1 - local name=${2#man-} - local root=$([[ "$2" != "$name" ]] && echo "../../" || echo "") + local full_name=$2 local title=$3 + local name=${full_name#man-} + local is_man=$([[ $full_name =~ ^man- ]] && echo 1 || echo 0) + local root=$([[ $is_man == 1 ]] && echo "../../../" || echo "../") echo '<!DOCTYPE html>' echo '' @@ -164,40 +166,40 @@ print_header() { if [ "$section" == "About" ]; then echo ' <h2>About</h2>' else - echo " <h2><a href=${root}index.html>About</a></h2>" + echo " <h2><a href=${root}misc/about.html>About</a></h2>" fi if [ "$section" == "Kspectrum" ]; then echo ' <h2>Kspectrum</h2>' else - echo " <h2><a href=${root}kspectrum.html>Kspectrum</a></h2>" + echo " <h2><a href=${root}kspectrum/kspectrum.html>Kspectrum</a></h2>" fi if [ "$section" == "Schiff" ]; then echo ' <h2>Schiff</h2>' - print_schiff_sub_menu "$root" "$name" + print_schiff_sub_menu ${root} ${name} else - echo " <h2><a href=${root}schiff.html>Schiff</a></h2>" + echo " <h2><a href=${root}schiff/schiff.html>Schiff</a></h2>" fi if [ "$section" == "Solstice" ]; then echo ' <h2>Solstice</h2>' - print_solstice_sub_menu "$root" "$name" + print_solstice_sub_menu ${root} ${name} else - echo " <h2><a href=${root}solstice.html>Solstice</a></h2>" + echo " <h2><a href=${root}solstice/solstice.html>Solstice</a></h2>" fi if [ "$section" == "Stardis" ]; then echo ' <h2>Stardis</h2>' else - echo " <h2><a href=${root}stardis.html>Stardis</a></h2>" + echo " <h2><a href=${root}stardis/stardis.html>Stardis</a></h2>" fi if [ "$section" == "Star-Engine" ]; then echo ' <h2>Star-Engine</h2>' - print_star_engine_sub_menu "$root" "$name" + print_star_engine_sub_menu ${root} ${name} else - echo " <h2><a href=${root}star-engine.html>Star-Engine</a></h2>" + echo " <h2><a href=${root}star-engine/star-engine.html>Star-Engine</a></h2>" fi if [ "$section" == "PGP" ]; then echo ' <h2>PGP signatures</h2>' else - echo " <h2><a href=${root}pgp_signatures.html>PGP signatures</a></h2>" + echo " <h2><a href=${root}misc/pgp_signatures.html>PGP signatures</a></h2>" fi echo '</div>' echo '<div id=content>' @@ -225,7 +227,7 @@ print_downloads() { echo ' <th>Sources</th>' echo ' </tr>' - local archs=$(find downloads -regex ".*/$prefix-[0-9]+\.[0-9]+\.[0-9]+-.*tar.gz" | sort -r ) + local archs=$(find downloads/$prefix_low -regex ".*/$prefix-[0-9]+\.[0-9]+\.[0-9]+-.*tar.gz" | sort -r ) local arch; for arch in $archs; do @@ -233,7 +235,7 @@ print_downloads() { local dl_files=( "downloads/${prefix}-${version}-GNU-Linux64.tar.gz" "downloads/${prefix}-${version}-Win64.zip" - "downloads/${prefix}-${version}-Source.zip" + "downloads/${prefix}-${version}-Sources.zip" ) echo " <tr>" diff --git a/misc.sh b/misc.sh @@ -1,44 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2017-2018 |Meso|Star> -# -# 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/>. - -set -e - -source ./meso-menu.sh - -tput bold; echo ">>> Miscellaneous web pages"; tput sgr0 -echo "Write index.html" -{ - print_header About dummy - cat about.html.in - print_footer -} > index.html - -echo "Write stardis.html" -{ - print_header Stardis dummy - cat stardis.html.in - print_footer -} > stardis.html - -echo "Write pgp_signatures.html" -{ - print_header PGP dummy - cat pgp_signatures.html.in - print_footer -} > pgp_signatures.html - -echo "" diff --git a/misc/Makefile b/misc/Makefile @@ -0,0 +1,29 @@ +# Copyright (C) 2018 |Meso|Star> +# +# 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/>. + +SRC = pgp_signatures.html.in about.html.in + +.PHONY: all clean default publish +default: all + +all: ${SRC} + @sh misc.sh + +publish: + rsync -avz about.html pgp_signature.html ${REMOTE}/misc/ + +clean: + rm -rf about.html pgp_signature.html + diff --git a/about.html.in b/misc/about.html.in diff --git a/misc/misc.sh b/misc/misc.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# Copyright (C) 2017-2018 |Meso|Star> +# +# 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/>. + +set -e + +source ../meso-menu.sh + +tput bold; echo ">>> Miscellaneous web pages"; tput sgr0 +echo "Write index.html" +{ + print_header About dummy + cat about.html.in + print_footer +} > about.html + +echo "Write pgp_signatures.html" +{ + print_header PGP dummy + cat pgp_signatures.html.in + print_footer +} > pgp_signatures.html + +echo "" diff --git a/pgp_signatures.html.in b/misc/pgp_signatures.html.in diff --git a/schiff.html.in b/schiff.html.in @@ -1,134 +0,0 @@ -<header> - <h1>Schiff - Radiative properties of soft particles</h1> -</header> - -<div id="news"> - <p><b>Download Schiff ${VERSION}</b></p> - <ul> - <li>GNU/Linux: - <a href="downloads/Schiff-${VERSION}-GNU-Linux64.tar.gz">tarball</a> / - <a href="downloads/Schiff-${VERSION}-GNU-Linux64.tar.gz.sig">pgp</a></li> - <li>Sources: - <a href="downloads/Schiff-${VERSION}-Source.tar.gz">tarball</a> / - <a href="downloads/Schiff-${VERSION}-Source.tar.gz.sig">pgp</a></li> - </ul> -</div> - -<p>The Schiff program computes the <b>radiative properties</b> of soft -particles. It uses the <b>Monte-Carlo</b> method to solve Maxwell's equations -within the <a -href="https://journals.aps.org/pr/abstract/10.1103/PhysRev.104.1481">L. Schiff's -approximation</a> as presented in <a -href="http://www.sciencedirect.com/science/article/pii/S0022407315003283">Charon -et al. 2015</a>.The main advantages of using Monte-Carlo are: the possibility -to address <b>any shape</b> of particle, and the results are provided with a -<b>numerical accuracy</b>.</p> - -<p>For a mixture of soft particles, Schiff estimates the total -<b>cross-sections</b> (absorption, scattering and extinction cross-sections) in -addition of the <b>phase function</b>, its cumulative and its inverse -cumulative.</p> - -<p>The set of particles to simulate is defined by its <b>refractive index</b> - -provided at various wavelengths - and a <b>geometry distribution</b> that -controls how the particles look like into the mixture. More precisely, this -distribution describes the main shapes of the particles (sphere, cylinder, -helical pipe, <i>etc.</i>) and their statistical variation according to the -distribution of their parameters (gaussian, lognormal, <i>etc.</i>).</p> - -<p>Schiff makes intensive use of ray-tracing. While this feature is part of -the StarEngine <a href=https://gitlab.com/meso-star/star-3d>Star3D</a> library, -it is internally powered by <a href=https://software.intel.com/sdvis>Intel® -Rendering Framework</a>: <a href=http://embree.github.io/>Embree</a>.</p> - -<p>Schiff is available on GNU/Linux 64-bits. It is a free software release -under the GPLv3+ license. You are welcome to redistribute it under certain -conditions; refer to the <a -href="https://www.gnu.org/licenses/gpl.html">license</a> for details.</p> - -<h2>A straight interface</h2> - -<div class="img" style="width: 16em"> - <a href="particles.png"> - <img src="particles.png" alt="Particles"> - </a> - <div class="caption"> - Examples of particle shapes handled by Schiff. - </div> -</div> - -<p>The Schiff program is a <b>command-line tool</b> that processes input data, -performs computations, write results and that's all. It makes no assumptions on -how the input data are created excepted that it has to follow the expected file -formats. The simulation results are also provided as is, in a raw ASCII -format.</p> - -<p>This thin interface is particularly -well suited to be <b>extended</b> and <b>integrated into any toolchain</b>. -According to the user needs, the optical properties of the particles can be -entered manually or generated by an external program. In the same way, the -output data can either be directly interpreted or post-processed by any script -with respect to the targeted toolchain.</p> - -<h2>Quick start</h2> - -<p>Download the desired archive of Schiff and verify its integrity against its -<a href=pgp_signatures.html>PGP signature</a>. Then extract it. Finally source the -provided <code>schiff.profile</code> file to register the Schiff installation -for the current shell priorly to the invocation of the <code>schiff</code> -program.</p> - -<pre class="code"> -$ source ~/Schiff-${VERSION}-GNU-Linux64/etc/schiff.profile -$ schiff -h -</pre> - -<p>The Solstice <b>reference documentation</b> is provided trough man pages. -Use the <code>man</code> command-line to consult it.</p> - -<pre class="code"> -$ man schiff -$ man schiff-geometry -$ man schiff-output -</pre> - -<h2>Post-Process</h2> - -<p>The following Bash script illustrates how to post-process the Schiff -results. It is an example, provided as is, without additional support. -According to your needs, you can study, modify, extend or redistribute it -freely.</p> - -<table> - <tr><th>Pretty results</th></tr> - <tr><td>[<a href='downloads/schiff_pretty_results.sh'>Bash script</a>]</td></tr> -</table> - -<p>This script reads an output file generated by the <code>schiff</code> -command line and split its raw ASCII results in several human readable text -files in order to simplify their analysis.</p> - -<pre class="code"> -$ schiff -i geom-distrib.yaml -l 2.3 -w0.5:0.6 -o output properties -$ bash ./schiff_pretty_results.sh output -Write xsections.txt -Write descs.txt -Write func_0.5.txt -Write func_0.6.txt -Write cumul_0.5.txt -Write cumul_0.6.txt -Write invcumul_0.5.txt -Write invcumul_0.6.txt -</pre> - -<p>The first generated file, named <code>xsections.txt</code>, lists for each -wavelength submitted with the <code>-w</code> option, its associated -absorption, extinction and scattering cross sections. The second file, -<code>descs.txt</code>, gives overall informations for each simulated -wavelengths, like the limit scattering angles from which its phase function was -analytically computed. Then for each wavelength, the script generates 3 files -named <code>func_<WLEN>.txt</code>, <code>cumul_<WLEN>.txt</code>, -and <code>invcumul_<WLEN>.txt</code> that store for the wavelength -<code><WLEN></code>, the value of its associated phase function as well -as its cumulative and its inverse cumulative, respectively.</p> - diff --git a/schiff.sh b/schiff.sh @@ -1,137 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2017-2018 |Meso|Star> -# -# 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/>. - -set -e - -source ./meso-menu.sh - -if [ $# -lt 2 ]; then - echo "Usage: $0 VERSION SCRIPTS-PATH" - exit 1 -fi - -if [ ! -f "$2/schiff_pretty_results.sh" ]; then - echo "Cannot found $2/schiff_pretty_results.sh script." - exit 1 -fi - -if [ ! -f "./downloads/Schiff-$1-GNU-Linux64.tar.gz" ]; then - echo "Cannot find ./downloads/Schiff-$1-GNU-Linux64.tar.gz" - exit 1 -fi - -dir_curr=$(pwd) # Current directory -dir_temp=$(mktemp -d) # Working directory - -################################################################################ -# Sign the package -################################################################################ -tput bold; echo ">>> Schiff packages"; tput sgr0 -archs=$(find downloads -regex "^.*/Schiff-[0-9]+\.[0-9]+\.[0-9]+-.*tar.gz") - -sign_something=0 -for arch in $archs; do - if [ ! -f $arch.sig ]; then - echo "Sign $arch" - gpg -a -o $arch.sig --detach-sign $arch - sign_something=1 - fi -done - -if [ $sign_something == 0 ]; then - echo "Nothing to do" -fi - -echo "" - -################################################################################ -# Copy the post-process script -################################################################################ -tput bold; echo ">>> Schiff Post-Processes"; tput sgr0 -echo "RSync $2/schiff_pretty_results.sh" -rsync $2/schiff_pretty_results.sh ./downloads/ -echo "" - -################################################################################ -# Generate the overview page -################################################################################ -tput bold; echo ">>> Schiff web pages"; tput sgr0 -echo "Write schiff.html" -{ - print_header Schiff Overview - VERSION=$1 envsubst < schiff.html.in; - print_footer -} > schiff.html - -################################################################################ -# Generate the reference documentation -################################################################################ -cd $dir_temp -arch=Schiff-$1-GNU-Linux64 -cp $dir_curr/downloads/$arch.tar.gz . -tar xzf $arch.tar.gz -cd $dir_curr - -for((i=0; i<${#schiff_man_pages[@]}; ++i)); do - entry=(${schiff_man_pages[$i]}) - man_name=${entry[0]} - man_num=${entry[1]} - man_path=$dir_temp/$arch/share/man/man${entry[1]}/$man_name.$man_num - output=man/man${entry[1]}/$man_name.$man_num.html - - if [ ! -f "$man_path" ]; then - echo "Cannot find the '$man_path' man page." - continue - fi - - if [ ! -d man ]; then - mkdir man - fi - - if [ ! -d man/man${man_num} ]; then - mkdir man/man${man_num} - fi - - echo "Write $output" - { - print_header Schiff man-${entry[0]} - echo "<div style=\"font-variant: small-caps; float: right; color: #777777\">Version $1</div>"; - echo '<header>'; - echo " <h1>${man_name}(${man_num})</h1>"; - echo '</header>'; - } > $output - - man2html -r $man_path \ - | tail -n +10 \ - | sed '/^<HR>$/,$d' \ - | sed '/\ /d' \ - | sed 's/<DL COMPACT>/<DL>/g' \ - >> $output - - if [ "${entry[0]}" == "schiff" ]; then - # Remove hyperlink on csplit - sed -i 's/<B><A HREF="\.\.\/man1\/csplit\.1\.html">csplit<\/A><\/B>/csplit/g' $output - fi - - # Fix the man2html issues that translates the ' char in cq - sed -i "s/cq\([a-z]\)\>/'\1/g" $output - - print_footer >> $output - -done - -echo "" diff --git a/schiff/Makefile b/schiff/Makefile @@ -0,0 +1,33 @@ +# Copyright (C) 2018 |Meso|Star> +# +# 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/>. + +SCHIFF-VERSION=0.3.1 +SCHIFF-SCRIPTS=~/code/meso-star/schiff-scripts/src/ + +SRC = schiff.html.in schiff.sh +IMG = particles.png + +.PHONY: all clean default publish +default: all + +all: ${SRC} + @sh schiff.sh ${SCHIFF-VERSION} ${SCHIFF-SCRIPTS} + +publish: + rsync -avzr schiff.html ${IMG} downloads man ${REMOTE}/schiff/ + +clean: + rm -rf schiff.html downloads/*.sig man + diff --git a/particles.png b/schiff/particles.png Binary files differ. diff --git a/schiff/schiff.html.in b/schiff/schiff.html.in @@ -0,0 +1,134 @@ +<header> + <h1>Schiff - Radiative properties of soft particles</h1> +</header> + +<div id="news"> + <p><b>Download Schiff ${VERSION}</b></p> + <ul> + <li>GNU/Linux: + <a href="downloads/Schiff-${VERSION}-GNU-Linux64.tar.gz">tarball</a> / + <a href="downloads/Schiff-${VERSION}-GNU-Linux64.tar.gz.sig">pgp</a></li> + <li>Sources: + <a href="downloads/Schiff-${VERSION}-Sources.tar.gz">tarball</a> / + <a href="downloads/Schiff-${VERSION}-Sources.tar.gz.sig">pgp</a></li> + </ul> +</div> + +<p>The Schiff program computes the <b>radiative properties</b> of soft +particles. It uses the <b>Monte-Carlo</b> method to solve Maxwell's equations +within the <a +href="https://journals.aps.org/pr/abstract/10.1103/PhysRev.104.1481">L. Schiff's +approximation</a> as presented in <a +href="http://www.sciencedirect.com/science/article/pii/S0022407315003283">Charon +et al. 2015</a>.The main advantages of using Monte-Carlo are: the possibility +to address <b>any shape</b> of particle, and the results are provided with a +<b>numerical accuracy</b>.</p> + +<p>For a mixture of soft particles, Schiff estimates the total +<b>cross-sections</b> (absorption, scattering and extinction cross-sections) in +addition of the <b>phase function</b>, its cumulative and its inverse +cumulative.</p> + +<p>The set of particles to simulate is defined by its <b>refractive index</b> - +provided at various wavelengths - and a <b>geometry distribution</b> that +controls how the particles look like into the mixture. More precisely, this +distribution describes the main shapes of the particles (sphere, cylinder, +helical pipe, <i>etc.</i>) and their statistical variation according to the +distribution of their parameters (gaussian, lognormal, <i>etc.</i>).</p> + +<p>Schiff makes intensive use of ray-tracing. While this feature is part of +the StarEngine <a href=https://gitlab.com/meso-star/star-3d>Star3D</a> library, +it is internally powered by <a href=https://software.intel.com/sdvis>Intel® +Rendering Framework</a>: <a href=http://embree.github.io/>Embree</a>.</p> + +<p>Schiff is available on GNU/Linux 64-bits. It is a free software release +under the GPLv3+ license. You are welcome to redistribute it under certain +conditions; refer to the <a +href="https://www.gnu.org/licenses/gpl.html">license</a> for details.</p> + +<h2>A straight interface</h2> + +<div class="img" style="width: 16em"> + <a href="particles.png"> + <img src="particles.png" alt="Particles"> + </a> + <div class="caption"> + Examples of particle shapes handled by Schiff. + </div> +</div> + +<p>The Schiff program is a <b>command-line tool</b> that processes input data, +performs computations, write results and that's all. It makes no assumptions on +how the input data are created excepted that it has to follow the expected file +formats. The simulation results are also provided as is, in a raw ASCII +format.</p> + +<p>This thin interface is particularly +well suited to be <b>extended</b> and <b>integrated into any toolchain</b>. +According to the user needs, the optical properties of the particles can be +entered manually or generated by an external program. In the same way, the +output data can either be directly interpreted or post-processed by any script +with respect to the targeted toolchain.</p> + +<h2>Quick start</h2> + +<p>Download the desired archive of Schiff and verify its integrity against its +<a href=../misc/pgp_signatures.html>PGP signature</a>. Then extract it. Finally +source the provided <code>schiff.profile</code> file to register the Schiff +installation for the current shell priorly to the invocation of the +<code>schiff</code> program.</p> + +<pre class="code"> +$ source ~/Schiff-${VERSION}-GNU-Linux64/etc/schiff.profile +$ schiff -h +</pre> + +<p>The Solstice <b>reference documentation</b> is provided trough man pages. +Use the <code>man</code> command-line to consult it.</p> + +<pre class="code"> +$ man schiff +$ man schiff-geometry +$ man schiff-output +</pre> + +<h2>Post-Process</h2> + +<p>The following Bash script illustrates how to post-process the Schiff +results. It is an example, provided as is, without additional support. +According to your needs, you can study, modify, extend or redistribute it +freely.</p> + +<table> + <tr><th>Pretty results</th></tr> + <tr><td>[<a href='downloads/schiff_pretty_results.sh'>Bash script</a>]</td></tr> +</table> + +<p>This script reads an output file generated by the <code>schiff</code> +command line and split its raw ASCII results in several human readable text +files in order to simplify their analysis.</p> + +<pre class="code"> +$ schiff -i geom-distrib.yaml -l 2.3 -w0.5:0.6 -o output properties +$ bash ./schiff_pretty_results.sh output +Write xsections.txt +Write descs.txt +Write func_0.5.txt +Write func_0.6.txt +Write cumul_0.5.txt +Write cumul_0.6.txt +Write invcumul_0.5.txt +Write invcumul_0.6.txt +</pre> + +<p>The first generated file, named <code>xsections.txt</code>, lists for each +wavelength submitted with the <code>-w</code> option, its associated +absorption, extinction and scattering cross sections. The second file, +<code>descs.txt</code>, gives overall informations for each simulated +wavelengths, like the limit scattering angles from which its phase function was +analytically computed. Then for each wavelength, the script generates 3 files +named <code>func_<WLEN>.txt</code>, <code>cumul_<WLEN>.txt</code>, +and <code>invcumul_<WLEN>.txt</code> that store for the wavelength +<code><WLEN></code>, the value of its associated phase function as well +as its cumulative and its inverse cumulative, respectively.</p> + diff --git a/schiff/schiff.sh b/schiff/schiff.sh @@ -0,0 +1,137 @@ +#!/bin/bash + +# Copyright (C) 2017-2018 |Meso|Star> +# +# 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/>. + +set -e + +source ../meso-menu.sh + +if [ $# -lt 2 ]; then + echo "Usage: $0 VERSION SCRIPTS-PATH" + exit 1 +fi + +if [ ! -f "$2/schiff_pretty_results.sh" ]; then + echo "Cannot found $2/schiff_pretty_results.sh script." + exit 1 +fi + +if [ ! -f "./downloads/Schiff-$1-GNU-Linux64.tar.gz" ]; then + echo "Cannot find .//downloads/Schiff-$1-GNU-Linux64.tar.gz" + exit 1 +fi + +dir_curr=$(pwd) # Current directory +dir_temp=$(mktemp -d) # Working directory + +################################################################################ +# Sign the package +################################################################################ +tput bold; echo ">>> Schiff packages"; tput sgr0 +archs=$(find "./downloads" -regex "^.*/Schiff-[0-9]+\.[0-9]+\.[0-9]+-.*tar.gz") + +sign_something=0 +for arch in $archs; do + if [ ! -f $arch.sig ]; then + echo "Sign $arch" + gpg -a -o $arch.sig --detach-sign $arch + sign_something=1 + fi +done + +if [ $sign_something == 0 ]; then + echo "Nothing to do" +fi + +echo "" + +################################################################################ +# Copy the post-process script +################################################################################ +tput bold; echo ">>> Schiff Post-Processes"; tput sgr0 +echo "RSync $2/schiff_pretty_results.sh" +rsync $2/schiff_pretty_results.sh "./downloads/" +echo "" + +################################################################################ +# Generate the overview page +################################################################################ +tput bold; echo ">>> Schiff web pages"; tput sgr0 +echo "Write schiff.html" +{ + print_header Schiff Overview + VERSION=$1 envsubst < schiff.html.in; + print_footer +} > schiff.html + +################################################################################ +# Generate the reference documentation +################################################################################ +cd $dir_temp +arch=Schiff-$1-GNU-Linux64 +cp "$dir_curr/downloads/$arch.tar.gz" . +tar xzf $arch.tar.gz +cd $dir_curr + +for((i=0; i<${#schiff_man_pages[@]}; ++i)); do + entry=(${schiff_man_pages[$i]}) + man_name=${entry[0]} + man_num=${entry[1]} + man_path="$dir_temp/$arch/share/man/man${entry[1]}/$man_name.$man_num" + output="man/man${entry[1]}/$man_name.$man_num.html" + + if [ ! -f "$man_path" ]; then + echo "Cannot find the '$man_path' man page." + continue + fi + + if [ ! -d man ]; then + mkdir man + fi + + if [ ! -d man/man${man_num} ]; then + mkdir man/man${man_num} + fi + + echo "Write $output" + { + print_header Schiff man-${entry[0]} + echo "<div style=\"font-variant: small-caps; float: right; color: #777777\">Version $1</div>"; + echo '<header>'; + echo " <h1>${man_name}(${man_num})</h1>"; + echo '</header>'; + } > $output + + man2html -r $man_path \ + | tail -n +10 \ + | sed '/^<HR>$/,$d' \ + | sed '/\ /d' \ + | sed 's/<DL COMPACT>/<DL>/g' \ + >> $output + + if [ "${entry[0]}" == "schiff" ]; then + # Remove hyperlink on csplit + sed -i 's/<B><A HREF="\.\.\/man1\/csplit\.1\.html">csplit<\/A><\/B>/csplit/g' $output + fi + + # Fix the man2html issues that translates the ' char in cq + sed -i "s/cq\([a-z]\)\>/'\1/g" $output + + print_footer >> $output + +done + +echo "" diff --git a/solstice.html.in b/solstice.html.in @@ -1,157 +0,0 @@ -<header> - <h1>Solstice - The solar plant simulation tool</h1> -</header> - -<div id="news"> - <p><b>Solstice ${VERSION} is available</b></p> - <ul> - <li>GNU/Linux: - <a href="downloads/Solstice-${VERSION}-GNU-Linux64.tar.gz">tarball</a> / - <a href="downloads/Solstice-${VERSION}-GNU-Linux64.tar.gz.sig">pgp</a></li> - <li>Windows: - <a href="downloads/Solstice-${VERSION}-Win64.zip">zip</a> / - <a href="downloads/Solstice-${VERSION}-Win64.zip.sig">pgp</a></li> - </ul> - <ul> - <li>Sources: - <a href="downloads/Solstice-${VERSION}-Source.zip">zip</a> / - <a href="downloads/Solstice-${VERSION}-Source.zip.sig">pgp</a></li> - </ul> -</div> - -<p>Solstice computes the <b>total power</b> collected by a concentrated solar -plant, and evaluates various <b>efficiencies</b> for each primary reflector: it -computes losses due to cosine effect, to shadowing and masking, to orientation -and surface irregularities, to reflectivity and to atmospheric transmission. -These data provide insightful information when looking for the optimal design -of a concentrated solar plant. Solstice is powered by a <b>Monte-Carlo -solver</b>, which means that each result is provided with its -<b>numerical accuracy</b>. - -<p>Solstice is specifically designed to handle <b>complex solar facilities</b>. -A solar plant can be composed of any number of geometries of different types -like hyperbolas, parabolas, cylindro-parabolas, planar polygons, cylinders, -spheres, hemispheres and cuboids. Behind analytic shapes, one can also use any -<b>external mesh</b> stored in a <b>ST</b>ereo <b>L</b>ithography file. - -<p>The orientation of the reflectors can be either defined manually or -<b>automatically computed</b> by Solstice according to the sun direction and -the animation constraints of the reflectors. - -<p>Mirror, matte and dielectric materials are supported. <b>Spectral effects</b> -are also taken into account as long as the relevant physical properties are -provided; it is possible to define the spectral distribution of any physical -property, including the input solar spectrum and the absorption of the -atmosphere, at any spectral resolution.</p> - -<p>Solstice makes intensive use of ray-tracing. While this feature is part of -the StarEngine <a href=https://gitlab.com/meso-star/star-3d>Star3D</a> library, -it is internally powered by <a href=https://software.intel.com/sdvis>Intel® -Rendering Framework</a>: <a href=http://embree.github.io/>Embree</a>.</p> - -<p>Solstice is available on GNU/Linux and Microsoft Windows 7 or later. It is a -free software released under the GPLv3+ license. You are welcome to -redistribute it under certain conditions; refer to the <a -href="https://www.gnu.org/licenses/gpl.html">license</a> for details.</p> - -<h2>A straight interface</h2> - -<p>The Solstice program is a <b>command-line tool</b> that processes input data, -performs computations, write results and that's all. It makes no assumptions on how -the input data are created excepted that it has to follow the expected file -formats. The simulation results are also provided as is, in a raw ASCII file.</p> - -<p>This thin interface is not only simple and powerful but is also particularly -well suited to be <b>extended</b> and <b>integrated into any toolchain</b>. -According to the user needs, the solar plant description can be manually -written, generated by a script, exported from a content creation tool, -<i>etc.</i> In the same way, the output data can be post-processed by any -script to be transformed, compressed, sent over a network, displayed in a data -analysis tool, <i>etc.</i>.</p> - -<h2>A framework for data analysis</h2> - -<div class="img" style="width: 18em"> - <a href="themis.png"> - <img src="themis.png" alt="Themis in paraview"> - </a> - <div class="caption"> - Post-processed Solstice outputs displayed in - <a href="https://www.paraview.org">Paraview</a>. - </div> -</div> - -<p>Beside the simulation process, Solstice can output data to help in the -<b>analysis</b> of the simulation results: it can output the <b>radiative -paths</b> sampled during a simulation, as well as the solar plant -<b>geometry</b> described in the OBJ file format. Thanks to -these data, the user can quickly assert that too many radiative paths are -occluded or miss the target, or that the primary reflectors are not correctly -oriented. One can also map the simulation results to the solar plant geometry -in order to efficiently visualise and analyse them using one's favorite data -analysis toolkit.</p> - -<p>Solstice also provides <b>offline rendering</b> capabilities. It implements -an unbiased physically-based rendering kernel that relies on the data and -algorithmic tools used by the solver. This ensures that the rendered images give -visual clues on how the light actually interacts with the geometry and the -materials of the simulated solar plant.</p> - -<h2>Quick start</h2> - -<p>Get the desired archive of Solstice and verify its integrity against its <a -href=pgp_signatures.html>PGP signature</a>. Then extract it. On -Windows, open a command prompt into the Solstice bin directory and invoke the -<code>solstice.exe</code> executable. You can alternatively register its -directory into the <code>path</code> environment variable to expose the -Solstice application to the system, allowing its invocation from -any directory.</p> - -<pre class="code"> -C:\Users\Meso-Star\Solstice-${VERSION}-Win64\bin>solstice -h -</pre> - -<p>On GNU/Linux, source the provided <code>solstice.profile</code> file to -register the Solstice installation for the current shell priorly to the -invocation of the <code>solstice</code> program.</p> - -<pre class="code"> -$ source ~/Solstice-${VERSION}-GNU-Linux64/etc/solstice.profile -$ solstice -h -</pre> - -<p>The Solstice <b>reference documentation</b> is located in the -<code>share/man</code> sub-directory of Solstice. To consult it, just browse the -HTML files in the <code>share/man/man1</code> and -<code>share/man/man5</code> directories. On GNU/Linux, you can alternatively -use the <code>man</code> command-line.</p> - -<pre class="code"> -$ man solstice -$ man solstice-input -$ man solstice-output -$ man solstice-receiver -</pre> - -<p>Refer to the <a href="solstice-resources.html#ABG">Absolute Beginner's -Guide</a> to learn fundamentals of Solstice; it relies on practical examples to -introduce the functionalities of the program.</p> - -<h2>Further development and service</h2> - -<p>The Solstice project started in 2016 after Méso-Star was selected by the -SOLSTICE lab (member of the French CNRS) to develop the eponymous software. -The initial development phase lasted until mid-2017 and made available the -open-source software and documentation to the solar community. - -<p>Due to the strong commitment of Méso-Star to keep supporting Solstice, -several releases have been made public since then, either to fix bugs or to -improve various aspects. Other releases will be made available on an irregular -basis when users report problems. Also Méso-Star give away some time for basic -user support. - -<p>We can provide you with professional-grade support, develop improved/additional -functionalities in Solstice, integrate Solstice in your workflow, design or -simulate any solar facility, and provide you with the expertise you need to -meet your requirements. For specific information, just -<a href="mailto:contact@meso-star.com">contact us</a>. diff --git a/solstice.sh b/solstice.sh @@ -1,263 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2017-2018 |Meso|Star> -# -# 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/>. - -set -e - -source ./meso-menu.sh - -if [ $# -lt 3 ]; then - echo "Usage: $0 VERSION ABG-PATH PP-PATH" - exit 1 -fi - -if [ ! -f "./downloads/Solstice-$1-GNU-Linux64.tar.gz" ]; then - echo "Cannot find Solstice-$1-GNU-Linux64.tar.gz" - exit 1 -fi - -if [ ! -f "$2/guide.tex" ]; then - echo "Cannot found the Latex sources of the Solstice ABG." - exit 1 -fi - -if [ ! -f "$3/solpp.c" ]; then - echo "Cannot found the Solstice-PP sources." - exit 1 -fi - -dir_curr=$(pwd) # Current directory -dir_temp=$(mktemp -d) # Working directory - -set +e -if hash markdown 2> /dev/null; then - markdown=markdown -elif hash markdown2 2> /dev/null; then - markdown=markdown2 -else - echo "Cannot find the markdown[2] command" - exit 1 -fi -set -e - -################################################################################ -# Generate the Solstice-ABG -################################################################################ -tput bold; echo ">>> Solstice Absolute Beginner's Guide"; tput sgr0 -do_something=0 -if [ ! -f downloads/Solstice-ABG.pdf ]; then - do_something=1 - ABG=guide - echo "Generate the Solstice Absolute Beginner's Guide" - cd $2 - { - pdflatex $ABG.tex; - bibtex $ABG; - pdflatex $ABG.tex; - pdflatex $ABG.tex; - } 1> /dev/null - cp $ABG.pdf $dir_curr/downloads/Solstice-ABG.pdf - cd $dir_curr -fi - -if [ ! -f downloads/Solstice-ABG-rsrc.zip ]; then - do_something=1 - echo "Archive the resources of the Solstice Absolute Beginner's Guide" - cd $2 - zip -r $dir_curr/downloads/Solstice-ABG-rsrc.zip source_files/* - cd $dir_curr -fi - -if [ $do_something == 0 ]; then - echo "Nothing to do" -fi - -echo "" - -################################################################################ -# Sign the package -################################################################################ -tput bold; echo ">>> Solstice packages"; tput sgr0 -archs=$(find downloads -regex "^.*/Solstice-[0-9]\+\.[0-9]\+\.[0-9]+-.*zip" \ - -o -regex "^.*/Solstice-[0-9]\+\.[0-9]\+\.[0-9]+-.*tar.gz" \ - -o -regex "^.*/Solstice-PP-Sources-.*\.tar.gz") -sign_something=0 -for arch in $archs; do - if [ ! -f $arch.sig ]; then - echo "Sign $arch" - gpg -a -o $arch.sig --detach-sign $arch - sign_something=1 - fi -done - -if [ $sign_something == 0 ]; then - echo "Nothing to do" -fi - -echo "" - -################################################################################ -# Generate the HTML code of the solstice release notes -################################################################################ -tput bold; echo ">>> Solstice web pages"; tput sgr0 -echo "Generate the release notes" -cd $dir_temp -arch=Solstice-$1-GNU-Linux64 -cp $dir_curr/downloads/$arch.tar.gz . -gunzip $arch.tar.gz -tar xf $arch.tar -$markdown $arch/share/doc/solstice/README.md \ - | sed '/^<h2>Release notes<\/h2>/,$!d' \ - | sed '/^<h2>Licenses<\/h2>/,$d' \ - > $dir_curr/solstice-release-notes.html.in -cd $dir_curr - -################################################################################ -# Generate the overview page -################################################################################ -echo "Write solstice.html" -{ - print_header Solstice Overview; - VERSION=$1 envsubst < solstice.html.in; - print_footer; -} > solstice.html - -################################################################################ -# Generate the Downloads page -################################################################################ -echo "Write solstice-downloads.html" -{ - print_header Solstice Downloads; - echo '<header><h1>Downloads</h1></header>'; - print_downloads Solstice; - cat solstice-release-notes.html.in; - print_footer; -} > solstice-downloads.html; - -################################################################################ -# Generate he additionnal resources page -################################################################################ -print_pp_downloads() { - echo '<table>' - echo ' <tr>' - echo ' <th>Version</th>' - echo ' <th>Sources</th>' - echo ' </tr>' - - local archs=$(find downloads -regex ".*/Solstice-PP-Sources-.*\.tar.gz" | sort -r ) - local arch; - - for arch in $archs; do - local version=$(echo $arch | sed "s/.*Solstice-PP-Sources-\(.*\)\.tar.gz/\1/g") - - echo " <tr>" - echo " <td>${version}</td>" - echo " <td>" - echo " [<a href='${arch}'>tarball</a>]" - if [ -f $arch.sig ]; then - echo " [<a href='$arch.sig'>pgp</a>]" - fi - echo " </td>" - echo " </tr>" - done - echo '</table>' -} - -solpp_arch=$(cd downloads; find -regex ".*/Solstice-PP-Sources-.*\.tar.gz$" | sort -r | head -n 1) -solpp_prefix=$(echo $solpp_arch | sed 's/\.tar\.gz$//g') -solpp_version=$(echo $solpp_prefix | sed 's/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/g') - -echo "Generate the release notes of the Solstice PP" -cd $dir_temp -cp $dir_curr/downloads/$solpp_arch ./ -tar xzf $solpp_arch -$markdown $solpp_prefix/README.md \ - | sed '/^<h2>Release notes<\/h2>/,$!d' \ - | sed '/^<h2>License<\/h2>/,$d' \ - | sed '/^<h2>Release notes<\/h2>/d' \ - | sed 's/\<h3\>/h4/g' \ - > $dir_curr/solstice-pp-release-notes.html.in -cd $dir_curr - -echo "Write solstice-resources.html" -{ - print_header Solstice Resources; - echo "<header><h1>Additional resources</h1></header>" - cat solstice-abg.html.in - VERSION=$solpp_version envsubst < solstice-pp.html.in - echo "<h3>Download Post-Processes</h3>" - print_pp_downloads - cat solstice-pp-release-notes.html.in - print_footer; -} > solstice-resources.html - -################################################################################ -# Generate the reference documentation -################################################################################ -for((i=0; i<${#solstice_man_pages[@]}; ++i)); do - entry=(${solstice_man_pages[$i]}) - man_name=${entry[0]} - man_num=${entry[1]} - man_path=$dir_temp/$arch/share/man/man${entry[1]}/$man_name.$man_num - output=man/man${entry[1]}/$man_name.$man_num.html - - if [ ! -f "$man_path" ]; then - echo "Cannot find the '$man_path' man page." - continue - fi - - if [ ! -d man ]; then - mkdir man - fi - - if [ ! -d man/man${man_num} ]; then - mkdir man/man${man_num} - fi - - echo "Write $output" - { - print_header Solstice man-${entry[0]} - echo "<div style=\"font-variant: small-caps; float: right; color: #777777\">Version $1</div>"; - echo '<header>'; - echo " <h1>${man_name}(${man_num})</h1>"; - echo '</header>'; - } > $output - - man2html -r $man_path \ - | tail -n +30 \ - | sed '/^<HR>$/,$d' \ - | sed '/\ /d' \ - | sed 's/<DL COMPACT>/<DL>/g' \ - >> $output - - if [ "${entry[0]}" == "solstice" ]; then - # Remove hyperlink on csplit, feh and sed commands - sed -i 's/<B><A HREF="\.\.\/man1\/csplit\.1\.html">csplit<\/A><\/B>/csplit/g' $output - sed -i 's/<B><A HREF="\.\.\/man1\/feh\.1\.html">feh<\/A><\/B>/feh/g' $output - sed -i 's/<B><A HREF="\.\.\/man1\/sed\.1\.html">sed<\/A><\/B>/sed/g' $output - - # Fix the hyperlink toward the GPLv3+ license - sed -i 's/gpl\.html\.">\(.*\).<\/A>/gpl.html">\1<\/A>./g' $output - fi - - # Fix the man2html issues that translates the ' char in cq - sed -i "s/cq\([a-z]\)\>/'\1/g" $output - - print_footer >> $output -done - -echo "" - diff --git a/solstice/Makefile b/solstice/Makefile @@ -0,0 +1,50 @@ +# Copyright (C) 2018 |Meso|Star> +# +# 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/>. + +SOLSTICE-VERSION=0.8.1 +SOLSTICE-ABG=~/mesdocs/meso-star/solstice-docs/Solstice-ABG/ +SOLSTICE-PP=~/code/meso-star/solstice-scripts/ + +IMG = themis.png +SRC = \ + solstice.html.in \ + solstice-abg.html.in \ + solstice-pp.html.in \ + solstice.sh + +.PHONY: all clean default publish +default: all + +all: ${SRC} + @sh solstice.sh ${SOLSTICE-VERSION} ${SOLSTICE-ABG} ${SOLSTICE-PP} + +publish: + rsync -avzr \ + solstice.html \ + solstice-downloads.html \ + solstice-resources.html \ + downloads \ + man \ + ${REMOTE}/solstice/ + +clean: + rm -rf solstice.html \ + solstice-downloads.html \ + solstice-resources.html \ + solstice-release-notes.html.in \ + solstice-pp-release-notes.html.in \ + downloads/*.sig \ + man + diff --git a/solstice-abg.html.in b/solstice/solstice-abg.html.in diff --git a/solstice-pp.html.in b/solstice/solstice-pp.html.in diff --git a/solstice/solstice.html.in b/solstice/solstice.html.in @@ -0,0 +1,157 @@ +<header> + <h1>Solstice - The solar plant simulation tool</h1> +</header> + +<div id="news"> + <p><b>Solstice ${VERSION} is available</b></p> + <ul> + <li>GNU/Linux: + <a href="downloads/Solstice-${VERSION}-GNU-Linux64.tar.gz">tarball</a> / + <a href="downloads/Solstice-${VERSION}-GNU-Linux64.tar.gz.sig">pgp</a></li> + <li>Windows: + <a href="downloads/Solstice-${VERSION}-Win64.zip">zip</a> / + <a href="downloads/Solstice-${VERSION}-Win64.zip.sig">pgp</a></li> + </ul> + <ul> + <li>Sources: + <a href="downloads/Solstice-${VERSION}-Sources.zip">zip</a> / + <a href="downloads/Solstice-${VERSION}-Sources.zip.sig">pgp</a></li> + </ul> +</div> + +<p>Solstice computes the <b>total power</b> collected by a concentrated solar +plant, and evaluates various <b>efficiencies</b> for each primary reflector: it +computes losses due to cosine effect, to shadowing and masking, to orientation +and surface irregularities, to reflectivity and to atmospheric transmission. +These data provide insightful information when looking for the optimal design +of a concentrated solar plant. Solstice is powered by a <b>Monte-Carlo +solver</b>, which means that each result is provided with its +<b>numerical accuracy</b>. + +<p>Solstice is specifically designed to handle <b>complex solar facilities</b>. +A solar plant can be composed of any number of geometries of different types +like hyperbolas, parabolas, cylindro-parabolas, planar polygons, cylinders, +spheres, hemispheres and cuboids. Behind analytic shapes, one can also use any +<b>external mesh</b> stored in a <b>ST</b>ereo <b>L</b>ithography file. + +<p>The orientation of the reflectors can be either defined manually or +<b>automatically computed</b> by Solstice according to the sun direction and +the animation constraints of the reflectors. + +<p>Mirror, matte and dielectric materials are supported. <b>Spectral effects</b> +are also taken into account as long as the relevant physical properties are +provided; it is possible to define the spectral distribution of any physical +property, including the input solar spectrum and the absorption of the +atmosphere, at any spectral resolution.</p> + +<p>Solstice makes intensive use of ray-tracing. While this feature is part of +the StarEngine <a href=https://gitlab.com/meso-star/star-3d>Star3D</a> library, +it is internally powered by <a href=https://software.intel.com/sdvis>Intel® +Rendering Framework</a>: <a href=http://embree.github.io/>Embree</a>.</p> + +<p>Solstice is available on GNU/Linux and Microsoft Windows 7 or later. It is a +free software released under the GPLv3+ license. You are welcome to +redistribute it under certain conditions; refer to the <a +href="https://www.gnu.org/licenses/gpl.html">license</a> for details.</p> + +<h2>A straight interface</h2> + +<p>The Solstice program is a <b>command-line tool</b> that processes input data, +performs computations, write results and that's all. It makes no assumptions on how +the input data are created excepted that it has to follow the expected file +formats. The simulation results are also provided as is, in a raw ASCII file.</p> + +<p>This thin interface is not only simple and powerful but is also particularly +well suited to be <b>extended</b> and <b>integrated into any toolchain</b>. +According to the user needs, the solar plant description can be manually +written, generated by a script, exported from a content creation tool, +<i>etc.</i> In the same way, the output data can be post-processed by any +script to be transformed, compressed, sent over a network, displayed in a data +analysis tool, <i>etc.</i>.</p> + +<h2>A framework for data analysis</h2> + +<div class="img" style="width: 18em"> + <a href="themis.png"> + <img src="themis.png" alt="Themis in paraview"> + </a> + <div class="caption"> + Post-processed Solstice outputs displayed in + <a href="https://www.paraview.org">Paraview</a>. + </div> +</div> + +<p>Beside the simulation process, Solstice can output data to help in the +<b>analysis</b> of the simulation results: it can output the <b>radiative +paths</b> sampled during a simulation, as well as the solar plant +<b>geometry</b> described in the OBJ file format. Thanks to +these data, the user can quickly assert that too many radiative paths are +occluded or miss the target, or that the primary reflectors are not correctly +oriented. One can also map the simulation results to the solar plant geometry +in order to efficiently visualise and analyse them using one's favorite data +analysis toolkit.</p> + +<p>Solstice also provides <b>offline rendering</b> capabilities. It implements +an unbiased physically-based rendering kernel that relies on the data and +algorithmic tools used by the solver. This ensures that the rendered images give +visual clues on how the light actually interacts with the geometry and the +materials of the simulated solar plant.</p> + +<h2>Quick start</h2> + +<p>Get the desired archive of Solstice and verify its integrity against its <a +href=../misc/pgp_signatures.html>PGP signature</a>. Then extract it. On +Windows, open a command prompt into the Solstice bin directory and invoke the +<code>solstice.exe</code> executable. You can alternatively register its +directory into the <code>path</code> environment variable to expose the +Solstice application to the system, allowing its invocation from +any directory.</p> + +<pre class="code"> +C:\Users\Meso-Star\Solstice-${VERSION}-Win64\bin>solstice -h +</pre> + +<p>On GNU/Linux, source the provided <code>solstice.profile</code> file to +register the Solstice installation for the current shell priorly to the +invocation of the <code>solstice</code> program.</p> + +<pre class="code"> +$ source ~/Solstice-${VERSION}-GNU-Linux64/etc/solstice.profile +$ solstice -h +</pre> + +<p>The Solstice <b>reference documentation</b> is located in the +<code>share/man</code> sub-directory of Solstice. To consult it, just browse the +HTML files in the <code>share/man/man1</code> and +<code>share/man/man5</code> directories. On GNU/Linux, you can alternatively +use the <code>man</code> command-line.</p> + +<pre class="code"> +$ man solstice +$ man solstice-input +$ man solstice-output +$ man solstice-receiver +</pre> + +<p>Refer to the <a href="solstice-resources.html#ABG">Absolute Beginner's +Guide</a> to learn fundamentals of Solstice; it relies on practical examples to +introduce the functionalities of the program.</p> + +<h2>Further development and service</h2> + +<p>The Solstice project started in 2016 after Méso-Star was selected by the +SOLSTICE lab (member of the French CNRS) to develop the eponymous software. +The initial development phase lasted until mid-2017 and made available the +open-source software and documentation to the solar community. + +<p>Due to the strong commitment of Méso-Star to keep supporting Solstice, +several releases have been made public since then, either to fix bugs or to +improve various aspects. Other releases will be made available on an irregular +basis when users report problems. Also Méso-Star give away some time for basic +user support. + +<p>We can provide you with professional-grade support, develop improved/additional +functionalities in Solstice, integrate Solstice in your workflow, design or +simulate any solar facility, and provide you with the expertise you need to +meet your requirements. For specific information, just +<a href="mailto:contact@meso-star.com">contact us</a>. diff --git a/solstice/solstice.sh b/solstice/solstice.sh @@ -0,0 +1,268 @@ +#!/bin/bash + +# Copyright (C) 2017-2018 |Meso|Star> +# +# 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/>. + +set -e + +source ../meso-menu.sh + +if [ $# -lt 3 ]; then + echo "Usage: $0 VERSION ABG-PATH PP-PATH" + exit 1 +fi + +if [ ! -f "./downloads/Solstice-$1-GNU-Linux64.tar.gz" ]; then + echo "Cannot find Solstice-$1-GNU-Linux64.tar.gz" + exit 1 +fi + +if [ ! -f "$2/guide.tex" ]; then + echo "Cannot found the Latex sources of the Solstice ABG." + exit 1 +fi + +if [ ! -f "$3/solpp.c" ]; then + echo "Cannot found the Solstice-PP sources." + exit 1 +fi + +dir_curr=$(pwd) # Current directory +dir_temp=$(mktemp -d) # Working directory + +set +e +if hash markdown 2> /dev/null; then + markdown=markdown +elif hash markdown2 2> /dev/null; then + markdown=markdown2 +else + echo "Cannot find the markdown[2] command" + exit 1 +fi +set -e + +################################################################################ +# Generate the Solstice-ABG +################################################################################ +tput bold; echo ">>> Solstice Absolute Beginner's Guide"; tput sgr0 +do_something=0 +if [ ! -f downloads/Solstice-ABG.pdf ]; then + do_something=1 + ABG=guide + echo "Generate the Solstice Absolute Beginner's Guide" + cd $2 + { + pdflatex $ABG.tex; + bibtex $ABG; + pdflatex $ABG.tex; + pdflatex $ABG.tex; + } 1> /dev/null + cp $ABG.pdf $dir_curr/downloads/Solstice-ABG.pdf + cd $dir_curr +fi + +if [ ! -f downloads/Solstice-ABG-rsrc.zip ]; then + do_something=1 + echo "Archive the resources of the Solstice Absolute Beginner's Guide" + cd $2 + zip -r $dir_curr/downloads/Solstice-ABG-rsrc.zip source_files/* + cd $dir_curr +fi + +if [ $do_something == 0 ]; then + echo "Nothing to do" +fi + +echo "" + +################################################################################ +# Sign the package +################################################################################ +tput bold; echo ">>> Solstice packages"; tput sgr0 +archs=$(find downloads -regex "^.*/Solstice-[0-9]+\.[0-9]+\.[0-9]+-.*zip" \ + -o -regex "^.*/Solstice-[0-9]+\.[0-9]+\.[0-9]+-.*tar.gz" \ + -o -regex "^.*/Solstice-PP-Sources-.*\.tar.gz") +sign_something=0 +for arch in $archs; do + if [ ! -f $arch.sig ]; then + echo "Sign $arch" + gpg -a -o $arch.sig --detach-sign $arch + sign_something=1 + fi +done + +if [ $sign_something == 0 ]; then + echo "Nothing to do" +fi + +echo "" + +################################################################################ +# Generate the HTML code of the solstice release notes +################################################################################ +tput bold; echo ">>> Solstice web pages"; tput sgr0 +echo "Generate the release notes" +cd $dir_temp +arch=Solstice-$1-GNU-Linux64 +cp $dir_curr/downloads/$arch.tar.gz . +gunzip $arch.tar.gz +tar xf $arch.tar +$markdown $arch/share/doc/solstice/README.md \ + | sed '/^<h2>Release notes<\/h2>/,$!d' \ + | sed '/^<h2>Licenses<\/h2>/,$d' \ + > $dir_curr/solstice-release-notes.html.in +cd $dir_curr + +################################################################################ +# Generate the overview page +################################################################################ +echo "Write solstice.html" +{ + print_header Solstice Overview; + VERSION=$1 envsubst < solstice.html.in; + print_footer; +} > solstice.html + +################################################################################ +# Generate the Downloads page +################################################################################ +echo "Write solstice-downloads.html" +{ + print_header Solstice Downloads; + echo '<header><h1>Downloads</h1></header>'; + print_downloads Solstice; + cat solstice-release-notes.html.in; + print_footer; +} > solstice-downloads.html; + +################################################################################ +# Generate he additionnal resources page +################################################################################ +print_pp_downloads() { + echo '<table>' + echo ' <tr>' + echo ' <th>Version</th>' + echo ' <th>Sources</th>' + echo ' </tr>' + + local archs=$(find downloads -regex ".*/Solstice-PP-Sources-.*\.tar.gz" | sort -r ) + local arch; + + for arch in $archs; do + local version=$(echo $arch | sed "s/.*Solstice-PP-Sources-\(.*\)\.tar.gz/\1/g") + + echo " <tr>" + echo " <td>${version}</td>" + echo " <td>" + echo " [<a href='${arch}'>tarball</a>]" + if [ -f $arch.sig ]; then + echo " [<a href='$arch.sig'>pgp</a>]" + fi + echo " </td>" + echo " </tr>" + done + echo '</table>' +} + +solpp_arch=$(cd downloads; find -regex ".*/Solstice-PP-Sources-.*\.tar.gz$" | sort -r | head -n 1) +solpp_prefix=$(echo $solpp_arch | sed 's/\.tar\.gz$//g') +solpp_version=$(echo $solpp_prefix | sed 's/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/g') + +echo "Generate the release notes of the Solstice PP" +cd $dir_temp +cp $dir_curr/downloads/$solpp_arch ./ +tar xzf $solpp_arch +$markdown $solpp_prefix/README.md \ + | sed '/^<h2>Release notes<\/h2>/,$!d' \ + | sed '/^<h2>License<\/h2>/,$d' \ + | sed '/^<h2>Release notes<\/h2>/d' \ + | sed 's/\<h3\>/h4/g' \ + > $dir_curr/solstice-pp-release-notes.html.in +cd $dir_curr + +echo "Write solstice-resources.html" +{ + print_header Solstice Resources; + echo "<header><h1>Additional resources</h1></header>" + cat solstice-abg.html.in + VERSION=$solpp_version envsubst < solstice-pp.html.in + echo "<h3>Download Post-Processes</h3>" + print_pp_downloads + cat solstice-pp-release-notes.html.in + print_footer; +} > solstice-resources.html + +################################################################################ +# Generate the reference documentation +################################################################################ +for((i=0; i<${#solstice_man_pages[@]}; ++i)); do + entry=(${solstice_man_pages[$i]}) + man_name=${entry[0]} + man_num=${entry[1]} + man_path=$dir_temp/$arch/share/man/man${entry[1]}/$man_name.$man_num + output=man/man${entry[1]}/$man_name.$man_num.html + + if [ ! -f "$man_path" ]; then + echo "Cannot find the '$man_path' man page." + continue + fi + + if [ ! -d man ]; then + mkdir man + fi + + if [ ! -d man/man${man_num} ]; then + mkdir man/man${man_num} + fi + + echo "Write $output" + { + print_header Solstice man-${entry[0]} + echo "<div style=\"font-variant: small-caps; float: right; color: #777777\">Version $1</div>"; + echo '<header>'; + echo " <h1>${man_name}(${man_num})</h1>"; + echo '</header>'; + } > $output + + man2html -r $man_path \ + | tail -n +30 \ + | sed '/^<HR>$/,$d' \ + | sed '/\ /d' \ + | sed 's/<DL COMPACT>/<DL>/g' \ + >> $output + + if [ "${entry[0]}" == "solstice" ]; then + # Remove hyperlink on csplit, feh and sed commands + sed -i 's/<B><A HREF="\.\.\/man1\/csplit\.1\.html">csplit<\/A><\/B>/csplit/g' $output + sed -i 's/<B><A HREF="\.\.\/man1\/feh\.1\.html">feh<\/A><\/B>/feh/g' $output + sed -i 's/<B><A HREF="\.\.\/man1\/sed\.1\.html">sed<\/A><\/B>/sed/g' $output + + # Fix the hyperlink toward the GPLv3+ license + sed -i 's/gpl\.html\.">\(.*\).<\/A>/gpl.html">\1<\/A>./g' $output + fi + + if [ "${entry[0]}" == "solstice-input" ]; then + # Remove unexpected link on sqrt(2) + sed -i 's/<A HREF="\.\.\/man2\/sqrt\.2\.html">sqrt<\/A>/sqrt/g' $output + fi + + # Fix the man2html issues that translates the ' char in cq + sed -i "s/cq\([a-z]\)\>/'\1/g" $output + + print_footer >> $output +done + +echo "" + diff --git a/themis.png b/solstice/themis.png Binary files differ. diff --git a/spectral.sh b/spectral.sh @@ -1,68 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2017-2018 |Meso|Star> -# -# 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/>. - -set -e - -source ./meso-menu.sh - -if [ $# -lt 1 ]; then - echo "Usage: $0 VERSION" - exit 1 -fi - -required_files=( - "./downloads/kspectrum$1.tgz" - "./downloads/install_kspectrum$1.bash" - "./downloads/kspectrum$1_manual.pdf" -) - -# Check files -for((i=0; i < ${#required_files[@]}; ++i)); do - if [ ! -f "${required_files[$i]}" ]; then - echo "$0:$LINENO: Cannot find ${required_files[$i]}" - exit 1 - fi -done - -################################################################################ -# Sign the tarball -################################################################################ -tput bold; echo ">>> Kspectrum tarball"; tput sgr0 - -arch="./downloads/kspectrum$1.tgz" -if [ ! -f "$arch.sig" ]; then - echo "Sign $arch" - gpg -a -o $arch.sig --detach-sign $arch -else - echo "Nothing to do" -fi - -echo "" - -################################################################################ -# Generate the Kspectrum page -################################################################################ -tput bold; echo ">>> Kspectrum web pages"; tput sgr0 -echo "Write kspectrum.html" -{ - print_header Kspectrum dummy - VERSION=$1 envsubst < kspectrum.html.in - print_footer -} > kspectrum.html - -echo "" - diff --git a/star-engine.html.in b/star-engine.html.in @@ -1,206 +0,0 @@ -<header> - <h1>Star-Engine - A framework for Monte-Carlo solvers</h1> -</header> - -<div id="news"> - <p><b>Download Star-Engine ${VERSION}</b></p> - <ul> - <li>GNU/Linux: - <a href="downloads/Star-Engine-${VERSION}-GNU-Linux64.tar.gz">tarball</a> / - <a href="downloads/Star-Engine-${VERSION}-GNU-Linux64.tar.gz.sig">pgp</a></li> - <li>Windows: - <a href="downloads/Star-Engine-${VERSION}-Win64.zip">zip</a> / - <a href="downloads/Star-Engine-${VERSION}-Win64.zip.sig">pgp</a></li> - </ul> - <ul> - <li>Sources: - <a href="downloads/Star-Engine-${VERSION}-Source.zip">zip</a> / - <a href="downloads/Star-Engine-${VERSION}-Source.zip.sig">pgp</a></li> - </ul> -</div> - -<p>The purpose of Star-Engine is to provide a <b>development environment</b> -for engineers and researchers who wish to use the <b>Monte-Carlo</b> method in -order to perform numerical simulations. The Monte-Carlo method is indeed the -only numerical method suitable to solve <b>high-dimensional</b> integrals even -if an <b>higly complex 3D scene</b> or many <b>coupled phenomena</b> have to be -considered. - -<p>On paper, such complex situations are easily handled: physicists will -essentially translate the <b>integral</b> they need to solve into a -mathematical form that can be read as a Monte-Carlo algorithm. But then, -developing the associated simulation code might be very difficult, if even -possible, because mathematical expressions do not provide any clue on data -management concerns, or on how to address the development environment -constraints. One good example would be a common integral over a surface: while -it could be quite easy to write this integral, coding a fast and accurate -function that can be used for any given surface is no small feat.</p> - -<p>Star-Engine provides such practical solutions: it can be seen as a bridge -between a Monte-Carlo algorithm that exists only as a mathematical expression -and the actual numerical simulation code that uses this algorithm in order to -evaluate the solution.</p> - -<h2>Star-Engine components</h2> - -<p>Star-Engine is a collection of <b>C libraries</b> available for the x86-64 -architecture on GNU/Linux as well as Microsoft Windows 7 and later. It is -<b>free software</b> released under <a -href=https://en.wikipedia.org/wiki/Copyleft>copyleft</a> licenses. You are -welcome to redistribute them under certain conditions. Refer to their -associated license for details.</p> - -<p>The core components of the Star-Engine framework and their functionalities -are briefly described below:</p> - -<ul> - <li> - The <a href=https://gitlab.com/meso-star/star-sp.git>Star-SamPling</a> - library implements a set of [Pseudo] <b>Random Number Generators</b> and - <b>random variates</b> useful in the development of Monte-Carlo solvers - which heavily rely on distributions of random variables. - </li><li> - <a href="https://gitlab.com/meso-star/star-mc.git">Star-MonteCarlo</a> - makes simpler the development of efficient Monte-Carlo solvers by providing - multi-threaded integration of user defined integrands. - </li><li> - <a - href="https://gitlab.com/meso-star/star-sf.git">Star-ScatteringFunctions</a> - implements a set of <b>B</b>idirectional <b>S</b>cattering - <b>D</b>istribution <b>F</b>unctions that define how the light is - scattered at an interface. - </li><li> - The <a href=https://gitlab.com/meso-star/star-3d.git>Star-3D</a> library - manages <b>3D geometries</b> and provides functionalities to efficiently - access them through <b>ray-tracing</b> or <b>sampling</b>. The ray-tracing - functionalities of Star-3D are internally powered by - <a href=https://software.intel.com/sdvis>Intel® Rendering Framework</a>: - <a href=http://embree.github.io/>Embree</a>. - </li><li> - <a - href="https://gitlab.com/meso-star/star-3dut.git">Star-3DUtilityToolkit</a> - provides functions to generate the triangular mesh of several shapes, like - cylinder, sphere, supershapes <i>etc.</i> - </li><li> - <a href="https://gitlab.com/meso-star/star-3daw.git">Star-3DAW</a> - and <a href="https://gitlab.com/meso-star/star-3dstl.git">Star-3DSTL</a> - generate Star-3D shapes from geometries saved in the Alias Wavefront obj - and <b>ST</b>ereo <b>L</b>ithography file formats, respectively. This - simplifies the use of Star-3D with geometries exported from CAD software. - </li> -</ul> - -<h2>Related projects</h2> - -<p>The following software make use of Star-Engine to implement Monte-Carlo -solvers for a wide range of purposes. Refer to the their associated -documentation for more informations.</p> - -<ul> - <li><a href="schiff.html">Schiff</a>: computes the radiative properties of - soft particles,</li> - <li><a href="solstice.html">Solstice</a>: simulates concentrated solar - plants,</li> - <li><a href="stardis.html">Stardis</a>: solves coupled thermal problems,</li> - <li><a href="https://gitlab.com/meso-star/star-4v_s.git">Star-4V/S</a>: - evaluates an invariant property of diffuse random walks,</li> - <li><a href="https://gitlab.com/meso-star/star-gf.git">Star-GebhartFactor</a>: - computes the <a href="https://en.wikipedia.org/wiki/Gebhart_factor">Gebhart - factor</a> between 3D primitives.</li> -</ul> - -<h2>Quick start</h2> - -<p>Download the desired Star-Engine binary archive and check its integrity -against its <a href=pgp_signatures.html>PGP signature</a>. Then extract it. -You can alternatively install Star-Engine directly from source. Visit the -Star-Engine <a -href="https://gitlab.com/meso-star/star-engine">git repository</a> for a -complete description of the procedure.</p> - -<p>Once installed, the directory of Star-Engine looks like a regular Unix -filesystem hierarchy:</p> - -<ul> - <li>The <code>bin</code> directory stands for binary and contains the - programs deployed with Star-Engine.</li> - <li><code>etc</code> stores the configuration files. Its name stands for - <i>etcetera</i>. For instance, on GNU/Linux it contains the - <code>star-engine.profile</code> bash script that when "sourced" setups the - environment of the current shell for the development of Star-Engine based - applications.</li> - <li>The <code>include</code> directory contains the header files of the - Star-Engine libraries. Theses files should be included in your C/C++ - application through the <code>#include</code> directive.</li> - <li>The <code>lib</code> directory stores the Star-Engine libraries.</li> - <li>The <code>share</code> directory contains architecture independent data, - like the licenses of the installed software.</li> -</ul> - -<h3>Raw compilation</h3> - -<p>Consider a GNU/Linux environment and a project with a single source file -named <code>main.c</code> that uses Star-SamPling to generate random numbers. -To build the project executable, one has first to register the Star-Engine -installation in the current shell by sourcing its "profile".</p> - -<pre class="code"> -$ source <STAR_ENGINE_DIR>/etc/star-engine.profile -</pre> - -<p>where <code><STAR_ENGINE_DIR></code> is the Star-Engine install -directory. Once done, assuming that <b>G</b>NU <b>C</b>ompiler -<b>C</b>ollection is installed on the system, one can compile the program with -a regular <code>gcc</code> invocation.</p> - -<pre class="code"> -$ gcc main.c -lssp -</pre> - -<p>where <code>ssp</code> is the name of the <b>S</b>tar-<b>S</b>am<b>P</b>ling -library in the <code><STAR_ENGINE_DIR>/lib</code> directory.</p> - -<p>Note that this procedure is only practical for simple projects. For more -advanced software one should rely on a build system like <a -href="https://www.gnu.org/software/make/">GNU Make</a> or <a -href="https://cmake.org/">CMake</a>.</p> - -<h3>CMake build system</h3> - -<p>Star-Engine comes with CMake packages that provide programmers using the -CMake build system with a seamless integration of the Star-Engine libraries in -their software. In order to use these packages, add the Star-Engine install -directory to the CMake search paths at the CMake configuration step. Then use -the CMake package mechanism to use the required Star-Engine libraries.</p> - -<p>For instance, consider a project relying on the Star-3D and the -Star-SamPling libraries, with a single source file <code>main.c</code> and a -<code>CMakeLists.txt</code> file defined as follow:</p> - -<pre class="code"> -project(my_project C) - -# Use CMake packages to check and add project dependencies -find_package(Star3D REQUIRED) -find_package(StarSP REQUIRED) -include_directories(${Star3D_INCLUDE_DIR} ${StarSP_INCLUDE_DIR}) - -# Define the program to build -add_executable(my_program main.c) - -# Link the program against the Star-Engine libraries on which it depends -target_link_libraries(my_program StarSP Star3D) -</pre> - -<p>One can generate the CMake project with the following command:</p> - -<pre class="code"> -cmake -G<CMAKE_GENERATOR> -DCMAKE_PREFIX_PATH=<STAR_ENGINE_DIR> <MY_PROJECT_DIR> -</pre> - -<p>where <code><CMAKE_GENERATOR></code> is the build system to use (for -instance <code>"Unix Makefiles"</code>), <code><STAR_ENGINE_DIR></code> -is the Star-Engine install location and <code><MY_PROJECT_DIR></code> is -the directory where the aforementioned <code>CMakeLists.txt</code> file is -stored.</p> - diff --git a/star-engine.sh b/star-engine.sh @@ -1,106 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2017-2018 |Meso|Star> -# -# 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/>. - -set -e - -source ./meso-menu.sh - -if [ $# -lt 2 ]; then - echo "Usage: $0 VERSION STAR-ENGINE-README" - exit 1 -fi - -if [ ! -f "./downloads/Star-Engine-$1-GNU-Linux64.tar.gz" ]; then - echo "Cannot find Star-Engine-$1-GNU-Linux64.tar.gz" - exit 1 -fi - -if [ ! -f "$2" ]; then - echo "Cannot find $2" - exit 1 -fi - -dir_curr=$(pwd) # Current directory -dir_temp=$(mktemp -d) # Working directory - -set +e -if hash markdown 2> /dev/null; then - markdown=markdown -elif hash markdown2 2> /dev/null; then - markdown=markdown2 -else - echo "Cannot find the markdown[2] command" - exit 1 -fi -set -e - -################################################################################ -# Sign the package -################################################################################ -tput bold; echo ">>> Star-Engine packages"; tput sgr0 -archs=$(find downloads -regex "^.*/Star-Engine-[0-9]+\.[0-9]+\.[0-9]+-.*zip" \ - -o -regex "^.*/Star-Engine-[0-9]+\.[0-9]+\.[0-9]+-.*tar.gz") - -sign_something=0 -for arch in $archs; do - if [ ! -f $arch.sig ]; then - echo "Sign $arch" - gpg -a -o $arch.sig --detach-sign $arch - sign_something=1 - fi -done - -if [ $sign_something == 0 ]; then - echo "Nothing to do" -fi - -echo "" - -################################################################################ -# Genrate the HTML code of the star-engine release notes -################################################################################ -tput bold; echo ">>> Star-Engine web pages"; tput sgr0 -echo "Generate the release notes" -$markdown $2 \ - | sed '/^<h2>Release notes<\/h2>/,$!d' \ - | sed '/^<h2>Licenses<\/h2>/,$d' \ - > star-engine-release-notes.html.in - -################################################################################ -# Generate the overview page -################################################################################ -echo "Write star-engine.html" -{ - print_header Star-Engine Overview - VERSION=$1 envsubst < star-engine.html.in - print_footer -} > star-engine.html - -################################################################################ -# Generate the Downloads page -################################################################################ -echo "Write star-engine-downloads.html" -{ - print_header Star-Engine Downloads; - echo '<header><h1>Downloads</h1></header>'; - print_downloads Star-Engine; - cat star-engine-release-notes.html.in; - print_footer; -} > star-engine-downloads.html; - -echo "" - diff --git a/star-engine/Makefile b/star-engine/Makefile @@ -0,0 +1,37 @@ +# Copyright (C) 2018 |Meso|Star> +# +# 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/>. + +STAR-ENGINE-VERSION=0.7.0 +STAR-ENGINE-README=~/code/star-engine/README.md + +SRC = star-engine.sh star-engine.html.in + +.PHONY: all clean default publish +default: all + +all: ${SRC} + @sh star-engine.sh $(STAR-ENGINE-VERSION) $(STAR-ENGINE-README) + +publish: + rsync -avzr star-engine.html star-engine-downloads.html downloads ${REMOTE}/star-engine/ + +clean: + rm \ + star-engine.html \ + star-engine-downloads.html \ + star-engine-release-notes.html.in \ + downloads/*.sig + + diff --git a/star-engine/star-engine.html.in b/star-engine/star-engine.html.in @@ -0,0 +1,208 @@ +<header> + <h1>Star-Engine - A framework for Monte-Carlo solvers</h1> +</header> + +<div id="news"> + <p><b>Download Star-Engine ${VERSION}</b></p> + <ul> + <li>GNU/Linux: + <a href="downloads/star-engine/Star-Engine-${VERSION}-GNU-Linux64.tar.gz">tarball</a> / + <a href="downloads/star-engine/Star-Engine-${VERSION}-GNU-Linux64.tar.gz.sig">pgp</a></li> + <li>Windows: + <a href="downloads/star-engine/Star-Engine-${VERSION}-Win64.zip">zip</a> / + <a href="downloads/star-engine/Star-Engine-${VERSION}-Win64.zip.sig">pgp</a></li> + </ul> + <ul> + <li>Sources: + <a href="downloads/star-engine/Star-Engine-${VERSION}-Sources.zip">zip</a> / + <a href="downloads/star-engine/Star-Engine-${VERSION}-Sources.zip.sig">pgp</a></li> + </ul> +</div> + +<p>The purpose of Star-Engine is to provide a <b>development environment</b> +for engineers and researchers who wish to use the <b>Monte-Carlo</b> method in +order to perform numerical simulations. The Monte-Carlo method is indeed the +only numerical method suitable to solve <b>high-dimensional</b> integrals even +if an <b>higly complex 3D scene</b> or many <b>coupled phenomena</b> have to be +considered. + +<p>On paper, such complex situations are easily handled: physicists will +essentially translate the <b>integral</b> they need to solve into a +mathematical form that can be read as a Monte-Carlo algorithm. But then, +developing the associated simulation code might be very difficult, if even +possible, because mathematical expressions do not provide any clue on data +management concerns, or on how to address the development environment +constraints. One good example would be a common integral over a surface: while +it could be quite easy to write this integral, coding a fast and accurate +function that can be used for any given surface is no small feat.</p> + +<p>Star-Engine provides such practical solutions: it can be seen as a bridge +between a Monte-Carlo algorithm that exists only as a mathematical expression +and the actual numerical simulation code that uses this algorithm in order to +evaluate the solution.</p> + +<h2>Star-Engine components</h2> + +<p>Star-Engine is a collection of <b>C libraries</b> available for the x86-64 +architecture on GNU/Linux as well as Microsoft Windows 7 and later. It is +<b>free software</b> released under <a +href=https://en.wikipedia.org/wiki/Copyleft>copyleft</a> licenses. You are +welcome to redistribute them under certain conditions. Refer to their +associated license for details.</p> + +<p>The core components of the Star-Engine framework and their functionalities +are briefly described below:</p> + +<ul> + <li> + The <a href=https://gitlab.com/meso-star/star-sp.git>Star-SamPling</a> + library implements a set of [Pseudo] <b>Random Number Generators</b> and + <b>random variates</b> useful in the development of Monte-Carlo solvers + which heavily rely on distributions of random variables. + </li><li> + <a href="https://gitlab.com/meso-star/star-mc.git">Star-MonteCarlo</a> + makes simpler the development of efficient Monte-Carlo solvers by providing + multi-threaded integration of user defined integrands. + </li><li> + <a + href="https://gitlab.com/meso-star/star-sf.git">Star-ScatteringFunctions</a> + implements a set of <b>B</b>idirectional <b>S</b>cattering + <b>D</b>istribution <b>F</b>unctions and phase functions to describe + angular distribution of light relected from an interface or a body when + illuminated from a specific direction. + </li><li> + The <a href=https://gitlab.com/meso-star/star-3d.git>Star-3D</a> and + <a href=https://gitlab.com/meso-star/star-2d.git>Star-2D</a> libraries + manage <b>3D</b> or <b>2D</b> geometries and provide functionalities to + efficiently access them through <b>ray-tracing</b> or <b>sampling</b>. The + ray-tracing functionalities are internally powered by <a + href=https://software.intel.com/sdvis>Intel® Rendering Framework</a>: <a + href=http://embree.github.io/>Embree</a>. + </li><li> + <a + href="https://gitlab.com/meso-star/star-3dut.git">Star-3DUtilityToolkit</a> + provides functions to generate the triangular mesh of several shapes, like + cylinder, sphere, supershapes <i>etc.</i> + </li><li> + <a href="https://gitlab.com/meso-star/star-3daw.git">Star-3DAW</a> + and <a href="https://gitlab.com/meso-star/star-3dstl.git">Star-3DSTL</a> + generate Star-3D shapes from geometries saved in the Alias Wavefront obj + and <b>ST</b>ereo <b>L</b>ithography file formats, respectively. This + simplifies the use of Star-3D with geometries exported from CAD software. + </li> +</ul> + +<h2>Related projects</h2> + +<p>The following software make use of Star-Engine to implement Monte-Carlo +solvers for a wide range of purposes. Refer to the their associated +documentation for more informations.</p> + +<ul> + <li><a href="../schiff/schiff.html">Schiff</a>: computes the radiative properties of + soft particles,</li> + <li><a href="../solstice/solstice.html">Solstice</a>: simulates concentrated solar + plants,</li> + <li><a href="../stardis/stardis.html">Stardis</a>: solves coupled thermal problems,</li> + <li><a href="https://gitlab.com/meso-star/star-4v_s.git">Star-4V/S</a>: + evaluates an invariant property of diffuse random walks,</li> + <li><a href="https://gitlab.com/meso-star/star-gf.git">Star-GebhartFactor</a>: + computes the <a href="https://en.wikipedia.org/wiki/Gebhart_factor">Gebhart + factor</a> between 3D primitives.</li> +</ul> + +<h2>Quick start</h2> + +<p>Download the desired Star-Engine binary archive and check its integrity +against its <a href=../misc/pgp_signatures.html>PGP signature</a>. Then extract it. +You can alternatively install Star-Engine directly from source. Visit the +Star-Engine <a +href="https://gitlab.com/meso-star/star-engine">git repository</a> for a +complete description of the procedure.</p> + +<p>Once installed, the directory of Star-Engine looks like a regular Unix +filesystem hierarchy:</p> + +<ul> + <li>The <code>bin</code> directory stands for binary and contains the + programs deployed with Star-Engine.</li> + <li><code>etc</code> stores the configuration files. Its name stands for + <i>etcetera</i>. For instance, on GNU/Linux it contains the + <code>star-engine.profile</code> bash script that when "sourced" setups the + environment of the current shell for the development of Star-Engine based + applications.</li> + <li>The <code>include</code> directory contains the header files of the + Star-Engine libraries. Theses files should be included in your C/C++ + application through the <code>#include</code> directive.</li> + <li>The <code>lib</code> directory stores the Star-Engine libraries.</li> + <li>The <code>share</code> directory contains architecture independent data, + like the licenses of the installed software.</li> +</ul> + +<h3>Raw compilation</h3> + +<p>Consider a GNU/Linux environment and a project with a single source file +named <code>main.c</code> that uses Star-SamPling to generate random numbers. +To build the project executable, one has first to register the Star-Engine +installation in the current shell by sourcing its "profile".</p> + +<pre class="code"> +$ source <STAR_ENGINE_DIR>/etc/star-engine.profile +</pre> + +<p>where <code><STAR_ENGINE_DIR></code> is the Star-Engine install +directory. Once done, assuming that <b>G</b>NU <b>C</b>ompiler +<b>C</b>ollection is installed on the system, one can compile the program with +a regular <code>gcc</code> invocation.</p> + +<pre class="code"> +$ gcc main.c -lssp +</pre> + +<p>where <code>ssp</code> is the name of the <b>S</b>tar-<b>S</b>am<b>P</b>ling +library in the <code><STAR_ENGINE_DIR>/lib</code> directory.</p> + +<p>Note that this procedure is only practical for simple projects. For more +advanced software one should rely on a build system like <a +href="https://www.gnu.org/software/make/">GNU Make</a> or <a +href="https://cmake.org/">CMake</a>.</p> + +<h3>CMake build system</h3> + +<p>Star-Engine comes with CMake packages that provide programmers using the +CMake build system with a seamless integration of the Star-Engine libraries in +their software. In order to use these packages, add the Star-Engine install +directory to the CMake search paths at the CMake configuration step. Then use +the CMake package mechanism to use the required Star-Engine libraries.</p> + +<p>For instance, consider a project relying on the Star-3D and the +Star-SamPling libraries, with a single source file <code>main.c</code> and a +<code>CMakeLists.txt</code> file defined as follow:</p> + +<pre class="code"> +project(my_project C) + +# Use CMake packages to check and add project dependencies +find_package(Star3D REQUIRED) +find_package(StarSP REQUIRED) +include_directories(${Star3D_INCLUDE_DIR} ${StarSP_INCLUDE_DIR}) + +# Define the program to build +add_executable(my_program main.c) + +# Link the program against the Star-Engine libraries on which it depends +target_link_libraries(my_program StarSP Star3D) +</pre> + +<p>One can generate the CMake project with the following command:</p> + +<pre class="code"> +cmake -G<CMAKE_GENERATOR> -DCMAKE_PREFIX_PATH=<STAR_ENGINE_DIR> <MY_PROJECT_DIR> +</pre> + +<p>where <code><CMAKE_GENERATOR></code> is the build system to use (for +instance <code>"Unix Makefiles"</code>), <code><STAR_ENGINE_DIR></code> +is the Star-Engine install location and <code><MY_PROJECT_DIR></code> is +the directory where the aforementioned <code>CMakeLists.txt</code> file is +stored.</p> + diff --git a/star-engine/star-engine.sh b/star-engine/star-engine.sh @@ -0,0 +1,106 @@ +#!/bin/bash + +# Copyright (C) 2017-2018 |Meso|Star> +# +# 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/>. + +set -e + +source ../meso-menu.sh + +if [ $# -lt 2 ]; then + echo "Usage: $0 VERSION STAR-ENGINE-README" + exit 1 +fi + +if [ ! -f "./downloads/Star-Engine-$1-GNU-Linux64.tar.gz" ]; then + echo "Cannot find Star-Engine-$1-GNU-Linux64.tar.gz" + exit 1 +fi + +if [ ! -f "$2" ]; then + echo "Cannot find $2" + exit 1 +fi + +dir_curr=$(pwd) # Current directory +dir_temp=$(mktemp -d) # Working directory + +set +e +if hash markdown 2> /dev/null; then + markdown=markdown +elif hash markdown2 2> /dev/null; then + markdown=markdown2 +else + echo "Cannot find the markdown[2] command" + exit 1 +fi +set -e + +################################################################################ +# Sign the package +################################################################################ +tput bold; echo ">>> Star-Engine packages"; tput sgr0 +archs=$(find downloads -regex "^.*/Star-Engine-[0-9]+\.[0-9]+\.[0-9]+-.*zip" \ + -o -regex "^.*/Star-Engine-[0-9]+\.[0-9]+\.[0-9]+-.*tar.gz") + +sign_something=0 +for arch in $archs; do + if [ ! -f $arch.sig ]; then + echo "Sign $arch" + gpg -a -o $arch.sig --detach-sign $arch + sign_something=1 + fi +done + +if [ $sign_something == 0 ]; then + echo "Nothing to do" +fi + +echo "" + +################################################################################ +# Genrate the HTML code of the star-engine release notes +################################################################################ +tput bold; echo ">>> Star-Engine web pages"; tput sgr0 +echo "Generate the release notes" +$markdown $2 \ + | sed '/^<h2>Release notes<\/h2>/,$!d' \ + | sed '/^<h2>Licenses<\/h2>/,$d' \ + > star-engine-release-notes.html.in + +################################################################################ +# Generate the overview page +################################################################################ +echo "Write star-engine.html" +{ + print_header Star-Engine Overview + VERSION=$1 envsubst < star-engine.html.in + print_footer +} > star-engine.html + +################################################################################ +# Generate the Downloads page +################################################################################ +echo "Write star-engine-downloads.html" +{ + print_header Star-Engine Downloads; + echo '<header><h1>Downloads</h1></header>'; + print_downloads Star-Engine; + cat star-engine-release-notes.html.in; + print_footer; +} > star-engine-downloads.html; + +echo "" + diff --git a/IGBT.png b/stardis/IGBT.png Binary files differ. diff --git a/stardis/Makefile b/stardis/Makefile @@ -0,0 +1,29 @@ +# Copyright (C) 2017-2018 |Meso|Star> +# +# 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/>. + +SRC = stardis.html.in green_script.js +IMG = foam.png IGBT.png syrthes.png + +.PHONY: all clean default publish +default: all + +all: ${SRC} + @sh stardis.sh + +clean: + rm stardis.html + +publish: + rsync -avz stardis.html green_script.js ${IMG} ${REMOTE}/stardis/ diff --git a/foam.png b/stardis/foam.png Binary files differ. diff --git a/green_script.js b/stardis/green_script.js diff --git a/stardis.html.in b/stardis/stardis.html.in diff --git a/stardis/stardis.sh b/stardis/stardis.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Copyright (C) 2017-2018 |Meso|Star> +# +# 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/>. + +set -e + +source ../meso-menu.sh + +tput bold; echo ">>> Generate the Stardis web pages"; tput sgr0 +echo "Write stardis.html" +{ + print_header Stardis dummy + cat stardis.html.in + print_footer +} > stardis.html + + diff --git a/syrthes.png b/stardis/syrthes.png Binary files differ.