tRemove unused figures and update main Makefile after POSIX standards - cngf-pf-exp1 - experiments for first paper with continuum granular model
 (HTM) git clone git://src.adamsgaard.dk/manus_continuum_granular1_exp
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit efc11cbdf7cfe37f81783b757c4b9d36fa1240a5
 (DIR) parent cb0485bdeff60c9ad6c721d5d8f3c1f90ab2ab77
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Thu, 21 Nov 2019 15:16:32 +0100
       
       Remove unused figures and update main Makefile after POSIX standards
       
       Diffstat:
         M Makefile                            |      49 ++++++++++++++++++++++++-------
         M fig-stick_slip_rate/Makefile        |       1 +
         D kf-ratio-fig4b/Makefile             |      55 -------------------------------
         D kf-ratio-fig4b/fig.gp               |      44 -------------------------------
         D p_f_analytical.jl                   |      27 ---------------------------
         D rate-limited-fig4/Makefile          |      51 -------------------------------
         D rate-limited-fig4/fig.gp            |      36 -------------------------------
         D resolution-comparison/BlueSeq.plt   |      26 --------------------------
         D resolution-comparison/Makefile      |      42 -------------------------------
         D resolution-comparison/fig.gp        |      42 -------------------------------
       
       10 files changed, 39 insertions(+), 334 deletions(-)
       ---
 (DIR) diff --git a/Makefile b/Makefile
       t@@ -1,11 +1,44 @@
        REPO = 1d_fd_simple_shear
       -FIGDIRS := $(filter-out ./, $(sort $(dir $(wildcard ./fig*/))))
       -FIGURES := $(addsuffix .pdf,$(FIGDIRS:/=))
       +FIGDIRS != find . -type d -maxdepth 1 -name 'fig-*' | sed 's/\.\///'
       +FIGURES = $(FIGDIRS:=.pdf)
        
        default: $(FIGURES)
        
       -fig%.pdf: fig% fig%/Makefile fig%/*.gp $(REPO)/$(REPO)
       -        make -C $<
       +fig-rate_dependence.pdf: $(@:.pdf=)/Makefile $(REPO)/$(REPO)
       +        make -C $(@:.pdf=)
       +
       +fig-hysteresis_rate.pdf: $(@:.pdf=)/Makefile $(REPO)/$(REPO)
       +        make -C $(@:.pdf=)
       +
       +fig-hysteresis_stress.pdf: $(@:.pdf=)/Makefile $(REPO)/$(REPO)
       +        make -C $(@:.pdf=)
       +
       +fig-parameter_test.pdf: $(@:.pdf=)/Makefile $(REPO)/$(REPO)
       +        make -C $(@:.pdf=)
       +
       +fig-pulse_square.pdf: $(@:.pdf=)/Makefile $(REPO)/$(REPO)
       +        make -C $(@:.pdf=)
       +
       +fig-pulse_triangle.pdf: $(@:.pdf=)/Makefile $(REPO)/$(REPO)
       +        make -C $(@:.pdf=)
       +
       +fig-skin_depth.pdf: $(@:.pdf=)/Makefile $(REPO)/$(REPO)
       +        make -C $(@:.pdf=)
       +
       +fig-stick_slip_rate.pdf: $(@:.pdf=)/Makefile $(REPO)/$(REPO)
       +        make -C $(@:.pdf=)
       +
       +fig-stick_slip_rate_depth.pdf: $(@:.pdf=)/Makefile $(REPO)/$(REPO)
       +        make -C $(@:.pdf=)
       +
       +fig-stick_slip_stress.pdf: $(@:.pdf=)/Makefile $(REPO)/$(REPO)
       +        make -C $(@:.pdf=)
       +
       +fig-strain_distribution.pdf: $(@:.pdf=)/Makefile $(REPO)/$(REPO)
       +        make -C $(@:.pdf=)
       +
       +fig-mohr_coulomb.pdf: $(@:.pdf=)/Makefile $(REPO)/$(REPO)
       +        make -C $(@:.pdf=)
        
        $(REPO)/$(REPO): $(REPO)/Makefile
                make -C $(REPO)
       t@@ -15,12 +48,6 @@ $(REPO)/Makefile:
        
        clean:
                make -C $(REPO)/ clean
       -        make -C fig1/ clean
       -        make -C fig2/ clean
       -        make -C fig3/ clean
       -        make -C fig4/ clean
       -        $(RM) fig*.pdf
       -
       -print-%  : ; @echo $* = $($*)
       +        rm -f fig*.pdf
        
        .PHONY: default figures clean
 (DIR) diff --git a/fig-stick_slip_rate/Makefile b/fig-stick_slip_rate/Makefile
       t@@ -10,6 +10,7 @@ sim.output00000.txt: $(BIN)
                ./$(BIN) --length 8.0 \
                --normal-stress 200e3 \
                --set-shear-velocity $$( echo "1000/(365*24*60*60)" | bc -l ) \
       +        --grain-size 1e-3 \
                --fluid \
                --fluid-permeability 2e-17 \
                --fluid-pressure-top 100e3 \
 (DIR) diff --git a/kf-ratio-fig4b/Makefile b/kf-ratio-fig4b/Makefile
       t@@ -1,55 +0,0 @@
       -BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
       -FIG = $(shell basename $(CURDIR))
       -
       -FACTOR=0.1
       -
       -default: ../$(FIG)-$(FACTOR).pdf
       -
       -#        --stress-ratio 0.40 \
       -
       -sim-$(FACTOR).output00000.txt: $(BIN)
       -        ./$< --length 8.0 \
       -        --normal-stress 200e3 \
       -        --set-shear-velocity $$( awk 'BEGIN { print 1000/(365*24*60*60) }') \
       -        --fluid \
       -        --fluid-permeability $$( awk 'BEGIN { print 2e-17*$(FACTOR) }') \
       -        --fluid-pressure-top 100e3 \
       -        --fluid-pressure-ampl 80e3 \
       -        --fluid-pressure-freq $$( awk 'BEGIN { print $(FACTOR)*1.0/(3600*24) }') \
       -        --file-interval $$( awk 'BEGIN { print 60*10/$(FACTOR) }') \
       -        --time-end $$( awk 'BEGIN { print 3600*24*7/$(FACTOR) }') sim-$(FACTOR)
       -
       -timeseries-$(FACTOR).txt: sim-$(FACTOR).output00000.txt
       -        /bin/sh -c '\
       -        rm -f $@; \
       -        for f in sim-$(FACTOR).output*.txt; do \
       -                tail -n 1 "$$f" | cut -f2- >> $@; \
       -        done'
       -
       -max_strainrate_depth-$(FACTOR).txt: sim-$(FACTOR).output00000.txt
       -        /bin/sh -c '\
       -        rm -f $@; \
       -        for f in sim-$(FACTOR).output*.txt; do \
       -                awk " \
       -                        BEGIN{getline; depth=8.0; max=0.0} \
       -                        NF{ \
       -                                if (\$$6 >= max && \$$6+0 > 1e-300) \
       -                                { \
       -                                        max=\$$6; \
       -                                        depth=\$$1; \
       -                                } \
       -                        } \
       -                        END{ \
       -                                print depth,\"\t\",max \
       -                        }" \
       -                        "$$f" >> $@; \
       -        done'
       -
       -../$(FIG)-$(FACTOR).pdf: fig.gp timeseries-$(FACTOR).txt max_strainrate_depth-$(FACTOR).txt
       -        gnuplot -e "factor='$(FACTOR)'" $< > $@
       -
       -clean:
       -        $(RM) *.txt
       -        $(RM) ../$(FIG)-$(FACTOR).pdf
       -
       -.PHONY: default clean
 (DIR) diff --git a/kf-ratio-fig4b/fig.gp b/kf-ratio-fig4b/fig.gp
       t@@ -1,44 +0,0 @@
       -#!/usr/bin/env gnuplot
       -reset
       -
       -set terminal pdfcairo color size 7.5 cm, 8.5 cm
       -
       -set multiplot layout 3,1 \
       -        margins 0.19,0.80,0.23,0.95 \
       -        spacing 0.03,0.03
       -
       -set key top right samplen 1.0
       -unset xlabel
       -unset xtics
       -set yrange [0:320]
       -set ylabel "[kPa]"
       -set ytics 100
       -plot \
       -"timeseries-".factor.".txt" u ($0/1008*7*factor):($2/1000) w l lw 2 lc "black" t "effective normal stress", \
       -"" u ($0/1008*7*factor):($3/1000) w l lw 2 lt 3 dt "-" t "water pressure"
       -
       -unset xtics
       -unset ylabel
       -unset ytics
       -#set ytics 0.1
       -#set yrange [0:1]
       -#set y2range [0:1]
       -#set y2tics 0.2
       -#set y2label "Effective friction [-]"
       -#plot "" u ($0/1008*7):($4) w l lw 2 lt 7 t ""
       -set yrange [0:80]
       -set y2range [0:80]
       -set y2tics 20
       -set y2label "Shear stress [kPa]"
       -plot "" u ($0/1008*7*factor):($4*$2/1000) w l lw 2 lt 1 t ""
       -
       -set xtics
       -unset y2label
       -unset y2tics
       -set ytics 0.5
       -set yrange [2.5:0.0]
       -set xlabel "Time [d]"
       -set ylabel "Depth of max. strain rate [m]"
       -plot "max_strainrate_depth-".factor.".txt" u ($0/1008*7*factor):(8.0 - $1) w l lw 2 lt 4 t ""
       -
       -unset multiplot
 (DIR) diff --git a/p_f_analytical.jl b/p_f_analytical.jl
       t@@ -1,27 +0,0 @@
       -#!/usr/bin/env julia
       -import PyPlot
       -
       -n = 200                         # resolution
       -z = range(0, stop=8, length=n)  # spatial grid
       -k = 2e-17                       # permeability
       -ϕ = 0.25                        # porosity
       -μ_f = 1e-3                      # water viscosity
       -β_f = 4.5e-10                   # water compressibility
       -κ = k/(ϕ*μ_f*β_f)               # diffusivity
       -ω = 2*π*1/(3600*24)             # diurnal circular frequency
       -
       -# T is water pressure in kPa
       -T0 = 50                         # initial pressure
       -ΔT = 50                         # pressure perturbation amplitude
       -
       -# Turcotte and Schubert, eq. 4.89
       -T_(z,t) = T0 .+ ΔT.*exp.(-z.*sqrt(ω/(2κ))).*cos.(ω*t .- z.*sqrt(ω/(2κ)))
       -
       -# plot hourly curves for a full day
       -for t=0:3600:24*3600
       -        PyPlot.plot(reverse(T_(z,t)), z)
       -end
       -
       -PyPlot.xlabel("Water pressure [kPa]")
       -PyPlot.ylabel("Vertical position [m]")
       -PyPlot.savefig("p_f_analytical.pdf")
 (DIR) diff --git a/rate-limited-fig4/Makefile b/rate-limited-fig4/Makefile
       t@@ -1,51 +0,0 @@
       -BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
       -FIG = $(shell basename $(CURDIR))
       -
       -default: ../$(FIG).pdf
       -
       -#        --stress-ratio 0.40 \
       -
       -sim.output00000.txt: $(BIN)
       -        /bin/sh -c '\
       -        ./$< --length 8.0 --normal-stress 150e3 \
       -        --limit-shear-velocity $$( echo "3000/(365*24*60*60)" | bc -l ) \
       -        --fluid --fluid-permeability 2e-17 --fluid-pressure-top 50e3 \
       -        --fluid-pressure-ampl 50e3 \
       -        --fluid-pressure-freq $$( echo "1.0/(3600*24)" | bc -l ) \
       -        --file-interval $$( echo "60*10" | bc -l ) \
       -        --time-end $$( echo "3600*24*7" | bc -l ) sim'
       -
       -timeseries.txt: sim.output00000.txt
       -        /bin/sh -c '\
       -        rm -f $@; \
       -        for f in sim.output*.txt; do \
       -                tail -n 1 "$$f" | cut -f2- >> $@; \
       -        done'
       -
       -max_strainrate_depth.txt: sim.output00000.txt
       -        /bin/sh -c '\
       -        rm -f $@; \
       -        for f in sim.output*.txt; do \
       -                awk " \
       -                        BEGIN{getline; depth=8.0; max=0.0} \
       -                        NF{ \
       -                                if (\$$6 >= max && \$$6+0 > 1e-300) \
       -                                { \
       -                                        max=\$$6; \
       -                                        depth=\$$1; \
       -                                } \
       -                        } \
       -                        END{ \
       -                                print depth,\"\t\",max \
       -                        }" \
       -                        "$$f" >> $@; \
       -        done'
       -
       -../$(FIG).pdf: fig.gp timeseries.txt max_strainrate_depth.txt
       -        gnuplot $< > $@
       -
       -clean:
       -        $(RM) *.txt
       -        $(RM) ../$(FIG).pdf
       -
       -.PHONY: default clean
 (DIR) diff --git a/rate-limited-fig4/fig.gp b/rate-limited-fig4/fig.gp
       t@@ -1,36 +0,0 @@
       -#!/usr/bin/env gnuplot
       -reset
       -
       -set terminal pdfcairo color size 7.5 cm, 8.5 cm
       -
       -set multiplot layout 3,1 \
       -        margins 0.19,0.85,0.23,0.95 \
       -        spacing 0.03,0.03
       -
       -unset xlabel
       -unset xtics
       -set yrange [0:270]
       -set ylabel "[kPa]"
       -plot \
       -"timeseries.txt" u ($0/1008*7):($2/1000) w l lw 2 lc "black" t "effective normal stress", \
       -"" u ($0/1008*7):($3/1000) w l lw 2 lt 3 dt "-" t "water pressure"
       -
       -unset xtics
       -unset ylabel
       -#unset ytics
       -set yrange [0:0.01]
       -set y2range [0:0.01]
       -#set y2tics 0.002
       -set y2label "Shear velocity [km/d]"
       -plot "" u ($0/1008*7):($1*60*60*24/1000) w l lw 2 lt 7 t ""
       -
       -set xtics
       -unset y2label
       -unset y2tics
       -set ytics 0.25
       -set yrange [1.5:0.0]
       -set xlabel "Time [d]"
       -set ylabel "Depth of max. strain rate [m]"
       -plot "max_strainrate_depth.txt" u ($0/1008*7):(8.0 - $1) w l lw 2 lt 4 t ""
       -
       -unset multiplot
 (DIR) diff --git a/resolution-comparison/BlueSeq.plt b/resolution-comparison/BlueSeq.plt
       t@@ -1,26 +0,0 @@
       -# line styles for ColorBrewer Blues
       -# for use with sequential data
       -# provides 8 blue colors of increasing saturation
       -# compatible with gnuplot >=4.2
       -# derived from Anna Schneider
       -
       -# line styles
       -
       -set style line 1 lc rgb '#084594' # dark blue
       -set style line 2 lc rgb '#2171B5' #
       -set style line 3 lc rgb '#4292C6' # medium blue
       -set style line 4 lc rgb '#6BAED6' # 
       -set style line 5 lc rgb '#9ECAE1' # light blue
       -set style line 6 lc rgb '#C6DBEF' # 
       -set style line 7 lc rgb '#DEEBF7' # 
       -set style line 8 lc rgb '#F7FBFF' # very light blue
       -
       -# palette
       -set palette defined ( 0 '#084594',\
       -    1 '#2171B5',\
       -    2 '#4292C6',\
       -    3 '#6BAED6',\
       -    4 '#9ECAE1',\
       -    5 '#C6DBEF',\
       -    6 '#DEEBF7',\
       -    7 '#F7FBFF')
 (DIR) diff --git a/resolution-comparison/Makefile b/resolution-comparison/Makefile
       t@@ -1,42 +0,0 @@
       -BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
       -FIG := $(shell basename $(CURDIR))
       -
       -# default parameter values
       -LENGTH = 1.0
       -NORMAL_STRESS = 100e3
       -SHEAR_VEL := $(shell echo '300/(365*24*60*60)' | bc -l)
       -DIAMETER = 1e-3
       -COHESION = 0.0
       -AMPL = 0.4
       -BRATE = 0.9
       -MU_S = 0.4
       -
       -default: ../$(FIG).pdf
       -
       -d_dz.txt: $(BIN)
       -        /bin/sh -c '\
       -        rm -rf $@; \
       -        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 \
       -                printf "$$nz\t" >> $@; \
       -                ./$< \
       -                        --resolution $$nz \
       -                        --length $(LENGTH) \
       -                        --set-shear-velocity $(SHEAR_VEL) \
       -                        --normal-stress $(NORMAL_STRESS) \
       -                        --cohesion $(COHESION) \
       -                        --nonlocal-amplitude $(AMPL) \
       -                        --rate-dependence $(BRATE) \
       -                        --friction-coefficient $(MU_S) \
       -                        --grain-size $(DIAMETER) \
       -                        d_dz.$$nz \
       -                        | tail -n 1 | cut -f4 >> $@; \
       -        done'
       -
       -../$(FIG).pdf: fig.gp d_dz.txt
       -        gnuplot $< > $@
       -
       -clean:
       -        $(RM) *.txt
       -        $(RM) ../$(FIG).pdf
       -
       -.PHONY: default clean
 (DIR) diff --git a/resolution-comparison/fig.gp b/resolution-comparison/fig.gp
       t@@ -1,42 +0,0 @@
       -#!/usr/bin/env gnuplot
       -
       -reset
       -
       -#set terminal pdfcairo color size 7.5 cm, 5.0 cm
       -set terminal pdfcairo enhanced color size 7.5 cm, 7.5 cm
       -set multiplot layout 2,1 \
       -        #margins 0.09,0.97,0.09,0.97 \
       -        #spacing 0.05,0.08
       -
       -load 'BlueSeq.plt'
       -
       -set xrange [0:300]
       -set yrange [0:1]
       -
       -set key bottom right font ",10" samplen 2.0
       -
       -set xlabel "Shear velocity [m/a]"
       -set ylabel "Vertical position [m]"
       -
       -plot \
       -        "d_dz.4.output00000.txt"    u ($2*365.25*24*60*60):1 w l ls 1 lw 1 t "nz = 4", \
       -        "d_dz.8.output00000.txt"    u ($2*365.25*24*60*60):1 w l ls 2 lw 1 t "nz = 8", \
       -        "d_dz.32.output00000.txt"   u ($2*365.25*24*60*60):1 w l ls 3 lw 1 t "nz = 32", \
       -        "d_dz.128.output00000.txt"  u ($2*365.25*24*60*60):1 w l ls 4 lw 1 t "nz = 128", \
       -        "d_dz.512.output00000.txt"  u ($2*365.25*24*60*60):1 w l ls 5 lw 1 t "nz = 512", \
       -        "d_dz.1024.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 6 lw 1 t "nz = 1024"
       -
       -unset xrange
       -unset yrange
       -
       -#set yrange [0.3:0.5]
       -
       -set ylabel "Bulk friction, {/Symbol m} [-]"
       -
       -#set xrange [1.5:6000]
       -set format x "10^{%T}"
       -set xlabel "Grain size to cell size, d/dz [-]"
       -set logscale x
       -plot "d_dz.txt" u (1e-3/(1.0/$1)):2 w lp t ""
       -unset logscale x
       -unset format x