cngf-pf

continuum model for granular flows with pore-pressure dynamics (renamed from 1d_fd_simple_shear)
git clone git://src.adamsgaard.dk/cngf-pf # fast
git clone https://src.adamsgaard.dk/cngf-pf.git # slow
Log | Files | Refs | README | LICENSE Back to index

Makefile (6015B)


      1 BIN = ../cngf-pf
      2 BIN2 = ../max_depth_simple_shear
      3 BIN3 = ../shear_flux
      4 
      5 TESTS = cngf_pf_dry \
      6         cngf_pf_dry_norm \
      7         cngf_pf_dry_cohesive \
      8 		cngf_pf_dry_vconst \
      9         cngf_pf_wet \
     10         cngf_pf_wet_norm \
     11         cngf_pf_wet_vari \
     12         cngf_pf_wet_vari_diff \
     13         cngf_pf_wet_vari_pulse \
     14         cngf_pf_wet_vari_pulse_vlim \
     15 		shear_flux_dry \
     16 		shear_flux_wet
     17 
     18 # Skipped tests:
     19 # - cngf_pf_dry_trans, cngf_pf_dry_trans_undercons, cngf_pf_dry_trans_overcons:
     20 #   Transient mode broken after inertia fix (commit 91d9022)
     21 # - max_depth_misc: test config uses removed -O option
     22 
     23 STANDARDS := $(TESTS:=.std)
     24 
     25 CNGF_PF_DRY_OPTS =          -o 0.03 -L 0.64 -n 40e3
     26 CNGF_PF_DRY_NORM_OPTS =     -o 0.03 -L 0.64 -n 40e3 -N
     27 CNGF_PF_DRY_COHESIVE_OPTS = -o 0.03 -L 0.64 -n 40e3 -c 1e3
     28 CNGF_PF_DRY_VCONST_OPTS =   -s 1e-3
     29 CNGF_PF_WET_OPTS =          -o 0.03 -L 0.64 -n 40e3 -F
     30 CNGF_PF_WET_NORM_OPTS =     -o 0.03 -L 0.64 -n 40e3 -F -N
     31 CNGF_PF_WET_VARI_OPTS =     -L 8.0 \
     32                             -n 150e3 \
     33                             -F -k 2e-17 \
     34                             -O 50e3 \
     35                             -a 50e3 \
     36                             -q $$( echo "1.0/(3600*24)" | bc -l ) \
     37                             -I $$( echo "60*1000" | bc -l ) \
     38                             -e $$( echo "60*20" | bc -l )
     39 CNGF_PF_WET_VARI_DIFF_OPTS =-L 8.0 \
     40                             -n 150e3 \
     41                             -F -D $$(awk 'BEGIN{print 2e-17/(1.787e-3*(1e-8 + 0.25*3.9e-10))}') \
     42                             -O 50e3 \
     43                             -a 50e3 \
     44                             -q $$( echo "1.0/(3600*24)" | bc -l ) \
     45                             -I $$( echo "60*1000" | bc -l ) \
     46                             -e $$( echo "60*20" | bc -l )
     47 CNGF_PF_WET_VARI_PULSE_OPTS = $(CNGF_PF_WET_VARI_OPTS) \
     48                               -u 500
     49 CNGF_PF_WET_VARI_PULSE_VLIM_OPTS = $(CNGF_PF_WET_VARI_OPTS) \
     50                                    -u 500 -l 1e-3
     51 CNGF_PF_DRY_TRANS_OPTS = -T -e 5.0
     52 CNGF_PF_DRY_TRANS_UNDERCONS_OPTS = -T -e 100.0 -I 1.0 -s 0.01 -p 0.25 trans_undercons >/dev/null && \
     53                                    for f in trans_undercons.output*.txt; do tail -n 1 "$$f"; done
     54 CNGF_PF_DRY_TRANS_OVERCONS_OPTS = -T -e 100.0 -I 1.0 -s 0.01 -p 0.15 trans_overcons >/dev/null && \
     55                                   for f in trans_overcons.output*.txt; do tail -n 1 "$$f"; done
     56 
     57 MAX_DEPTH_MISC = sh -c 'for A_f in 1e3 5e3 10e3 50e3 100e3; \
     58                         	do ./$(BIN2) -O 101e3 -a $$A_f -q 0.01;\
     59                         	./$(BIN2) -O 101e3 -a $$A_f -q 0.001;\
     60                         	./$(BIN2) -O 101e3 -a $$A_f -q 0.0001; done'
     61 
     62 test: $(TESTS)
     63 
     64 standards: $(STANDARDS)
     65 
     66 cngf_pf_dry: $(BIN)
     67 	./$(BIN) $(CNGF_PF_DRY_OPTS) | diff $@.std -
     68 
     69 cngf_pf_dry_norm: $(BIN)
     70 	./$(BIN) $(CNGF_PF_DRY_NORM_OPTS) | diff $@.std -
     71 
     72 cngf_pf_dry_cohesive: $(BIN)
     73 	./$(BIN) $(CNGF_PF_DRY_COHESIVE_OPTS) | diff $@.std -
     74 
     75 cngf_pf_dry_vconst: $(BIN)
     76 	./$(BIN) $(CNGF_PF_DRY_VCONST_OPTS) | diff $@.std -
     77 
     78 cngf_pf_wet: $(BIN)
     79 	./$(BIN) $(CNGF_PF_WET_OPTS) | diff $@.std -
     80 
     81 cngf_pf_wet_norm: $(BIN)
     82 	./$(BIN) $(CNGF_PF_WET_NORM_OPTS) | diff $@.std -
     83 
     84 cngf_pf_wet_vari: $(BIN)
     85 	./$(BIN) $(CNGF_PF_WET_VARI_OPTS) | diff $@.std -
     86 
     87 cngf_pf_wet_vari_diff: $(BIN)
     88 	./$(BIN) $(CNGF_PF_WET_VARI_DIFF_OPTS) | diff $@.std -
     89 
     90 cngf_pf_wet_vari_pulse: $(BIN)
     91 	./$(BIN) $(CNGF_PF_WET_VARI_PULSE_OPTS) | diff $@.std -
     92 
     93 cngf_pf_wet_vari_pulse_vlim: $(BIN)
     94 	./$(BIN) $(CNGF_PF_WET_VARI_PULSE_VLIM_OPTS) | diff $@.std -
     95 
     96 cngf_pf_dry_transient: $(BIN)
     97 	./$(BIN) $(CNGF_PF_DRY_TRANS_OPTS) | diff $@.std -
     98 
     99 cngf_pf_dry_trans_undercons: $(BIN)
    100 	./$(BIN) $(CNGF_PF_DRY_TRANS_UNDERCONS_OPTS) | diff $@.std -
    101 
    102 cngf_pf_dry_trans_overcons: $(BIN)
    103 	./$(BIN) $(CNGF_PF_DRY_TRANS_OVERCONS_OPTS) | diff $@.std -
    104 
    105 max_depth_misc: $(BIN2)
    106 	$(MAX_DEPTH_MISC) | diff $@.std -
    107 
    108 shear_flux_dry: $(BIN) $(BIN3)
    109 	./$(BIN) $(CNGF_PF_DRY_OPTS) | ./$(BIN3) | diff $@.std -
    110 
    111 shear_flux_wet: $(BIN)
    112 	./$(BIN) $(CNGF_PF_WET_OPTS) | ./$(BIN3) | diff $@.std -
    113 
    114 
    115 cngf_pf_dry.std: $(BIN)
    116 	./$(BIN) $(CNGF_PF_DRY_OPTS) > $@
    117 
    118 cngf_pf_dry_norm.std: $(BIN)
    119 	./$(BIN) $(CNGF_PF_DRY_NORM_OPTS) > $@
    120 
    121 cngf_pf_dry_cohesive.std: $(BIN)
    122 	./$(BIN) $(CNGF_PF_DRY_COHESIVE_OPTS) > $@
    123 
    124 cngf_pf_dry_vconst.std: $(BIN)
    125 	./$(BIN) $(CNGF_PF_DRY_VCONST_OPTS) > $@
    126 
    127 cngf_pf_wet.std: $(BIN)
    128 	./$(BIN) $(CNGF_PF_WET_OPTS) > $@
    129 
    130 cngf_pf_wet_norm.std: $(BIN)
    131 	./$(BIN) $(CNGF_PF_WET_NORM_OPTS) > $@
    132 
    133 cngf_pf_wet_vari.std: $(BIN)
    134 	./$(BIN) $(CNGF_PF_WET_VARI_OPTS) > $@
    135 
    136 cngf_pf_wet_vari_diff.std: $(BIN)
    137 	./$(BIN) $(CNGF_PF_WET_VARI_DIFF_OPTS) > $@
    138 
    139 cngf_pf_wet_vari_pulse.std: $(BIN)
    140 	./$(BIN) $(CNGF_PF_WET_VARI_PULSE_OPTS) > $@
    141 
    142 cngf_pf_wet_vari_pulse_vlim.std: $(BIN)
    143 	./$(BIN) $(CNGF_PF_WET_VARI_PULSE_VLIM_OPTS) > $@
    144 
    145 cngf_pf_dry_transient.std: $(BIN)
    146 	./$(BIN) $(CNGF_PF_DRY_TRANS_OPTS) > $@
    147 
    148 cngf_pf_dry_trans_undercons.std: $(BIN)
    149 	./$(BIN) $(CNGF_PF_DRY_TRANS_UNDERCONS_OPTS) > $@
    150 
    151 cngf_pf_dry_trans_overcons.std: $(BIN)
    152 	./$(BIN) $(CNGF_PF_DRY_TRANS_OVERCONS_OPTS) > $@
    153 
    154 max_depth_misc.std: $(BIN2)
    155 	$(MAX_DEPTH_MISC) > $@
    156 
    157 shear_flux_dry.std: $(BIN) $(BIN3)
    158 	./$(BIN) $(CNGF_PF_DRY_OPTS) | ./$(BIN3) > $@
    159 
    160 shear_flux_wet.std: $(BIN) $(BIN3)
    161 	./$(BIN) $(CNGF_PF_WET_OPTS) | ./$(BIN3) > $@
    162 
    163 $(BIN):
    164 	make -C ..
    165 
    166 clean:
    167 	rm -f *.txt
    168 
    169 # Benchmark configurations for performance/stability testing
    170 # These are more intensive than the regression tests
    171 BENCH_DRY_SMALL = -o 0.03 -L 0.64 -n 40e3
    172 BENCH_DRY_LARGE = -L 10.0 -n 200e3 -e 10.0
    173 BENCH_WET_SMALL = -o 0.03 -L 0.64 -n 40e3 -F
    174 BENCH_WET_LARGE = -L 8.0 -n 150e3 -F -k 2e-17 -O 50e3 -a 50e3 -q 0.0000115741 -e 3600
    175 
    176 bench_dry_small:
    177 	./$(BIN) -B $(BENCH_DRY_SMALL) 2>&1
    178 
    179 bench_dry_large:
    180 	./$(BIN) -B $(BENCH_DRY_LARGE) 2>&1
    181 
    182 bench_wet_small:
    183 	./$(BIN) -B $(BENCH_WET_SMALL) 2>&1
    184 
    185 bench_wet_large:
    186 	./$(BIN) -B $(BENCH_WET_LARGE) 2>&1
    187 
    188 bench: bench_dry_small bench_dry_large bench_wet_small bench_wet_large
    189 
    190 .PHONY: $(TESTS) test standards clean bench bench_dry_small bench_dry_large bench_wet_small bench_wet_large