Trisurf Monte Carlo simulator
Samo Penic
2014-12-16 6bc95bfe19012a33f185adf1476e623d98d33465
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
 
#This part is a configuration part of trisurf deploy
 
 
#definition of tapes
declare -a tapes=("tape1" "tape2" "tape3" "tape4");
 
#what options from tape should be overriden
declare -a tape_overrides=("xk0=10" "constvol=2,xk=20" "" "");
 
#some extra options for program execution
declare -a extra_options=("--force-from-tape" "--reset-iteration-count" "" "");
 
#main directory
declare directory="/home/samo/trisurfanje"
 
#subdirectory structure
function subdir() {
 
    echo "ABC";
}
 
 
#End of configuration
 
declare tape_no=${#tapes[@]}
for i in `seq 1 $tape_no`; do
    declare sdir=$(subdir)
    declare dir_struct="$directory/$sdir"
#if doesnt exist
    echo "mkdir $dir_struct"
#if doesnt exist
    echo "cp ${tapes[i-1]} $dir_struct"
 
 
    echo "trisurf -t ${tapes[i-1]} -d $dir_struct -o ${tape_overrides[i-1]} ${extra_options[i-1]}"
done;
 
 
#Functions required for operation
 
 
echo "Deploying configuration of trisurf"