meso-web

Sources of the |Méso|Star> website
git clone git://git.meso-star.fr/meso-web.git
Log | Files | Refs | README | LICENSE

commit cf370828fc19986fe6978a72ac699e8e3ed8e9df
parent 4a78337c4036f41d4d13eff497d62a6def7ad92a
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed,  5 Sep 2018 14:51:44 +0200

Add versioned Solstice-PP archives

Diffstat:
M.gitignore | 1+
MMakefile | 5++---
Msolstice-abg.html.in | 4++--
Asolstice-pp.html.in | 153+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dsolstice-resources.html.in | 177-------------------------------------------------------------------------------
Msolstice.html.in | 3+--
Msolstice.sh | 100++++++++++++++++++++++++++++++++++++++++---------------------------------------
7 files changed, 210 insertions(+), 233 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -8,6 +8,7 @@ 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 star-engine-release-notes.html.in diff --git a/Makefile b/Makefile @@ -43,15 +43,14 @@ clean: 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 \ - downloads/Solstice-PP-Sources.tar.gz \ - downloads/Solstice-PP-Sources.tar.gz.sig + downloads/Solstice-ABG-rsrc.zip .PHONY: publish publish: diff --git a/solstice-abg.html.in b/solstice-abg.html.in @@ -8,7 +8,7 @@ Solstice resources on which it relies - i.e. input files - are available in a separate archive. </p> -<p><table> +<table> <tr> <th>Beginner's guide</th> <th>Resources</th> @@ -17,5 +17,5 @@ separate archive. <td>[<a href='downloads/Solstice-ABG.pdf'>pdf</a>]</td> <td>[<a href='downloads/Solstice-ABG-rsrc.zip'>zip</a>]</td> </tr> -</table></p> +</table> diff --git a/solstice-pp.html.in b/solstice-pp.html.in @@ -0,0 +1,153 @@ +<h2>Post-Processes</h2> + +<div id="news"> + <p><b>Solstice PP ${VERSION} is available</b></p> + <ul> + <li>Sources: + <a href="downloads/Solstice-PP-Sources-${VERSION}.tar.gz">tarball</a> / + <a href="downloads/Solstice-PP-Sources-${VERSION}.tar.gz.sig">pgp</a> + </li> + </ul> +</div> + +<p>Solstice Post-Process is a collection of command-line tools that +post-process the outputs of Solstice. These programs illustrate how the +raw-results of Solstice can be processed with respect to the user needs.</p> + +<p>The provided tools are provided as it, without additional support. They are +free software written in standard C, without external dependency, and released +under the GPLv3+ license. You can thus easily study, modify or extend them +according to your needs. You are also welcome to redistribute them under +certain conditions; refer to the <a +href="https://www.gnu.org/licenses/gpl.html">license</a> for details.</p> + +<p>To use these tools, download the provided archive and verify its integrity +against its <a href=pgp_signatures.html>PGP signature</a>. This archive +contains the sources of the program and a GNU/Makefile to simplify the build +process on GNU/Linux and on Windows through <a +href="http://www.mingw.org/">MinGW</a>. Extract it and run <code>make</code> to +build the programs. Note that even though this archive targets GNU-compliant +systems, the provided sources can be compiled by any C compiler that supports +the C99 standard.</p> + +<pre class="code"> +$ tar xzvf Solstice-PP-Sources-$VERSION.tar.gz +$ cd Solstice-PP-Sources +$ make +</pre> + +<p>A description of each generated tools is given in the following +sections.</p> + +<h3>solppraw</h3> + +<p>The <code>solppraw</code> program reads the Solstice outputs from a file or +the standard input whether a filename is provided as an argument or not, +respectively. For each simulated sun direction, it formats the raw results in a +human readable text file, simplifying the analysis of the results. +</p> + +<p>The following example invokes Solstice to simulate two sun directions and +write the results in the <code>output</code> file that is then post-processed +by the <code>solppraw</code> tool.</p> + +<pre class="code"> +$ solstice -D45,70:50,75 -R rcvs.yaml -o output input.yaml +$ solppraw output +Writing `45-70-raw-results.txt' +Writing `50-75-raw-results.txt' +</pre> + +<p>Note that one can directly pipe the results of <code>solstice</code> to +<code>solppraw</code> without any intermediary <code>output</code> file.</p> + +<pre class="code"> +$ solstice -D45,70:50,75 -R rcvs.yaml input.yaml | solppraw +Writing `45-70-raw-results.txt' +Writing `50-75-raw-results.txt' +</pre> + +<h3>solmaps</h3> + +<p>The <code>solmaps</code> command line takes as input the results of a +regular Solstice simulation. These data are read from a file or from standard +input whether a filename is provided as an argument or not, respectively. +<code>solmaps</code> extracts the maps of incoming flux computed by Solstice +for the receivers whose <code>per_primitive</code> flag is enabled (see <a +href=man/man5/solstice-receiver.5.html>solstice-receiver</a>(5) for more +informations). Each map is then saved in a specific <a +href="http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf">VTK</a> +file.</p> + +<p>The following example pipes <code>solstice</code> with <code>solmaps</code> +to save the maps of the receivers <code>target_a</code> and +<code>target_b</code> computed by solstice for each provided sun +direction.</p> + +<pre class="code"> +$ solstice -n10000 -D45,70:50,75 -R rcvs.yaml input.yaml | solmaps +Writing `45-70-target_a.vtk' +Writing `45-70-target_b.vtk' +Writing `50-75-target_a.vtk' +Writing `50-75-target_b.vtk' +</pre> + +<h3>solpaths</h3> + +<p>The <code>solpaths</code> tool reads the radiative paths dumped by Solstice +when it is invoked with the <code>-p</code> option. The radiative paths are read +from a file or from the standard input, whether a filename is provided as an +argument or not, respectively. For each simulated sun direction, it generates a +<a +href="http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf">VTK</a> +file of the radiative paths that can be then visualized in <a +href="https://www.paraview.org">Paraview</a>.</p> + +<p>The following example illustrates how <code>solpaths</code> is piped with +<code>solstice</code> to generate two VTK files, one per simulated sun +direction.</p> + +<pre class="code"> +$ solstice -n100 -D45,70:50,75 -R rcvs.yaml -p default input.yaml | solpaths +Writing `45-70-paths.vtk' +Writing `50-75-paths.vtk' +</pre> + +<h3>solpp</h3> + +<p>The <code>solpp</code> program takes two input files: the geometry of a +solar plant output by Solstice when it is invoked with the <code>-g</code> +option, and the results of a legacy Solstice simulation. For each simulated sun +direction, it writes three files. The first one, is a +<a +href="http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf">VTK</a> +file that maps to the +meshes of the primary geometries (i.e. the reflectors) their associated +simulation results; for instance their respective cosine factor or the amount +of flux that reaches a receiver and comes from them. The second output file, +is another VTK file that stores the geometry of the receivers and their +simulation results as their incoming flux or their efficiency. Finally, the third +file is an <a HREF="http://www.martinreddy.net/gfx/3d/OBJ.spec">OBJ</a> file +that stores the meshes of the miscellaneous geometries, i.e. the geometries +that are neither receivers nor primary geometries. These files can then be +visualised and analysed in <a href="https://www.paraview.org">Paraview</a>.</p> + +<p>In the following example, <code>solstice</code> is invoked to simulate two +sun directions on the solar plant described in the <code>input.yaml</code> +file. We then rerun <code>solstice</code> with the <code>-g</code> option to +export the geometry of this solar plant with respect to the aforementioned sun +directions. We finally invoke <code>solpp</code> to post-process the previous +outputs saved in the <code>simul</code> and <code>geom</code> files.</p> + +<pre class="code"> +$ solstice -D45,70:50,75 -R rcvs.yaml -o simul input.yaml +$ solstice -D45,70:50,75 -g format=obj -o geom input.yaml +$ solpp geom simul +Writing `45-70-primaries.vtk' +Writing `45-70-receivers.vtk' +Writing `45-70-miscellaneous.obj' +Writing `50-75-primaries.vtk' +Writing `50-75-receivers.vtk' +Writing `50-75-miscellaneous.obj' +</pre> + diff --git a/solstice-resources.html.in b/solstice-resources.html.in @@ -1,177 +0,0 @@ -<header> - <h1>Additional resources</h1> -</header> - -<h2 id=ABG>Beginner's guide</h2> - -<p> -The <b>Solstice Absolute Beginner's Guide</b> is designed to introduce enough -concepts and functionalities that you will be able to autonomously use the -Solstice program. The tutorial itself is provided in a pdf file while the -Solstice resources on which it relies - i.e. input files - are available in a -separate archive. -</p> - -<table> - <tr> - <th>Beginner's guide</th> - <th>Resources</th> - </tr> - <tr> - <td>[<a href='downloads/Solstice-ABG.pdf'>pdf</a>]</td> - <td>[<a href='downloads/Solstice-ABG-rsrc.zip'>zip</a>]</td> - </tr> -</table> - -<h2>Post-Processes</h2> - -<p>Solstice Post-Process is a collection of command-line tools that -post-process the outputs of Solstice. These programs illustrate how the -raw-results of Solstice can be processed with respect to the user needs.</p> - -<p>The provided tools are compatible with the latest version of Solstice, only. -They do not belong to the Solstice project and are thus provided as it, without -additional support. They are free software written in standard C, without -external dependency, and released under the GPLv3+ license. You can thus easily -study, modify or extend them according to your needs. You are also welcome to -redistribute them under certain conditions; refer to the <a -href="https://www.gnu.org/licenses/gpl.html">license</a> for details.</p> - -<table> - <tr><th>Sources</th></tr> - <tr><td> - [<a href="downloads/Solstice-PP-Sources.tar.gz">tarball</a>] - [<a href="downloads/Solstice-PP-Sources.tar.gz.sig">pgp</a>] - </td></tr> -</table> - -<p>To use these tools, download the provided archive and verify its integrity -against its <a href=pgp_signatures.html>PGP signature</a>. This archive -contains the sources of the program and a GNU/Makefile to simplify the build -process on GNU/Linux and on Windows through <a -href="http://www.mingw.org/">MinGW</a>. Extract it and run <code>make</code> to -build the programs. Note that even though this archive targets GNU-compliant -systems, the provided sources can be compiled by any C compiler that supports -the C99 standard.</p> - -<pre class="code"> -$ tar xzvf Solstice-PP-Sources.tar.gz -$ cd Solstice-PP-Sources -$ make -</pre> - -<p>A description of each generated tools is given in the following -sections.</p> - -<h3>solppraw</h3> - -<p>The <code>solppraw</code> program reads the Solstice outputs from a file or -the standard input whether a filename is provided as an argument or not, -respectively. For each simulated sun direction, it formats the raw results in a -human readable text file, simplifying the analysis of the results. -</p> - -<p>The following example invokes Solstice to simulate two sun directions and -write the results in the <code>output</code> file that is then post-processed -by the <code>solppraw</code> tool.</p> - -<pre class="code"> -$ solstice -D45,70:50,75 -R rcvs.yaml -o output input.yaml -$ solppraw output -Writing `45-70-raw-results.txt' -Writing `50-75-raw-results.txt' -</pre> - -<p>Note that one can directly pipe the results of <code>solstice</code> to -<code>solppraw</code> without any intermediary <code>output</code> file.</p> - -<pre class="code"> -$ solstice -D45,70:50,75 -R rcvs.yaml input.yaml | solppraw -Writing `45-70-raw-results.txt' -Writing `50-75-raw-results.txt' -</pre> - -<h3>solmaps</h3> - -<p>The <code>solmaps</code> command line takes as input the results of a -regular Solstice simulation. These data are read from a file or from standard -input whether a filename is provided as an argument or not, respectively. -<code>solmaps</code> extracts the maps of incoming flux computed by Solstice -for the receivers whose <code>per_primitive</code> flag is enabled (see <a -href=man/man5/solstice-receiver.5.html>solstice-receiver</a>(5) for more -informations). Each map is then saved in a specific <a -href="http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf">VTK</a> -file.</p> - -<p>The following example pipes <code>solstice</code> with <code>solmaps</code> -to save the maps of the receivers <code>target_a</code> and -<code>target_b</code> computed by solstice for each provided sun -direction.</p> - -<pre class="code"> -$ solstice -n10000 -D45,70:50,75 -R rcvs.yaml input.yaml | solmaps -Writing `45-70-target_a.vtk' -Writing `45-70-target_b.vtk' -Writing `50-75-target_a.vtk' -Writing `50-75-target_b.vtk' -</pre> - -<h3>solpaths</h3> - -<p>The <code>solpaths</code> tool reads the radiative paths dumped by Solstice -when it is invoked with the <code>-p</code> option. The radiative paths are read -from a file or from the standard input, whether a filename is provided as an -argument or not, respectively. For each simulated sun direction, it generates a -<a -href="http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf">VTK</a> -file of the radiative paths that can be then visualized in <a -href="https://www.paraview.org">Paraview</a>.</p> - -<p>The following example illustrates how <code>solpaths</code> is piped with -<code>solstice</code> to generate two VTK files, one per simulated sun -direction.</p> - -<pre class="code"> -$ solstice -n100 -D45,70:50,75 -R rcvs.yaml -p default input.yaml | solpaths -Writing `45-70-paths.vtk' -Writing `50-75-paths.vtk' -</pre> - -<h3>solpp</h3> - -<p>The <code>solpp</code> program takes two input files: the geometry of a -solar plant output by Solstice when it is invoked with the <code>-g</code> -option, and the results of a legacy Solstice simulation. For each simulated sun -direction, it writes three files. The first one, is a -<a -href="http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf">VTK</a> -file that maps to the -meshes of the primary geometries (i.e. the reflectors) their associated -simulation results; for instance their respective cosine factor or the amount -of flux that reaches a receiver and comes from them. The second output file, -is another VTK file that stores the geometry of the receivers and their -simulation results as their incoming flux or their efficiency. Finally, the third -file is an <a HREF="http://www.martinreddy.net/gfx/3d/OBJ.spec">OBJ</a> file -that stores the meshes of the miscellaneous geometries, i.e. the geometries -that are neither receivers nor primary geometries. These files can then be -visualised and analysed in <a href="https://www.paraview.org">Paraview</a>.</p> - -<p>In the following example, <code>solstice</code> is invoked to simulate two -sun directions on the solar plant described in the <code>input.yaml</code> -file. We then rerun <code>solstice</code> with the <code>-g</code> option to -export the geometry of this solar plant with respect to the aforementioned sun -directions. We finally invoke <code>solpp</code> to post-process the previous -outputs saved in the <code>simul</code> and <code>geom</code> files.</p> - -<pre class="code"> -$ solstice -D45,70:50,75 -R rcvs.yaml -o simul input.yaml -$ solstice -D45,70:50,75 -g format=obj -o geom input.yaml -$ solpp geom simul -Writing `45-70-primaries.vtk' -Writing `45-70-receivers.vtk' -Writing `45-70-miscellaneous.obj' -Writing `50-75-primaries.vtk' -Writing `50-75-receivers.vtk' -Writing `50-75-miscellaneous.obj' -</pre> - diff --git a/solstice.html.in b/solstice.html.in @@ -149,4 +149,4 @@ user support. 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>. -\ No newline at end of file +<a href="mailto:contact@meso-star.com">contact us</a>. diff --git a/solstice.sh b/solstice.sh @@ -88,57 +88,12 @@ fi echo "" ################################################################################ -# Generate the Solstice-PP archive -################################################################################ -tput bold; echo ">>> Solstice Post-Processes"; tput sgr0 -do_something=0 -PP=Solstice-PP-Sources -if [ ! -f downloads/$PP.tar.gz ]; then - do_something=1 - cd $dir_temp - mkdir $PP - cd $PP - cp $3/sol*.c $3/solpp.h . - - echo "Generate the Solstice PP Makefile" - { - echo 'PROG = solmaps solpp solppraw solpaths' - echo '' - echo '.PHONY: default' - echo 'default: $(PROG)' - echo '' - echo '$(PROG): %: %.c solpp.h' - echo -e '\t@echo -e " CC $<"; $(CC) -o $@ -O2 -std=c99 -pedantic -Wall $<' - echo '' - echo '.PHONY: clean' - echo 'clean:' - echo -e '\t@rm $(PROG)' - } > Makefile - cd .. - echo "Archive the Solstice-PP sources" - tar czf $PP.tar.gz $PP - cp $PP.tar.gz $dir_curr/downloads/ - cd $dir_curr -fi - -if [ ! -f downloads/$PP.tar.gz.sig ]; then - do_something=1 - echo "Sign $PP.tar.gz" - gpg -a -o downloads/$PP.tar.gz.sig --detach-sign downloads/$PP.tar.gz -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") +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 @@ -195,10 +150,57 @@ echo "Write 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; - cat solstice-resources.html.in; + 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