solstice-pp

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

Makefile (1591B)


      1 # Copyright (C) 2017, 2018, 2025 |Méso|Star>
      2 #
      3 # This program is free software: you can redistribute it and/or modify
      4 # it under the terms of the GNU General Public License as published by
      5 # the Free Software Foundation, either version 3 of the License, or
      6 # (at your option) any later version.
      7 #
      8 # This program is distributed in the hope that it will be useful,
      9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
     10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     11 # GNU General Public License for more details.
     12 #
     13 # You should have received a copy of the GNU General Public License
     14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
     15 
     16 .POSIX:
     17 
     18 include ../config.mk
     19 
     20 NEXPERIMENTS = 1000000
     21 NPATHS = 30
     22 SUN_DIRS = 270,30 160,40
     23 
     24 RCV = themis-rcv.yaml
     25 INPUT = themis.yaml
     26 GEOM = geom
     27 SIMUL = simul
     28 
     29 default: run
     30 
     31 simul: $(INPUT) $(PROG)
     32 	solstice $$(for d in $(SUN_DIRS); do echo -f "-D$${d} "; done) \
     33 		-n$(NEXPERIMENTS) -R$(RCV) -fo $(SIMUL) $(INPUT)
     34 	solstice $$(for d in $(SUN_DIRS); do echo -f "-D$${d} "; done) \
     35 		-g format=obj:split=geometry -fo $(GEOM) $(INPUT)
     36 	../solppraw $(SIMUL)
     37 	../solpp $(GEOM) $(SIMUL)
     38 
     39 paths: $(PROG) $(INPUT)
     40 	solstice $$(for d in $(SUN_DIRS); do echo -f "-D$${d} "; done) \
     41 		-q -n$(NPATHS) -R$(RCV) -p default $(INPUT) | ../solpaths
     42 
     43 run: paths simul
     44 
     45 clean:
     46 	rm -rf themis $(INPUT) $(GEOM) $(SIMUL)
     47 	rm -rf *-miscellaneous.obj
     48 	rm -rf *-paths.vtk
     49 	rm -rf *-primaries.vtk
     50 	rm -rf *-receivers.vtk
     51 	rm -rf *-raw-results.txt
     52 
     53 themis: themis.c
     54 	$(CC) -o $@ $(CFLAGS) themis.c -lm
     55 
     56 $(INPUT): themis
     57 	./themis > $@