69 rindas
1.7 KiB
Bash
Executable File
69 rindas
1.7 KiB
Bash
Executable File
#! /bin/zsh
|
|
|
|
# We use zsh here to support floats (not supported in bash)
|
|
|
|
# This script produces the .dsf files for the runs from `build_LiebLin_catalogue_k_fixed`
|
|
# runs which achieved the required sumrule saturation.
|
|
|
|
if [[ $# -ne 4 ]]; then
|
|
echo "Arguments needed: whichDSF, kBT, target_sumrule, width."
|
|
exit 1
|
|
fi
|
|
|
|
if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
|
|
echo "Only the d, g and o scanning options are implemented."
|
|
exit 1
|
|
fi
|
|
|
|
if [[ $2 -lt 0 ]]; then
|
|
echo "Temperature kBT must be > 0."
|
|
exit 1
|
|
fi
|
|
|
|
if [[ $3 -lt 0 || $3 -gt 1 ]]; then
|
|
echo "Requirement: 0 < target_sumrule < 1."
|
|
exit 1
|
|
fi
|
|
|
|
if [[ $4 -lt 0 ]]; then
|
|
echo "width must be > 0."
|
|
exit 1
|
|
fi
|
|
|
|
whichDSF=$1
|
|
kBT=$2
|
|
target_sumrule=$3
|
|
width=$4
|
|
|
|
clist=(1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625 0.03125 0.015625)
|
|
|
|
basedir="$(pwd)"
|
|
|
|
|
|
for c in $clist
|
|
do
|
|
for nk in {1..16}
|
|
do
|
|
# ommin is set to zero for all
|
|
ommin=0
|
|
# ommax is set to about 2x the Tonks-Girardeau dispersion at this momentum:
|
|
# w_TG = k^2 + 2\pi n |k| with k=2pi*iK/L and iK=nk*N/8, so (with N=L) k=pi/4 nk and
|
|
# w_TG = pi^2/16 nk^2 + pi^2/2 nk = pi^2 nk (nk/16 + 1/2)
|
|
# We take pi^2 -> 8 for convenience, so 2*w_TG is about
|
|
ommax=$(($nk*($nk + 8)))
|
|
# Number of points:
|
|
Nom=1000
|
|
echo 'Starting computation of DSFs for c =' $c', kfact = '$nk | tee -a $logfile
|
|
dir='c_'$c'/kBT_'$kBT'/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule
|
|
cd $dir
|
|
echo $dir
|
|
mkdir -p plots/
|
|
LiebLin_Catalogue_Fixed_c_k_Nscaling_Smoothen_DSF $whichDSF $c $nk $kBT $target_sumrule $ommin $ommax $Nom $width
|
|
mv *dsfs plots/
|
|
mv K_* plots/
|
|
mv Omega_* plots/
|
|
cd $basedir
|
|
echo ' Successfully computed DSFs for c =' $c', kfact = '$nk'\n' | tee -a $logfile
|
|
done
|
|
done
|