v0.14.0
run_paper.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 # Get file name
4 if [ -z ${1+x} ]; then
5  MESHFILE=1dTest.cub
6 else
7  MESHFILE=$1
8 fi
9 
10 # Get config file name
11 if [ -z ${2+x} ]; then
12  CONFIGFILE=paper.cfg
13 else
14  CONFIGFILE=$2
15 fi
16 
17 # Get numbet of processors
18 if [ -z ${3+x} ]; then
19  NBPROCS=4
20 else
21  NBPROCS=$3
22 fi
23 
24 # Get step size
25 if [ -z ${4+x} ]; then
26  DT=0.0001
27 else
28  DT=$4
29 fi
30 
31 # Get final time
32 if [ -z ${5+x} ]; then
33  FT=1.0
34 else
35  FT=$5
36 fi
37 
38 # Get final time
39 if [ -z ${6+x} ]; then
40  ORDER=0
41 else
42  ORDER=$6
43 fi
44 
45 #spack load moab
46 
47 set -x
48 
49 # Partition mesh
50 ../../tools/mofem_part -my_file $MESHFILE -meshsets_config $CONFIGFILE -my_nparts $NBPROCS
51 
52 # Run code
53 rm -f out_*.h5m
54 #make -j 4 unsaturated_transport
55 
56 #mpirun --allow-run-as-root -np $NBPROCS \
57 mpirun -np $NBPROCS ./unsaturated_transport \
58 -my_file out.h5m -configure $CONFIGFILE \
59 -ts_monitor \
60 -ts_type beuler \
61 -ts_dt $DT \
62 -ts_max_time $FT \
63 -ts_monitor \
64 -ts_adapt_always_accept true \
65 -ts_adapt_monitor \
66 -ts_adapt_type none \
67 -ts_adapt_dt_max 1e-1 \
68 -ts_adapt_dt_min 1e-3 \
69 -ts_rtol 0.01 \
70 -ts_atol 0.01 \
71 -ts_adapt_basic_safety 0.8 \
72 -ts_error_if_step_fails false \
73 -ts_theta_adapt false \
74 -ts_alpha_adapt false \
75 -ts_max_reject -1 \
76 -ts_max_snes_failures -1 \
77 -ksp_type gmres \
78 -pc_type lu \
79 -pc_factor_mat_solver_type mumps \
80 -snes_type newtonls \
81 -snes_linesearch_type l2 \
82 -snes_linesearch_minlambda 1e-3 \
83 -snes_linesearch_damping 1. \
84 -snes_linesearch_max_it 1 \
85 -snes_atol 1e-8 \
86 -snes_rtol 1e-8 \
87 -snes_divergence_tolerance 1e24 \
88 -snes_stol 0 \
89 -snes_max_it 32 \
90 -snes_converged_reason \
91 -my_order $ORDER \
92 -how_often_output 1 \
93 -my_max_post_proc_ref_level 0 \
94 -help 2>&1 | tee log && \
95 rm -f out_*.vtk && \
96 ../nonlinear_elasticity/do_vtk.sh out_*h5m
97 
98 # Will exit with status of last command.
99 
100 exit $?