v0.14.0
Loading...
Searching...
No Matches
run_paper.sh
Go to the documentation of this file.
1#!/bin/bash
2
3# Get file name
4if [ -z ${1+x} ]; then
5 MESHFILE=1dTest.cub
6else
7 MESHFILE=$1
8fi
9
10# Get config file name
11if [ -z ${2+x} ]; then
12 CONFIGFILE=paper.cfg
13else
14 CONFIGFILE=$2
15fi
16
17# Get numbet of processors
18if [ -z ${3+x} ]; then
19 NBPROCS=4
20else
21 NBPROCS=$3
22fi
23
24# Get step size
25if [ -z ${4+x} ]; then
26 DT=0.0001
27else
28 DT=$4
29fi
30
31# Get final time
32if [ -z ${5+x} ]; then
33 FT=1.0
34else
35 FT=$5
36fi
37
38# Get final time
39if [ -z ${6+x} ]; then
40 ORDER=0
41else
42 ORDER=$6
43fi
44
45#spack load moab
46
47set -x
48
49# Partition mesh
50../../tools/mofem_part -my_file $MESHFILE -meshsets_config $CONFIGFILE -my_nparts $NBPROCS
51
52# Run code
53rm -f out_*.h5m
54#make -j 4 unsaturated_transport
55
56#mpirun --allow-run-as-root -np $NBPROCS \
57mpirun -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 && \
95rm -f out_*.vtk && \
96../nonlinear_elasticity/do_vtk.sh out_*h5m
97
98# Will exit with status of last command.
99
100exit $?