Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-07-16 08:16:52

0001 #! /bin/bash
0002 
0003 set -euo pipefail
0004 
0005 emin=400
0006 emax=400
0007 ne=1
0008 
0009 bmin=1.15
0010 bmax=1.45
0011 nb=50
0012 
0013 amin=0.0
0014 amax=0.2
0015 na=50
0016 
0017 jobid="$1"
0018 
0019 bnow=$(awk -v bmin="$bmin" \
0020              -v bmax="$bmax" \
0021              -v nb="$nb" \
0022              -v i="$1" \
0023 'BEGIN {
0024    print bmin + (bmax - bmin) * i / nb
0025 }')
0026 
0027 echo $bnow
0028 
0029 script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
0030 
0031 if [[ ! -d "${script_dir}/gasfiles" ]]; then
0032   echo "ERROR: ${script_dir}/gasfiles does not exist."
0033   echo "Create it or make it a symbolic link before launching jobs."
0034   exit 1
0035 fi
0036 
0037 output="${script_dir}/gasfiles/PART_${jobid}.gas"
0038 echo $output
0039 
0040 echo GasModel "$emin" "$emax" "$ne" "$bnow" "$bnow" 1 "$amin" "$amax" "$na" "$output"
0041 GasModel "$emin" "$emax" "$ne" "$bnow" "$bnow" 1 "$amin" "$amax" "$na" "$output"
0042 
0043 echo "all done"