stardis-green

Post-processing of green functions
git clone git://git.meso-star.fr/stardis-green.git
Log | Files | Refs | README | LICENSE

commit 3855ca05adfc544e24d51a93d27d19beef50c56b
parent 1022fb4e32840fdc4123b989d78f4323de847c9b
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri, 26 Apr 2024 15:13:20 +0200

Translate asciidoc manual pages into mdoc

Unlike writing manuals with man's roff macros, and even more so with
asciidoc, mdoc macros take care of layout, font handling and all the
other typesetting details which, by construction, guarantee the
consistency of all manuals without leaving the responsibility to the
individual author. This also facilitates translation into other formats
and documentation tools. These are the main reasons for writing manual
pages with mdoc macros.

Diffstat:
M.gitignore | 1+
MMakefile | 20++++++++++++--------
Adoc/sgreen-input.5 | 101+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ddoc/sgreen-input.5.txt | 102-------------------------------------------------------------------------------
Ddoc/sgreen-man.css | 96-------------------------------------------------------------------------------
Adoc/sgreen-output.5 | 123+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ddoc/sgreen-output.5.txt | 126-------------------------------------------------------------------------------
Adoc/sgreen.1.in | 144+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ddoc/sgreen.1.txt.in | 117-------------------------------------------------------------------------------
9 files changed, 381 insertions(+), 449 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -5,6 +5,7 @@ *.so *~ .config +doc/sgreen.1 src/green-default.h src/green-version.h sgreen diff --git a/Makefile b/Makefile @@ -72,11 +72,15 @@ src/green-version.h: src/green-version.h.in ################################################################################ # Installation ################################################################################ -install: build_executable +doc/sgreen.1: doc/sgreen.1.in + sed -e 's#@GREEN_ARGS_DEFAULT_VERBOSE_LEVEL@#$(GREEN_ARGS_DEFAULT_VERBOSE_LEVEL)#g'\ + $@.in > $@ + +install: build_executable doc/sgreen.1 @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/bin" sgreen - #@$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man1" doc/sgreen.1 - #@$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man5" doc/sgreen-input.5 - #@$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man5" doc/sgreen-output.5 + @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man1" doc/sgreen.1 + @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man5" doc/sgreen-input.5 + @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man5" doc/sgreen-output.5 @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/doc/stardis" COPYING @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/doc/stardis" README.md @@ -94,13 +98,13 @@ uninstall: all: build_library build_tests clean: - rm -f $(OBJ) $(HDR) .config sgreen + rm -f $(OBJ) $(HDR) .config sgreen doc/sgreen.1 distclean: clean rm -f $(DEP) lint: shellcheck -o all make.sh - #mandoc -Tlint -Wall doc/stardis.1 || [ $$? -le 1 ] - #mandoc -Tlint -Wall doc/stardis-input.5 || [ $$? -le 1 ] - #mandoc -Tlint -Wall doc/stardis-output.5 || [ $$? -le 1 ] + mandoc -Tlint -Wall doc/sgreen.1 || [ $$? -le 1 ] + mandoc -Tlint -Wall doc/sgreen-input.5 || [ $$? -le 1 ] + mandoc -Tlint -Wall doc/sgreen-output.5 || [ $$? -le 1 ] diff --git a/doc/sgreen-input.5 b/doc/sgreen-input.5 @@ -0,0 +1,101 @@ +.\" Copyright (C) 2020-2022, 2024 |Méso|Star> (contact@meso-star.com) +.\" +.\" 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/>. +.Dd April 26, 2024 +.Dt SGREEN-INPUT 5 +.Os +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh NAME +.Nm sgreen-input +.Nd settings description for +.Xr sgreen 1 +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh DESCRIPTION +.Nm +is the format used by the +.Xr sgreen 1 +program to describe settings when applying a Green function. +It relies on a line-based ad-hoc syntax. +.Pp +A settings file is composed of lines of text, each one describing the +settings to apply for a Green function call. +Each line contains +.Li variable = value +pairs +in any number +.Pq at least one pair for a line to be meaningful . +A list of all legit variable names can be found in the Green function +summary, as produced by +.Xr sgreen 1 +option +.Fl s . +Except the name +.Li AMBIENT , +that refers to the ambient radiative temperature and is always a legit +name in settings, the list of names that can be used to form settings is +the list of medium and boundary case-sensitive names defined in the +.Xr stardis-input 5 +files used when creating the Green function applied to the settings. +.Pp +In what follows, text introduced by the sharp character +.Pq Li # +is a comment and is not part of the description. +Any physical quantity involved in settings files is expected in the +International System of Units +.Pq metre, kelvin, Watt . +.Pp +The file format is as follows: +.Bl -column (****************) (::) () +.It Ao Va settings Ac Ta ::= Ta +.Op Ao Va affectation Ac ... +.Op Ao Va comment Ac +.It Ta Ta ... +.It Ao Va affectation Ac Ta ::= Ta Ao Va val Ac Li = Ao Va value Ac +.It Ao Va var Ac Ta ::= Ta Ao Va description-name Ac Ns Li \&. Ns Ao Va field Ac +.It Ta \& \& | Ta Li AMBIENT No # Ambient radiative temperature +.It Ao Va description-name Ac Ta ::= Ta Vt string No # \&No space allowed +.It Ao Va field Ac Ta ::= Ta Li T No # temperature +.It Ta \& \& | Ta Li F No # flux +.It Ta \& \& | Ta Li VP No # volumic power +.It Ao Va value Ac Ta ::= Ta Vt real +.It Ao Va comment Ac Ta ::= Ta Li # Vt string +.El +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh EXAMPLES +Apply a Green function with +.Li AMBIENT +radiative temperature set to 0\& K: +.Bd -literal -offset Ds +AMBIENT = 0 +.Ed +.Pp +First apply a Green function with volumic power in medium +.Qq AL +set to 100\& W/m^3 and temperature of the +.Qq Left +boundary set to 300\& K. +Then apply it with the same variables set to 120 and 350 respectively. +Finally, apply it with the same variables set to 140 and 360 +respectively and temperature of the +.Qq Right +boundary set to 380\& K: +.Bd -literal -offset Ds +AL.VP=100 Left.T=300 +AL.VP=120 Left.T=350 +AL.VP=140 Left.T=360 Right.T=380 +.Ed +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh SEE ALSO +.Xr sgreen 1 , +.Xr stardis-input 5 diff --git a/doc/sgreen-input.5.txt b/doc/sgreen-input.5.txt @@ -1,102 +0,0 @@ -// Copyright (C) 2020-2022 |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/>. - -:toc: - -sgreen-input(5) -=============== - -NAME ----- -sgreen-input - settings description for sgreen(1) - -DESCRIPTION ------------ -*sgreen-input* is the format used by the *sgreen*(1) program to describe -settings when applying a Green function. It relies on a line-based ad-hoc -syntax. - -A settings file is composed of lines of text, each one describing the settings -to apply for a Green function call. Each line contains *variable = value* pairs -in any number (at least one pair for a line to be meaningful). A list of all -legit variable names can be found in the Green function summary, as produced -by *sgreen*(1) option *-s*. - -GRAMMAR -------- -In what follows, text appearing between quote marks has to be used verbatim in -the input, except the quote characters. Also, text introduced by the *#* -character in descriptions, when not verbatim, is a comment and is not part of -the description. - -[verse] -_______ -<settings-file> ::= <settings-line> - [ <settings-file> ] - -<settings-line> ::= [ <var> "=" <value> ] [ <settings-line> ] [ comment ] - -------------------------------------- - -<var> ::= <description-name>"."<field> - | "AMBIENT" # set ambient radiative temperature value - -<value> ::= REAL - -<comment> ::= "#" Any text introduced by the # character - -<description-name> ::= STRING # no space allowed - -<field> ::= "T" # set the temperature value - | "F" # set the flux value - | "VP" # set the volumic power value - -______________ - -NAMES ------ -Except the name AMBIENT, that refers to the ambient radiative temperature and -is always a legit name in settings, the list of names that can be used to form -settings is the list of medium and boundary case-sensitive names defined in the -*stardis-input*(5) files used when creating the Green function applied to the -settings. - -UNITS ------ -Any physical quantity involved in settings files is expected in the -International System of Units (metre, kelvin, Watt). - -EXAMPLES --------- -Apply a Green function with *AMBIENT* radiative temperature set to 0 K. -....... -AMBIENT = 0 -....... - -First apply a Green function with volumic power in medium *AL* set to 100 W/m^3^ -and temperature of the *Left* boundary set to 300 K. Then apply it with the -same variables set to 120 and 350 respectively. Finally, apply it with the -same variables set to 140 and 360 respectively and temperature of the *Right* -boundary set to 380 K. -....... -AL.VP=100 Left.T=300 -AL.VP=120 Left.T=350 -AL.VP=140 Left.T=360 Right.T=380 -....... - -SEE ALSO --------- -*sgreen*(1), -*sgreen-input*(5) diff --git a/doc/sgreen-man.css b/doc/sgreen-man.css @@ -1,96 +0,0 @@ -/* Copyright (C) 2016-2018 CNRS - * - * This is free style sheet: 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 CSS 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/. */ - -body.manpage { - font-family:"Liberation Sans",sans-serif; - font-size:10pt; - text-align: justify; - max-width: 55em; - margin: 1em; - background: #ffffff -} - -body.manpage .monospaced, .literalblock { - margin: 2em; - color: #636261 -} - -body.manpage em { - color: #660000 -} - -body.manpage div.verseblock > pre.content { - font-family: "Liberation Mono",monospace; -} - -body.manpage h1 { - padding-bottom: 0.5em; -} -body.manpage h2 { - border-style: none; -} -body.manpage div.sectionbody { - margin-left: 3em; -} - -body.manpage code { - font-family: "Liberation Mono",monospace; -} - -body.manpage #footer { display: none; } - -body.manpage div#toctitle { display: none; } - -body.manpage div#toc { - display: block; - position:fixed; - top:0; - left:60em; - height:100%; - width: 100%; - padding:3em 0 0 0; - border-left:1px solid #dbdbdb; - background: #eeeeee -} - -body.manpage a { - font-weight: bold; - color: #225588; -} - -body.manpage div#toc a, div#toc a:link, div#toc a:visited { - margin:0; - padding-left: 2em; - color:#999999; - text-decoration:none; - font-weight: normal; -} - -body.manpage div.toclevel1 { - line-height: 1.5em; -} - -body.manpage div.toclevel2 { - margin-left: 2em; -} - -body.manpage div#toc a:hover { - color:#666666; -} - -@media print { - body.manpage div#toc { display: none; } -} - diff --git a/doc/sgreen-output.5 b/doc/sgreen-output.5 @@ -0,0 +1,123 @@ +.\" Copyright (C) 2020-2022, 2024 |Méso|Star> (contact@meso-star.com) +.\" +.\" 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/>. +.Dd April 26, 2024 +.Dt SGREEN-OUTPUT 5 +.Os +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh NAME +.Nm sgreen-output +.Nd output format of +.Xr sgreen 1 +results +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh DESCRIPTION +The type of the data that are generated depends on the options used when +.Xr sgreen 1 +is invoked. +When invoked with option +.Fl a , +.Xr sgreen 1 +outputs Monte Carlo results, either in extended or compact format, +whether option +.Fl e +is used or not. +.Pp +When invoked with the +.Fl s +option, +.Xr sgreen 1 +silently creates an HTML file containing a summary of the Green function +used. +As it conforms to the HTML format found in the HTML specification +documents, these will not be described in further detail below. +This summary HTML file contains the following sections: +.Bl -bullet -compact -offset indent +.It +List of variables +.It +Formula of the Monte Carlo estimate +.It +Counts +.It +Solids +.It +Fluids +.It +T boundaries for solids +.It +T boundaries for fluids +.It +H boundaries for solids +.It +H boundaries for fluids +.It +F boundaries for solids +.It +Solid-Fluid connections +.It +Solid-Solid connections +.It +Radiative temperatures +.El +.Pp +In what follows, some lines end with a backslash +.Pq Li \e . +This is used as a convenience to continue a description next line. +However, this trick cannot be used in actual description files and +actual description lines must be kept single-line. +Text introduced by the sharp character +.Pq Li # +in descriptions is a comment and is not part of the description. +.Pp +The file format for Monte Carlo results is as follows: +.Bl -column (****************) (::) () +.It Ao Va results Ac Ta ::= Ta Ao Va results-raw Ac | Ao Va results-ext Ac +.It Ao Va results-raw Ac Ta ::= Ta Ao Va estimate-raw Ac +.It Ta Ta ... +.It Ao Va results-ext Ac Ta ::= Ta Li message: Initialisation time = Aq Va time +.It Ta Ta Li message: Computation time = Aq Va time +.It Ta Ta Ao Va estimate-ext Ac +.It Ta Ta ... +.It Ao Va estimate-raw Ac Ta ::= Ta Ao Va expected-value Ac Ao Va standard-error Ac +.It Ao Va estimate-ext Ac Ta ::= Ta Ao Va expected-value Ac Li K +/- Ao Va standard-error Ac \e +.It Ta Ta Ao Va applied-settings Ac +.It \ Ta Ta +.It Ao Va expected-value Ac Ta ::= Ta Vt real +.It Ao Va standard-error Ac Ta ::= Ta Vt real +.It Ao Va time Ac Ta :: Ta +.Op Ao Va h Ac Li hour +.Op Ao Va m Ac Li min +.Op Ao Va s Ac Li sec +\e +.It Ta Ta +.Op Ao Va ms Ac Li msec +.Op Ao Va us Ac Li usec +.It Ao Va h Ac Ta ::= Ta Vt integer No # \&In Bq 1, INF +.It Ao Va m Ac Ta ::= Ta Vt integer No # \&In Bq 1, 59 +.It Ao Va s Ac Ta ::= Ta Vt integer No # \&In Bq 1, 59 +.It Ao Va ms Ac Ta ::= Ta Vt integer No # \&In Bq 1, 999 +.It Ao Va us Ac Ta ::= Ta Vt integer No # \&In Bq 1, 999 +.It Ao Va applied-settings Ac Ta ::= Ta Vt string No # Verbatim from the settings file +.El +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh SEE ALSO +.Xr sgreen 1 +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh STANDARDS +.Rs +.%A Web Hypertext Application Technology Working Group +.%T HTML Living Standard +.%U https://html.spec.whatwg.org/ +.Re diff --git a/doc/sgreen-output.5.txt b/doc/sgreen-output.5.txt @@ -1,126 +0,0 @@ -// Copyright (C) 2020-2022 |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/>. - -:toc: - -sgreen-output(5) -================ - -NAME ----- -sgreen-output - output format of sgreen(1) results - -DESCRIPTION ------------ -The type of the data that are generated depends on the options used when -*sgreen*(1) is invoked. When invoked with option *-a*, *sgreen*(1) outputs -Monte-Carlo results, either in extended or compact format, whether option *-e* -is used or not. Also, when invoked whith option *-s* *sgreen*(1) silently -creates an HTML file contening a summary of the Green function used. - -GRAMMAR -------- -As Green summaries comply with HTML format, that can be found in HTML -specification documents [1], they will not be further described thereafter. -Only Monte-Carlo results grammar is described in this section. - -In what follows, text appearing between quote marks is a verbatim part of the -output, except the quote characters, and text introduced by the *#* character -in a description is a comment and is not part of the output. - -[verse] -_______ - -<output> ::= <compact-results> - | <extended-results> - -<compact-results> ::= <compact-MC-result> # as many results as provided - <compact-results> # setting lines - -<extended-results> ::= "message: Initialisation time = " <time value> - "message: Computation time = " <time value> - <extended-MC-results> - -------------------------------------- - -<compact-MC-result> ::= <estimate> <standard-deviation> - -<extended-MC-results> ::= <extended-MC-result> # as many results as provided - | <extended-MC-results> # setting lines - -<time value> ::= [<h> "hour"] [<m> "min"] [<s> "sec"] \ - [<ms> "msec"] [<us> "usec"] - -<extended-MC-result> ::= <estimate> "K +/-" <standard-deviation> \ - ";" <applied-settings> - -<estimate> ::= REAL - -<standard-deviation> ::= REAL # in [0, INF) - -------------------------------------- - -<applied-settings> ::= ASCII TEXT # verbatim from the settings file - -<h> ::= INTEGER # in [1 INF) - -<m> ::= INTEGER # in [1 59] - -<s> ::= INTEGER # in [1 59] - -<ms> ::= INTEGER # in [1 999] - -<us> ::= INTEGER # in [1 999] -_______ - -HTML SUMMARY ------------- -When using option *-s*, *sgreen*(1) creates a summary of the Green function in -HTML format. This document contains the following sections: - -* List of variables - -* Formula of the Monte-Carlo estimate - -* Counts - -* Solids - -* Fluids - -* T boundaries for solids - -* T boundaries for fluids - -* H boundaries for solids - -* H boundaries for fluids - -* F boundaries for solids - -* Solid-Fluid connections - -* Solid-Solid connections - -* Radiative temperatures - -NOTES ------ -1. HTML Standard - <https://html.spec.whatwg.org/> - -SEE ALSO --------- -*sgreen*(1), -*sgreen-input*(5) diff --git a/doc/sgreen.1.in b/doc/sgreen.1.in @@ -0,0 +1,144 @@ +.\" Copyright (C) 2020-2022, 2024 |Méso|Star> (contact@meso-star.com) +.\" +.\" 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/>. +.Dd April 26, 2024 +.Dt SGREEN 1 +.Os +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh NAME +.Nm sgreen +.Nd statistical solving of coupled thermal systems +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh SYNOPSIS +.Nm +.Op Fl ehv +.Op Fl a Pa arguments +.Op Fl g Pa green +.Op Fl s Pa summary +.Op Fl t Ar threads_count +.Op Fl V Ar verbosity_level +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh DESCRIPTION +.Nm +is a post processing tool that can be used on +.Xr stardis 1 +Green functions +.Pq a.k.a propagators , +as contained in binary files. +The main functionality is to apply different boundary conditions to a +system once solved by +.Xr stardis 1 +in Green mode +.Pq Fl G No option of Xr stardis 1 . +The provided file should comply with the +.Xr sgreen-input 5 +format. +.Pp +Using this Green function approach, when possible, produces the very +same results as a full Monte Carlo computation, but only requires a +fraction of the computation time. +.Pp +The propagator is of great value to thermal engineers as it gives some +crucial information to analyse heat transfers in the system. +It helps engineers answer questions like +.Dq Where from does the heat come at this location? . +Propagators seamlessly agregate all the provided geometrical and +physical information on the system in an unbiased and very-fast +statistical model. +.Pp +.Nm +also offers an additional feature: summarizing information on a Green +function in HTML format to help understand what's important in the +simulated system. +.Pp +The options are as follows: +.Bl -tag -width Ds +.It Fl a Pa arguments +Apply a Green function using the arguments listed in the +.Pa arguments +file. +Can only be applied in conjunction with option +.Fl g . +.It Fl e +Use extended format to output Monte Carlo results. +Can only be used in conjunction with option +.Fl a . +.It Fl g Pa green +Read a Green function from a file for further processing. +.It Fl h +Output short help and exit. +.It Fl s Pa summary +Create a summary of a Green function and write it to a file in HTML +format. +Can only be applied in conjunction with option +.Fl g . +.It Fl t Ar threads_count +Advice on the number of threads to use. +By default, +.Nm +uses as many threads as processor cores. +.It Fl V Ar verbosity_level +Set the verbosity level. +Possible values are +.Li 0 Pq no message , +.Li 1 Pq error messages only , +.Li 2 error and warning messages , +All the messages are written to standard error. +Default is @GREEN_ARGS_DEFAULT_VERBOSE_LEVEL@. +.It Fl v +Output version information and exit. +.El +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh EXIT STATUS +.Ex -std +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh EXAMPLES +Create a summary of the +.Pa heatsink.green +Green function and write it in the +.Pa heatsink_green.html +file: +.Bd -literal -offset Ds +sgreen -g heatsink.green -s heatsink_green.html +.Ed +.Pp +Apply the settings from the file +.Pa cube_settings.txt +to the +.Pa cube.green +Green function and output the corresponding Monte Carlo results to +stdout in extended format. +Set verbosity level to 2: +.Bd -literal -offset Ds +sgreen -g cube.green -a cube_settings.txt -e -V 2 +.Ed +.Pp +Create a summary of the +.Pa heatsink.green +Green function and write it in the +.Pa heatsink_green.html +file; also apply the settings from the file +.Pa heatsink_settings.txt +and output the corresponding Monte Carlo results to standard output in +compact format: +.Bd -literal -offset Ds +sgreen -g heatsink.green \\ + -s heatsink_green.html \\ + -a heatsink_settings.txt +.Ed +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.Sh SEE ALSO +.Xr stardis 1 , +.Xr sgreen-input 5 , +.Xr sgreen-output 5 diff --git a/doc/sgreen.1.txt.in b/doc/sgreen.1.txt.in @@ -1,117 +0,0 @@ -// Copyright (C) 2020-2022 |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/>. - -:toc: - -sgreen(1) -========= - -NAME ----- -sgreen - postprocessing of Green functions - -SYNOPSIS --------- -[verse] -*sgreen* [_option_] - -DESCRIPTION ------------ -*sgreen* is a post processing tool that can be used on *stardis*(1) Green -functions (a.k.a propagators), as contained in binary files. The main -functionality is to apply different boundary conditions to a system once solved -by *stardis*(1) in Green mode (*-G* option of *stardis*(1)). The provided file -should comply with the *sgreen-input*(5) format, that is also the -*stardis-output*(1) format in binary Green mode. - -Using this Green function approach, when possible, produces the very same -results as a full Monte-Carlo computation, but only requires a fraction of the -computation time. - -The propagator is of great value to thermal engineers as it gives some -crucial information to analyse heat transfers in the system. It helps engineers -answer questions like _"Where from does the heat come at this location?"_. -Propagators seamlessly agregate all the provided geometrical and physical -information on the system in an unbiased and very-fast statistical model. - -*sgreen*(1) also provides an additional functionality: summarize information on -a Green function in HTML format to help understand what matters on the -simulated system. - -OPTIONS -------- -*-a* _FILE_NAME_:: - Apply a Green function using the variable settings read from a file. Can only - be applied in conjunction with option *-g*. - -*-e*:: - Use extended format to output Monte-Carlo results. Can only be used in - conjunction with option *-a*. - -*-g* _GREEN_BINARY_FILE_:: - Read a Green function from a file for further processing. - -*-h*:: - Output short help and exit. - -*-s* _FILE_NAME_:: - Create a summary of a Green function and write it to a file in HTML format. - Can only be applied in conjunction with option *-g*. - -*-t* _threads-count_:: - Hint on the number of threads to use. By default use as many threads as CPU - cores. - -*-v*:: - Output version information and exit. - -*-V* _level_:: - Set the verbosity level. Possible values are *0* (no message), *1* (error - messages only), *2* (error and warning messages), and *3* (error, warning - and informative messages). All the messages are written to _standard error_. - Default verbosity *level* is @GREEN_ARGS_DEFAULT_VERBOSE_LEVEL@. - -EXAMPLES --------- -Create a summary of the *heatsink.green* Green function and write it in the -*heatsink_green.html* file: - - $ sgreen -g heatsink.green -s heatsink_green.html - -Apply the settings from the file *cube_settings.txt* to the *cube.green* Green -function and output the corresponding Monte-Carlo results to stdout in extended -format. Set verbosity level to 2. - - $ sgreen -g cube.green -a cube_settings.txt -e -V 2 - -Create a summary of the *heatsink.green* Green function and write it in the -*heatsink_green.html* file; also apply the settings from the file -*heatsink_settings.txt* and output the corresponding Monte-Carlo results to -stdout in compact format. - - $ sgreen -g heatsink.green -s heatsink_green.html -a heatsink_settings.txt - -COPYRIGHT ---------- -Copyright &copy; 2020 |Meso|Star>. License GPLv3+: GNU GPL -version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software. -You are free to change and redistribute it. There is NO WARRANTY, to the extent -permitted by law. - -SEE ALSO --------- -*sgreen-input*(5), -*sgreen-output*(5), -*stardis*(1)