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 705ab407185dc8ba68259ebdeb0c55865f30372a
parent 369017052249bb1fabf9beaaeb4c694929a352d4
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu, 21 Sep 2017 15:52:33 +0200

Make the solstice.html page generic to the solstice version

Diffstat:
MMakefile | 6+++---
Dsolstice-gen-refdoc.sh | 140-------------------------------------------------------------------------------
Asolstice-gen.sh | 143+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msolstice.html | 9++++-----
Asolstice.html.in | 173+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 323 insertions(+), 148 deletions(-)

diff --git a/Makefile b/Makefile @@ -24,10 +24,10 @@ all: solstice .PHONY: solstice solstice: @tput bold - @echo -e ">>> Generate Solstice doc from '$(SOLSTICE-DIR)'" + @echo -e ">>> Generate Solstice web pages from '$(SOLSTICE-DIR)'" @tput sgr0 - @sh ./solstice-gen-refdoc.sh $(SOLSTICE-DIR) + @sh ./solstice-gen.sh $(SOLSTICE-DIR) .PHONY: clean clean: - @rm -rf man + @rm -rf man solstice.html diff --git a/solstice-gen-refdoc.sh b/solstice-gen-refdoc.sh @@ -1,140 +0,0 @@ -#!/bin/bash - -# Copyright (C) |Meso|Star> 2017 -# -# 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 - -if [ $# -lt 1 ]; then - echo "Usage: $0 SOLSTIC-DIR" - exit 1 -fi - -if [ ! -d $1 ]; then - echo " '$1' is not a directory." - exit 1 -fi - -if [ ! -f $1/bin/solstice ]; then - echo "Cannot find the solstice program." - exit 1 -fi - -version=$(echo `readlink $1/bin/solstice` | sed 's/solstice-\(.*\)/\1/g') - -if [ "$version" == "" ]; then - echo "Cannot retrieve the solstice version." - exit 1 -fi - -man_pages=( - "solstice 1" - "solstice-input 5" - "solstice-output 5" - "solstice-receiver 5" -) - -print_header() { - local name=$1 - local num=$2 - - echo '<!DOCTYPE html>' - echo '<html lang=en>' - echo '<head>' - echo ' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">' - echo ' <meta name="viewport" content="width=device-width, initial-scale=1">' - echo ' <title>Solstice</title>' - echo ' <link rel="stylesheet" title="default" href="../../meso.css">' - echo '</head>' - echo '' - echo '<body>' - echo '' - echo '<div id="menu">' - echo ' <h2>Solstice</h2>' - echo ' <ul>' - echo ' <li><a href="../../solstice.html">About</a></li>' - echo ' <li>Reference documentation</li>' - echo ' </ul>' - echo ' <ul id=lvl2>' - - local i - for((i=0; i < ${#man_pages[@]}; ++i)); do - local entry=(${man_pages[$i]}) - if [ "$name" == ${entry[0]} ]; then - echo " <li id=cur>$name</li>" - else - local link_path="../man${entry[1]}/${entry[0]}.${entry[1]}.html" - echo " <li><a href=\"$link_path\">${entry[0]}</a></li>" - fi - done - echo ' </ul>' - echo ' <div id="info">' - echo ' <p>Solstice is developped by <a' - echo ' href="https://www.meso-star.com">|Méso|Star&gt;</a> in collaboration with' - echo ' the <a href="http://www.labex-solstice.fr/">Laboratory of Excellence' - echo ' Solstice</a> and the <a' - echo ' href="http://www.promes.cnrs.fr/index.php?page=home-en">PROMES</a>' - echo ' laboratory of the National Center for Scientific Research. It is copyright' - echo ' &#169; <a href="http://www.cnrs.fr/index.php">CNRS</a> 2016-2017.</p>' - echo ' </div>' - echo '</div>' - echo '<div id=content>' - echo "<div style=\"font-variant: small-caps; float: right; color: #777777\">Version $version</div>" - echo '<header>' - echo " <h1>$name($num)</h1>" - echo '</header>' -} - -print_footer() { - echo '</div>' - echo '</body>' -} - -for((i=0; i<${#man_pages[@]}; ++i)); do - entry=(${man_pages[$i]}) - man_name=${entry[0]}.${entry[1]} - man_path=$1/share/man/man${entry[1]}/$man_name - output=man/man${entry[1]}/$man_name.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${entry[1]} ]; then - mkdir man/man${entry[1]} - fi - - echo "Write $output" - print_header ${entry[0]} ${entry[1]} > $output - man2html -r $man_path | tail -n +30 | sed '/^<HR>$/,$d' | sed '/\&nbsp;/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" -o "${entry[0]}" == "solstice-receiver" ]; then - sed -i "s/\<Aincqt\>/Ain't/g" $output - fi - print_footer ${entry[0]} ${entry[1]} >> $output -done diff --git a/solstice-gen.sh b/solstice-gen.sh @@ -0,0 +1,143 @@ +#!/bin/bash + +# Copyright (C) |Meso|Star> 2017 +# +# 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 + +if [ $# -lt 1 ]; then + echo "Usage: $0 SOLSTIC-DIR" + exit 1 +fi + +if [ ! -d $1 ]; then + echo " '$1' is not a directory." + exit 1 +fi + +if [ ! -f $1/bin/solstice ]; then + echo "Cannot find the solstice program." + exit 1 +fi + +version=$(echo `readlink $1/bin/solstice` | sed 's/solstice-\(.*\)/\1/g') + +if [ "$version" == "" ]; then + echo "Cannot retrieve the solstice version." + exit 1 +fi + +echo "Write solstice.html" +version=$version envsubst < solstice.html.in > solstice.html + +man_pages=( + "solstice 1" + "solstice-input 5" + "solstice-output 5" + "solstice-receiver 5" +) + +print_header() { + local name=$1 + local num=$2 + + echo '<!DOCTYPE html>' + echo '<html lang=en>' + echo '<head>' + echo ' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">' + echo ' <meta name="viewport" content="width=device-width, initial-scale=1">' + echo ' <title>Solstice</title>' + echo ' <link rel="stylesheet" title="default" href="../../meso.css">' + echo '</head>' + echo '' + echo '<body>' + echo '' + echo '<div id="menu">' + echo ' <h2>Solstice</h2>' + echo ' <ul>' + echo ' <li><a href="../../solstice.html">About</a></li>' + echo ' <li>Reference documentation</li>' + echo ' </ul>' + echo ' <ul id=lvl2>' + + local i + for((i=0; i < ${#man_pages[@]}; ++i)); do + local entry=(${man_pages[$i]}) + if [ "$name" == ${entry[0]} ]; then + echo " <li id=cur>$name</li>" + else + local link_path="../man${entry[1]}/${entry[0]}.${entry[1]}.html" + echo " <li><a href=\"$link_path\">${entry[0]}</a></li>" + fi + done + echo ' </ul>' + echo ' <div id="info">' + echo ' <p>Solstice is developped by <a' + echo ' href="https://www.meso-star.com">|Méso|Star&gt;</a> in collaboration with' + echo ' the <a href="http://www.labex-solstice.fr/">Laboratory of Excellence' + echo ' Solstice</a> and the <a' + echo ' href="http://www.promes.cnrs.fr/index.php?page=home-en">PROMES</a>' + echo ' laboratory of the National Center for Scientific Research. It is copyright' + echo ' &#169; <a href="http://www.cnrs.fr/index.php">CNRS</a> 2016-2017.</p>' + echo ' </div>' + echo '</div>' + echo '<div id=content>' + echo "<div style=\"font-variant: small-caps; float: right; color: #777777\">Version $version</div>" + echo '<header>' + echo " <h1>$name($num)</h1>" + echo '</header>' +} + +print_footer() { + echo '</div>' + echo '</body>' +} + +for((i=0; i<${#man_pages[@]}; ++i)); do + entry=(${man_pages[$i]}) + man_name=${entry[0]}.${entry[1]} + man_path=$1/share/man/man${entry[1]}/$man_name + output=man/man${entry[1]}/$man_name.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${entry[1]} ]; then + mkdir man/man${entry[1]} + fi + + echo "Write $output" + print_header ${entry[0]} ${entry[1]} > $output + man2html -r $man_path | tail -n +30 | sed '/^<HR>$/,$d' | sed '/\&nbsp;/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" -o "${entry[0]}" == "solstice-receiver" ]; then + sed -i "s/\<Aincqt\>/Ain't/g" $output + fi + print_footer ${entry[0]} ${entry[1]} >> $output +done diff --git a/solstice.html b/solstice.html @@ -40,8 +40,7 @@ </header> <div id="news"> - <p><b>Solstice 0.2.3 is available</b></p> - <p>Fix several bugs and update the man pages:</p> + <p><b>Solstice 0.5.0 is available</b></p> <ul> <li> GNU/Linux: <a href="">tar.gz</a> / <a href="">md5</a></li> <li> Windows: <a href="">zip</a> / <a href="">md5</a></li> @@ -137,7 +136,7 @@ Solstice application to the system and allowing its invocation from anywhere.</p> <pre class="code"> -C:\Users\Meso-Star\Solstice-0.2.3-Win64\bin>solstice -h +C:\Users\Meso-Star\Solstice-0.5.0-Win64\bin>solstice -h </pre> <p>On GNU/Linux, source the provided <code>solstice.profile</code> file to @@ -145,7 +144,7 @@ register the Solstice installation for the current shell priorly to the invocation of the <code>solstice</code> program.</p> <pre class="code"> -~ $ source ~/Solstice-0.2.3-GNU-Linux64/etc/solstice.profile +~ $ source ~/Solstice-0.5.0-GNU-Linux64/etc/solstice.profile ~ $ solstice -h </pre> @@ -153,7 +152,7 @@ invocation of the <code>solstice</code> program.</p> the profile of Solstice in your shell initialisation script.</p> <pre class="code"> -~ $ echo "source ~/Solstice-0.2.3-GNU-Linux64/etc/solstice.profile" >> ~/.bashrc +~ $ echo "source ~/Solstice-0.5.0-GNU-Linux64/etc/solstice.profile" >> ~/.bashrc </pre> <p>The Solstice <b>reference documentation</b> is installed in the diff --git a/solstice.html.in b/solstice.html.in @@ -0,0 +1,173 @@ +<!DOCTYPE html> + +<html lang=en> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Solstice</title> + <link rel="stylesheet" title="default" href="meso.css"> +</head> + +<body> + +<div id="menu"> + <h2>Solstice</h2> + <ul> + <li id=cur>About</li> + <li>Reference documentation</li> + </ul> + <ul id=lvl2> + <li><a href="man/man1/solstice.1.html">solstice</a></li> + <li><a href="man/man5/solstice-input.5.html">solstice-input</a></li> + <li><a href="man/man5/solstice-output.5.html">solstice-output</a></li> + <li><a href="man/man5/solstice-receiver.5.html">solstice-receiver</a></li> + </ul> + + <div id="info"> + <p>Solstice is developped by <a + href="https://www.meso-star.com">|Méso|Star&gt;</a> in collaboration with + the <a href="http://www.labex-solstice.fr/">Laboratory of Excellence + Solstice</a> and the <a + href="http://www.promes.cnrs.fr/index.php?page=home-en">PROMES</a> + laboratory of the National Center for Scientific Research. It is copyright + &#169; <a href="http://www.cnrs.fr/index.php">CNRS</a> 2016-2017.</p> + </div> +</div> + +<div id=content> +<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="">tar.gz</a> / <a href="">md5</a></li> + <li> Windows: <a href="">zip</a> / <a href="">md5</a></li> + </ul> + <ul><li>Sources: <a href="">zip</a> / <a href="">md5</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 provides insightful informations when looking for the optimal design +of a concentrated solar plant. Solstice is powered by a <b>Monte-Carlo +solver</b>, which means that every of these results 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 with respect to the STereo Lithography file +format. + +<p>The orientation of the reflectors can be either defined manually or +<b>automatically computed</b> by Solstice with respect 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 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" onclick="window.open(this.href); +return false;">license</a> for details.</p> + +<h2>A straight interface</h2> + +<p>The Solstice program is a <b>command-line tool</b> that consumes input data, +performs computations, write results and that's all. It presumes nothing 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 +format.</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 id="img" style="width: 18em"> + <a href="themis.png"> + <img src="themis.png" style="float: relative" alt="Themis in paraview"> + </a> + <div id="caption"> + Post-processed Solstice outputs displayed in + <a href="https://www.paraview.org" onclick='window.open(this.href); + return false;'>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 save the <b>radiative +paths</b> sampled during a simulation, and export the solar plant +<b>geometry</b> with respect to a regular geometric 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 provide an efficient and interactive way to visualise, and thus +analyse, the estimated data in the desired data analysis toolkit.</p> + +<p>Solstice provides also <b>offline rendering</b> capabilities. It implements +an un-biased physically based rendering kernel that relies on the data and +algorithmic tools used by the solver. This ensures that the drawn 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 check its MD5 checksum against its +corresponding <code>md5</code> file. 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 and allowing its invocation from +anywhere.</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>To setup the Solstice environment for all subsequently spawned shells, source +the profile of Solstice in your shell initialisation script.</p> + +<pre class="code"> +~ $ echo "source ~/Solstice-${version}-GNU-Linux64/etc/solstice.profile" >> ~/.bashrc +</pre> + +<p>The Solstice <b>reference documentation</b> is installed in the +<code>share/man</code> sub-directory of Solstice. To consult it, browse the +HTML files stored 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 to read its ROFF version.</p> + +<pre class="code"> +~ $ man solstice +~ $ man solstice-input +~ $ man solstice-output +~ $ man solstice-receiver +</pre> + +</div> <!--content--> + +</body>