diff --git a/examples/GEAR/ZoomIn/getIC.sh b/examples/GEAR/ZoomIn/getIC.sh index 6cdfaec981af515249578faa72798c53448e7ecb..ed95d78b23d81649a354571f83b7341404f05945 100755 --- a/examples/GEAR/ZoomIn/getIC.sh +++ b/examples/GEAR/ZoomIn/getIC.sh @@ -1,2 +1,3 @@ #!/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 diff --git a/examples/GEAR/ZoomIn/make_image.py b/examples/GEAR/ZoomIn/make_image.py index 7cb96df377876a5e3d2d8a400788ba0d19da3626..a87c523ba5ec35cab96aa2f227bf2ac02720442f 100644 --- a/examples/GEAR/ZoomIn/make_image.py +++ b/examples/GEAR/ZoomIn/make_image.py @@ -17,10 +17,8 @@ import numpy as np # Parameters -snap = int(sys.argv[-1]) - -swift = "swift/snapshot_%04i.hdf5" % snap -gear = "gear/snapshot_%04i.hdf5" % snap +swift = "swift_final.hdf5" +gear = "h050_final.hdf5" width = 50 * kpc diff --git a/examples/GEAR/ZoomIn/run.sh b/examples/GEAR/ZoomIn/run.sh index 471416dff553496d104f4ef78ef705718d82ce05..0e6de86f79672c624d5c220574cd816a9b5ea1b4 100755 --- a/examples/GEAR/ZoomIn/run.sh +++ b/examples/GEAR/ZoomIn/run.sh @@ -1,11 +1,16 @@ #!/bin/bash - # Generate the initial conditions if they are not present. -if [ ! -e zoom_in.hdf5 ] -then - echo "Fetching initial conditions for the zoom in example..." - ./getIC.sh -fi +echo "Fetching initial conditions for the zoom in example..." +./getIC.sh -../../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 diff --git a/examples/GEAR/ZoomIn/zoom_in.yml b/examples/GEAR/ZoomIn/zoom_in.yml index 20b46f4dfb4a8daa0d57ea6e5e4da4d667ba1438..99ade12d7f457a2a0ff41cbf604255e1a2fb5bc4 100644 --- a/examples/GEAR/ZoomIn/zoom_in.yml +++ b/examples/GEAR/ZoomIn/zoom_in.yml @@ -27,7 +27,7 @@ TimeIntegration: # Parameters governing the 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) 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) @@ -57,7 +57,7 @@ SPH: # Parameters related to the initial conditions InitialConditions: - file_name: ./h177.hdf5 # The file to read + file_name: ./h050.hdf5 # The file to read periodic: 1 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