tReuse output between figures based on same experiment - cngf-pf-exp1 - experiments for first paper with continuum granular model
HTML git clone git://src.adamsgaard.dk/manus_continuum_granular1_exp
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit d1b9d1ec765baece10b24833720e58ad9a15364b
DIR parent 55f8e640742d8a52f14f92b55c921229d2ea5918
HTML Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Fri, 13 Dec 2019 09:52:54 +0100
Reuse output between figures based on same experiment
Diffstat:
M Makefile | 6 +++---
M fig-hysteresis_rate/Makefile | 21 +++++----------------
M fig-hysteresis_stress/Makefile | 21 +++++----------------
M fig-stick_slip_rate_depth/Makefile | 17 +++--------------
4 files changed, 16 insertions(+), 49 deletions(-)
---
DIR diff --git a/Makefile b/Makefile
t@@ -7,10 +7,10 @@ default: $(FIGURES)
fig-rate_dependence.pdf: $(REPO)/$(REPO)
(cd $(@:.pdf=) && make)
-fig-hysteresis_rate.pdf: $(REPO)/$(REPO)
+fig-hysteresis_rate.pdf: $(REPO)/$(REPO) fig-stick_slip_rate.pdf
(cd $(@:.pdf=) && make)
-fig-hysteresis_stress.pdf: $(REPO)/$(REPO)
+fig-hysteresis_stress.pdf: $(REPO)/$(REPO) fig-stick_slip_stress.pdf
(cd $(@:.pdf=) && make)
fig-parameter_test.pdf: $(REPO)/$(REPO)
t@@ -31,7 +31,7 @@ fig-skin_depth.pdf: $(REPO)/$(REPO)
fig-stick_slip_rate.pdf: $(REPO)/$(REPO)
(cd $(@:.pdf=) && make)
-fig-stick_slip_rate_depth.pdf: $(REPO)/$(REPO)
+fig-stick_slip_rate_depth.pdf: $(REPO)/$(REPO) fig-stick_slip_rate.pdf
(cd $(@:.pdf=) && make)
fig-stick_slip_stress.pdf: $(REPO)/$(REPO)
DIR diff --git a/fig-hysteresis_rate/Makefile b/fig-hysteresis_rate/Makefile
t@@ -1,29 +1,18 @@
-BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
FIG != basename $(PWD)
default: ../$(FIG).pdf
-sim.output00000.txt: $(BIN)
- /bin/sh -c '\
- ./$(BIN) --length 8.0 \
- --normal-stress 200e3 \
- --set-shear-velocity $$( echo "1000/(365*24*60*60)" | bc -l ) \
- --fluid \
- --fluid-permeability 2e-17 \
- --fluid-pressure-top 100e3 \
- --fluid-pressure-ampl 80e3 \
- --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'
+sim.output00001.txt: ../fig-stick_slip_rate/sim.output00001.txt
+ cp ../fig-stick_slip_rate/sim.output*.txt .
-timeseries.txt: sim.output00000.txt
+timeseries.txt: sim.output00001.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
+max_strainrate_depth.txt: sim.output00001.txt
/bin/sh -c '\
rm -f $@; \
for f in sim.output*.txt; do \
t@@ -42,7 +31,7 @@ max_strainrate_depth.txt: sim.output00000.txt
"$$f" >> $@; \
done'
-sediment_flux.txt: sim.output00000.txt
+sediment_flux.txt: sim.output00001.txt
/bin/sh -c '\
rm -f $@; \
for f in sim.output*.txt; do \
DIR diff --git a/fig-hysteresis_stress/Makefile b/fig-hysteresis_stress/Makefile
t@@ -1,29 +1,18 @@
-BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
FIG != basename $(PWD)
default: ../$(FIG).pdf
-sim.output00000.txt: $(BIN)
- /bin/sh -c '\
- ./$(BIN) --length 8.0 \
- --normal-stress 200e3 \
- --stress-ratio 0.4 \
- --fluid \
- --fluid-permeability 2e-17 \
- --fluid-pressure-top 100e3 \
- --fluid-pressure-ampl 80e3 \
- --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'
+sim.output00001.txt: ../fig-stick_slip_stress/sim.output00001.txt
+ cp ../fig-stick_slip_stress/sim.output*.txt .
-timeseries.txt: sim.output00000.txt
+timeseries.txt: sim.output00001.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
+max_strainrate_depth.txt: sim.output00001.txt
/bin/sh -c '\
rm -f $@; \
for f in sim.output*.txt; do \
t@@ -44,7 +33,7 @@ max_strainrate_depth.txt: sim.output00000.txt
###
-sediment_flux.txt: sim.output00000.txt
+sediment_flux.txt: sim.output00001.txt
/bin/sh -c '\
rm -f $@; \
for f in sim.output*.txt; do \
DIR diff --git a/fig-stick_slip_rate_depth/Makefile b/fig-stick_slip_rate_depth/Makefile
t@@ -1,22 +1,11 @@
-BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
FIG != basename $(PWD)
default: ../$(FIG).pdf
-sim.output00000.txt: $(BIN) Makefile ../skindepth.gp
- ./$(BIN) \
- --length 8.0 \
- --set-shear-velocity $$(echo "1000/(365*24*60*60)" | bc -l) \
- --normal-stress 200e3 \
- --fluid \
- --fluid-permeability 2e-17 \
- --fluid-pressure-top 100e3 \
- --fluid-pressure-ampl 80e3 \
- --fluid-pressure-freq $$(echo "1.0/(3600*24)" | bc -l) \
- --file-interval $$(echo "3600" | bc -l) \
- --time-end $$(echo "3600*24*3 + 3600" | bc -l) sim
+sim.output00001.txt: ../fig-stick_slip_rate/sim.output00001.txt
+ cp ../fig-stick_slip_rate/sim.output*.txt .
-../$(FIG).pdf: fig.gp sim.output00000.txt
+../$(FIG).pdf: fig.gp sim.output00001.txt ../skindepth.gp
gnuplot fig.gp > $@
clean: