solstice-pp

Post-processing utilities for the solstice app
git clone git://git.meso-star.com/solstice-pp.git
Log | Files | Refs | README | LICENSE

commit fe5744989655f17071343d01fe5a245d9fb1fee9
parent 0e68e30735a22719c8ac68bfc1fa4d1c23446d47
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri, 20 Jun 2025 13:41:34 +0200

Merge remote-tracking branch 'origin/master'

Diffstat:
MREADME.md | 46+++++++++++++++++++++++++++++++++++++++++++---
Apkg.sh | 86+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 129 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md @@ -1,6 +1,23 @@ # Solstice Post-Process Solstice resuts post-processing tools. +In addition, the code base contains programs that generate input files +for systems to be simulated by Solstice. + +The sources of the post-processing tools are located at the root of the +repository. +Each sub-directory contains the sources of the programs used to generate +the Solstice input files for a specific solar power plant. + +All these programs are written in standard C, with no external +dependencies. +They can therefore be compiled by any C compiler that supports the C99 +standard. +However, to simplify the compilation process on POSIX-compatible +systems, POSIX Makefiles are supplied. +These are used not only to build the programs, but also to run solstice +simulations on the generated input files and to post-process their +results. ## Requirements @@ -25,10 +42,33 @@ To run the test cases : make run +## Release notes + +### Version 0.3.1 + +- Fix VTK files generated by `solpp`: data were written as double while + the type notified in the VTK file was float. + +### Version 0.3 + +- Handle the update of the file formats introduced by Solstice 0.8.1. + +### Version 0.2 + +- Add the `solmaps` post-processing tool that extracts the maps of flux + from the result of a solstice simulation. + Each map is then saved in a specific VTK file. +- Fix the parsing of the per-receiver and per-primary results: the + "back-side" estimations were not parsed. + +### Version 0.1 + +- Handle the update of the file formats introduced by Solstice 0.6 + ## License Copyright (C) 2017, 2018, 2025 |Méso|Star> (contact@meso-star.com) -These programs are free softwares released under GPL v3+ license: GNU -GPL version 3 or later. You are welcome to redistribute them under -certain conditions; refer to the COPYING file for details. +This is free softwares released under GPL v3+ license: GNU GPL version 3 +or later. You are welcome to redistribute them under certain conditions; +refer to the COPYING file for details. diff --git a/pkg.sh b/pkg.sh @@ -0,0 +1,86 @@ +#!/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 + +if [ $# -lt 2 ]; then + echo "Usage: $0 SOLSTICE-PP-PATH VERSION" + exit 1 +fi + +solpp=$1 +version=$2 + + +if [ ! -d $solpp \ + -o ! -f $solpp/Makefile \ + -o ! -f $solpp/Makefile.in ]; then + echo "Invalid SOLSTICE-PP-PATH \"$1\"" + exit 1 +fi + +dir_curr=$(pwd) # Current directory +dir_temp=$(mktemp -d) # Working directory +dir_solpp=Solstice-PP-Sources-$version + +# Create the pkg directory +mkdir $dir_temp/$dir_solpp + +# Define the solpp sources +src=$(cd $solpp; find -maxdepth 1 -name "*.c" -o -name "*.h" | sed 's/\.\///g') + +# Copy the sources and the COPYING file into the pkg directory +cp $solpp/COPYING $dir_temp/$dir_solpp +for i in $src; do + cp $solpp/$i $dir_temp/$dir_solpp +done + +# Generate the Makefile +{ + echo "# Copying and distribution of this file, with or without modification," + echo "# are permitted in any medium without royalty provided the copyright" + echo "# notice and this notice are preserved. This file is offered as-is," + echo "# without any warranty." + echo "" + cat $solpp/Makefile.in | sed -n '/^CFLAGS/p' + echo "SOURCES = $(echo $src | sed 's/[ \t]*[a-z0-9]\+\.h//g')" + echo 'PROG = $(SOURCES:%.c=%)' + echo "" + echo '.PHONY: default all clean' + echo 'default: $(PROG)' + echo "" + echo '$(PROG): %: %.c solpp.h' + echo -e '\t@echo -e "CC $<"; $(CC) -o $@ $(CFLAGS) $<' + echo "" + echo 'clean:' + echo -e '\t@rm $(PROG)' +} > $dir_temp/$dir_solpp/Makefile + +# Generate the README.md file +{ + echo "# Solstice Post-Process" + echo "" + cat $solpp/README.md | sed '/Release notes/,$!d' +} > $dir_temp/$dir_solpp/README.md + +#Make the package +cd $dir_temp +tar czf ${dir_solpp}.tar.gz $dir_solpp +cp ${dir_solpp}.tar.gz $dir_curr + +echo "${dir_solpp}.tar.gz" +