Skip to content
Snippets Groups Projects
Commit 080b8536 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'update_agora' into 'master'

Update agora

See merge request !809
parents db9aec61 5c192283
No related branches found
No related tags found
1 merge request!809Update agora
......@@ -13,9 +13,10 @@ copyfile(filename, out)
f = File(out)
name = "PartType0/ElementAbundance"
if name in f:
del f[name]
for i in range(6):
name = "PartType{}/ElementAbundance".format(i)
if name in f:
del f[name]
for i in range(NPartType):
name = "PartType%i" % i
......@@ -25,4 +26,10 @@ for i in range(NPartType):
grp = f[name + "/SmoothingLength"]
grp[:] *= 1.823
cosmo = f["Cosmology"].attrs
head = f["Header"].attrs
head["OmegaLambda"] = cosmo["Omega_lambda"]
head["Omega0"] = cosmo["Omega_b"]
head["HubbleParam"] = cosmo["H0 [internal units]"]
f.close()
#!/bin/bash
OPTIND=1
with_cooling=0
function show_help {
echo "Valid options are:"
echo "\t -h \t Show this help"
echo "\t -C \t Download solution with cooling"
}
while getopts "h?C" opt; do
case "$opt" in
h|\?)
show_help
exit
;;
C)
with_cooling=1
;;
esac
done
# cleanup work space
rm snapshot_0000.hdf5 snapshot_0500.hdf5
if [ $with_cooling -eq 1 ]; then
wget https://obswww.unige.ch/~lhausamm/swift/IC/AgoraDisk/Gear/with_cooling/snapshot_0000.hdf5
wget https://obswww.unige.ch/~lhausamm/swift/IC/AgoraDisk/Gear/with_cooling/snapshot_0500.hdf5
else
wget https://obswww.unige.ch/~lhausamm/swift/IC/AgoraDisk/Gear/without_cooling/snapshot_0000.hdf5
wget https://obswww.unige.ch/~lhausamm/swift/IC/AgoraDisk/Gear/without_cooling/snapshot_0500.hdf5
fi
wget https://obswww.unige.ch/~lhausamm/swift/IC/AgoraDisk/Gear/with_cooling/snapshot_0000.hdf5
wget https://obswww.unige.ch/~lhausamm/swift/IC/AgoraDisk/Gear/with_cooling/snapshot_0500.hdf5
# wget https://obswww.unige.ch/~lhausamm/swift/IC/AgoraDisk/Gear/without_cooling/snapshot_0000.hdf5
# wget https://obswww.unige.ch/~lhausamm/swift/IC/AgoraDisk/Gear/without_cooling/snapshot_0500.hdf5
This diff is collapsed.
......@@ -5,31 +5,21 @@
# currently only the low resolution is available
sim=low
# enable cooling or not
cooling=0
# make run.sh fail if a subcommand fails
set -e
# define flags
flag=
if [ $cooling -eq 1 ]
then
flag=-C
fi
# Generate the initial conditions if they are not present.
if [ ! -e $sim.hdf5 ]
then
echo "Fetching initial glass file for the Sedov blast example..."
./getIC.sh $sim.hdf5
./getIC.sh $sim
fi
# Get the Grackle cooling table
if [ ! -e CloudyData_UVB=HM2012.h5 ]
then
echo "Fetching the Cloudy tables required by Grackle..."
../getCoolingTable.sh
../../Cooling/getGrackleCoolingTable.sh
fi
# copy the initial conditions
......@@ -38,7 +28,7 @@ cp $sim.hdf5 agora_disk.hdf5
python3 changeType.py agora_disk.hdf5
# Run SWIFT
#../../swift $flag --hydro --self-gravity --threads=4 agora_disk.yml 2>&1 | tee output.log
../../swift --cooling --hydro --self-gravity --threads=4 agora_disk.yml 2>&1 | tee output.log
echo "Changing smoothing length to be Gadget compatible"
......@@ -46,7 +36,8 @@ python3 cleanupSwift.py agora_disk_0000.hdf5 agora_disk_IC.hdf5
python3 cleanupSwift.py agora_disk_0050.hdf5 agora_disk_500Myr.hdf5
echo "Fetching GEAR solution..."
./getSolution.sh $flag
./getSolution.sh
echo "Plotting..."
python3 plotSolution.py $flag
python3 plotSolution.py
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment