Lab fenòmens: afegir informe i ultims canvis al codi
Change-Id: I7f01665996295625fc390f9382dd0ba1c9882bbc
diff --git a/quad10/fenomens/lab/p4/run.bash b/quad10/fenomens/lab/p4/run.bash
index 2c95bdd..1be282a 100755
--- a/quad10/fenomens/lab/p4/run.bash
+++ b/quad10/fenomens/lab/p4/run.bash
@@ -5,9 +5,10 @@
Usage: $progname T L [outFilePrefix [--help --skipIfComputed
--nSeeds NSEEDS --mcTot MCTOT --mcIni MCINI --mcD MCD
- --initialSeed INITIALSEED --saveFinalConf]]
+ --initialSeed INITIALSEED --saveFinalConf
+ --saveEvolution]]
- the output file will be saved at "data_out/{{outFilePrefix}}"
+ the results file will be saved at "data_out/{{outFilePrefix}}.res"
optional arguments:
-h, --help show this help message and exit.
@@ -24,6 +25,11 @@
--initialSeed initial seed for the Monte Carlo algorithm.
--saveFinalConf save a file with the configuration which
belongs to the last Montecarlo iteration.
+ It will be saved at
+ "data_out/{{outFilePrefix}}.conf".
+ --saveEvolution save a file with the temporary evolution
+ of the simulation. It will be saved at
+ "data_out/{{outFilePrefix}}.ev"
END
}
@@ -37,7 +43,7 @@
defaultOutFilePrefix="L$L-T$T"
outFilePrefix="${3:-$defaultOutFilePrefix}"
-opts=$(getopt -l "help,skipIfComputed,nSeeds:,mcTot:,mcIni:,mcD:,initialSeed:,saveFinalConf" -o "hsn:m:i:d:" -n "$progname" -- "${@:4}")
+opts=$(getopt -l "help,skipIfComputed,nSeeds:,mcTot:,mcIni:,mcD:,initialSeed:,saveFinalConf,saveEvolution" -o "hsn:m:i:d:" -n "$progname" -- "${@:4}")
eval set -- "$opts"
skipIfComputed=false
@@ -47,6 +53,7 @@
mcD=20
initialSeed=117654
saveFinalConf=F
+saveEvolution=F
while true; do
case "$1" in
@@ -82,6 +89,10 @@
saveFinalConf=T
shift
;;
+ --saveEvolution)
+ saveEvolution=T
+ shift
+ ;;
*) break ;;
esac
done
@@ -104,5 +115,6 @@
MCINI=$mcIni,
MCD=$mcD
SAVEFINALCONF=$saveFinalConf
+SAVEEVOLUTION=$saveEvolution
&END
EOF