summaryrefslogtreecommitdiff
path: root/examples/laminar/powerLaw2d/run.sh
blob: 190f65d13cb12916e34963c51d93ddef45a2fa7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

# Script to run the example with three different values for maxU and collect the output.

APP=powerLaw2d
NP=2

if [ ! -f $APP ]; then make; fi

for N in `seq 1 3`; do

		  case $N in
					 1) MAXU=1;   DIR="out_u1e+0" ;;
					 2) MAXU=0.1; DIR="out_u1e-1" ;;
					 3) MAXU=10;  DIR="out_u1e+1" ;;
		  esac

		  if [ ! -d $DIR ]; then mkdir $DIR; fi
		  
		  sed "s/MAXU/$MAXU/g" input-model.xml > $DIR/input.xml
		  cp $APP $DIR/

		  cd $DIR

		  mpirun -np $NP $APP 2>&1 | tee log.log \
					 && cp tmp/gnuplotData/centerVelocity.png ../u_$DIR".png"

		  cd ..
done