Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
SWIFTsim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
70
Issues
70
List
Boards
Labels
Milestones
Merge Requests
14
Merge Requests
14
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
SWIFT
SWIFTsim
Commits
98a77ce5
Commit
98a77ce5
authored
Apr 09, 2020
by
Loic Hausammann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GEAR: ensure setup is working
parent
57b814d5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
14 deletions
+18
-14
examples/GEAR/ZoomIn/getIC.sh
examples/GEAR/ZoomIn/getIC.sh
+2
-1
examples/GEAR/ZoomIn/make_image.py
examples/GEAR/ZoomIn/make_image.py
+2
-4
examples/GEAR/ZoomIn/run.sh
examples/GEAR/ZoomIn/run.sh
+12
-7
examples/GEAR/ZoomIn/zoom_in.yml
examples/GEAR/ZoomIn/zoom_in.yml
+2
-2
No files found.
examples/GEAR/ZoomIn/getIC.sh
View file @
98a77ce5
#!/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
examples/GEAR/ZoomIn/make_image.py
View file @
98a77ce5
...
...
@@ -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
...
...
examples/GEAR/ZoomIn/run.sh
View file @
98a77ce5
#!/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
examples/GEAR/ZoomIn/zoom_in.yml
View file @
98a77ce5
...
...
@@ -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
:
./h
177
.hdf5
# The file to read
file_name
:
./h
050
.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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment