Makefile (947B)
1 BIN = ../1d_fd_simple_shear/1d_fd_simple_shear 2 FIG := $(shell basename $(CURDIR)) 3 4 # default parameter values 5 LENGTH = 1.0 6 NORMAL_STRESS = 100e3 7 SHEAR_VEL := $(shell echo '300/(365*24*60*60)' | bc -l) 8 DIAMETER = 1e-3 9 COHESION = 0.0 10 AMPL = 0.4 11 BRATE = 0.9 12 MU_S = 0.4 13 14 default: ../$(FIG).pdf 15 16 d_dz.txt: $(BIN) 17 /bin/sh -c '\ 18 rm -rf $@; \ 19 for nz in 2 3 4 6 8 12 16 24 32 48 64 96 128 192 256 384 512 768 1024 1536 2048 3072 5096 6144 10192 12288 20384; do \ 20 printf "$$nz\t" >> $@; \ 21 ./$< \ 22 --resolution $$nz \ 23 --length $(LENGTH) \ 24 --set-shear-velocity $(SHEAR_VEL) \ 25 --normal-stress $(NORMAL_STRESS) \ 26 --cohesion $(COHESION) \ 27 --nonlocal-amplitude $(AMPL) \ 28 --rate-dependence $(BRATE) \ 29 --friction-coefficient $(MU_S) \ 30 --grain-size $(DIAMETER) \ 31 d_dz.$$nz \ 32 | tail -n 1 | cut -f4 >> $@; \ 33 done' 34 35 ../$(FIG).pdf: fig.gp d_dz.txt 36 gnuplot $< > $@ 37 38 clean: 39 $(RM) *.txt 40 $(RM) ../$(FIG).pdf 41 42 .PHONY: default clean