Commit 98a77ce5 authored by Loic Hausammann's avatar Loic Hausammann

GEAR: ensure setup is working

parent 57b814d5
#!/bin/bash #!/bin/bash
wget https://obswww.unige.ch/~lhausamm/swift/IC/ZoomIn/zoom_in.hdf5 # wget https://obswww.unige.ch/~lhausamm/swift/ZoomIC/h177.hdf5
wget https://obswww.unige.ch/~lhausamm/swift/ZoomIC/h050.hdf5
...@@ -17,10 +17,8 @@ import numpy as np ...@@ -17,10 +17,8 @@ import numpy as np
# Parameters # Parameters
snap = int(sys.argv[-1]) swift = "swift_final.hdf5"
gear = "h050_final.hdf5"
swift = "swift/snapshot_%04i.hdf5" % snap
gear = "gear/snapshot_%04i.hdf5" % snap
width = 50 * kpc width = 50 * kpc
......
#!/bin/bash #!/bin/bash
# Generate the initial conditions if they are not present. echo "Fetching initial conditions for the zoom in example..."
if [ ! -e zoom_in.hdf5 ] ./getIC.sh
then
echo "Fetching initial conditions for the zoom in example..."
./getIC.sh
fi
../../swift --cooling --feedback --cosmology --limiter --sync --self-gravity --hydro --stars --star-formation --threads=8 zoom_in.yml 2>&1 | tee output.log # ../../swift --cooling --feedback --cosmology --limiter --sync --self-gravity --hydro --stars --star-formation --threads=8 zoom_in.yml 2>&1 | tee output.log
echo "Fetching the solution from GEAR..."
./getSolution.sh
# Convert SWIFT snapshot to GEAR
python3 cleanupSwift.py snapshot_1010.hdf5 swift_final.hdf5
# Make the plots
./make_image.py
...@@ -27,7 +27,7 @@ TimeIntegration: ...@@ -27,7 +27,7 @@ TimeIntegration:
# Parameters governing the snapshots # Parameters governing the snapshots
Snapshots: Snapshots:
basename: zoom_in # Common part of the name of output files basename: snapshot # Common part of the name of output files
scale_factor_first: 0.987345 # Scale-factor of the first snaphot (cosmological run) scale_factor_first: 0.987345 # Scale-factor of the first snaphot (cosmological run)
time_first: 0.01 # Time of the first output (non-cosmological run) (in internal units) time_first: 0.01 # Time of the first output (non-cosmological run) (in internal units)
delta_time: 1.01 # Time difference between consecutive outputs (in internal units) delta_time: 1.01 # Time difference between consecutive outputs (in internal units)
...@@ -57,7 +57,7 @@ SPH: ...@@ -57,7 +57,7 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./h177.hdf5 # The file to read file_name: ./h050.hdf5 # The file to read
periodic: 1 periodic: 1
cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget
cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment