Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
7fd9ad30
Commit
7fd9ad30
authored
Sep 20, 2016
by
Tom Theuns
Browse files
merged master
parents
586c7573
d6ebadaf
Changes
94
Hide whitespace changes
Inline
Side-by-side
AUTHORS
View file @
7fd9ad30
...
...
@@ -10,3 +10,4 @@ Tom Theuns tom.theuns@durham.ac.uk
Richard G. Bower r.g.bower@durham.ac.uk
Stefan Arridge stefan.arridge@durham.ac.uk
Massimiliano Culpo massimiliano.culpo@googlemail.com
Yves Revaz yves.revaz@epfl.ch
doc/Doxyfile.in
View file @
7fd9ad30
...
...
@@ -763,7 +763,8 @@ INPUT = @top_srcdir@ @top_srcdir@/src @top_srcdir@/tests @top_
INPUT += @top_srcdir@/src/hydro/Minimal
INPUT += @top_srcdir@/src/gravity/Default
INPUT += @top_srcdir@/src/riemann
INPUT += @top_srcdir@/src/cooling/const_lambda
INPUT += @top_srcdir@/src/potential/point_mass
INPUT += @top_srcdir@/src/cooling/const_du
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
...
...
examples/Dis
k-
Patch/GravityOnly/README
→
examples/Dis
c
Patch/GravityOnly/README
View file @
7fd9ad30
File moved
examples/Dis
k-
Patch/GravityOnly/dis
k
-patch.yml
→
examples/Dis
c
Patch/GravityOnly/dis
c
-patch.yml
View file @
7fd9ad30
...
...
@@ -19,7 +19,7 @@ Statistics:
# Parameters governing the snapshots
Snapshots
:
basename
:
Dis
k
-Patch
# Common part of the name of output files
basename
:
Dis
c
-Patch
# Common part of the name of output files
time_first
:
0.
# Time of the first output (in internal units)
delta_time
:
8.
# Time difference between consecutive outputs (in internal units)
...
...
@@ -33,11 +33,11 @@ SPH:
# Parameters related to the initial conditions
InitialConditions
:
file_name
:
Dis
k
-Patch.hdf5
# The file to read
file_name
:
Dis
c
-Patch.hdf5
# The file to read
# External potential parameters
Dis
k-
PatchPotential
:
Dis
c
PatchPotential
:
surface_density
:
10.
scale_height
:
100.
z_dis
k
:
300.
z_dis
c
:
300.
timestep_mult
:
0.03
examples/Dis
k-
Patch/GravityOnly/makeIC.py
→
examples/Dis
c
Patch/GravityOnly/makeIC.py
View file @
7fd9ad30
...
...
@@ -26,7 +26,7 @@ import random
# Generates N particles in a box of [0:BoxSize,0:BoxSize,-2scale_height:2scale_height]
# see Creasey, Theuns & Bower, 2013, for the equations:
# dis
k
parameters are: surface density sigma
# dis
c
parameters are: surface density sigma
# scale height b
# density: rho(z) = (sigma/2b) sech^2(z/b)
# isothermal velocity dispersion = <v_z^2? = b pi G sigma
...
...
@@ -79,7 +79,7 @@ N = int(sys.argv[1]) # Number of particles
rho
=
2.
# Density
P
=
1.
# Pressure
gamma
=
5.
/
3.
# Gas adiabatic index
fileName
=
"Dis
k
-Patch.hdf5"
fileName
=
"Dis
c
-Patch.hdf5"
#---------------------------------------------------
...
...
examples/Dis
k-
Patch/GravityOnly/run.sh
→
examples/Dis
c
Patch/GravityOnly/run.sh
View file @
7fd9ad30
#!/bin/bash
# Generate the initial conditions if they are not present.
if
[
!
-e
Isothermal
.hdf5
]
if
[
!
-e
Disc-Patch
.hdf5
]
then
echo
"Generating initial conditions for the dis
k
-patch example..."
echo
"Generating initial conditions for the dis
c
-patch example..."
python makeIC.py 1000
fi
../../swift
-g
-t
2 dis
k
-patch.yml
../../swift
-g
-t
2 dis
c
-patch.yml
examples/Dis
k-
Patch/GravityOnly/test.pro
→
examples/Dis
c
Patch/GravityOnly/test.pro
View file @
7fd9ad30
...
...
@@ -8,7 +8,7 @@ iplot = 1 ; if iplot = 1, make plot of E/Lz conservation, else, simply compare f
@
physunits
indir
=
'./'
basefile
=
'Dis
k
-Patch_'
basefile
=
'Dis
c
-Patch_'
;
set
properties
of
potential
uL
=
phys
.
pc
;
unit
of
length
...
...
examples/Dis
k-
Patch/HydroStatic/README
→
examples/Dis
c
Patch/HydroStatic/README
View file @
7fd9ad30
Generates and evolves a dis
k
-patch, where gas is in hydrostatic
Generates and evolves a dis
c
-patch, where gas is in hydrostatic
equilibrium with an imposed external gravitational force, using the
equations from Creasey, Theuns & Bower, 2013, MNRAS, Volume 429,
Issue 3, p.1922-1948.
...
...
@@ -10,11 +10,11 @@ To generate ICs ready for a scientific run:
2) Generate pre-ICs by running the 'makeIC.py' script.
3) Run SWIFT with an isothermal EoS, no cooling nor feedback, and the
dis
k
-patch potential switched on and using the parameters from
'dis
k
-patch-icc.yml'
dis
c
-patch potential switched on and using the parameters from
'dis
c
-patch-icc.yml'
4) The ICs are then ready to be run for a science problem. Rename the last
output to 'Dis
k
-Patch-dynamic.hdf5'. These are now the ICs for the actual test.
output to 'Dis
c
-Patch-dynamic.hdf5'. These are now the ICs for the actual test.
When running SWIFT with the parameters from 'dis
k
-patch.yml' and an
ideal gas EoS on these ICs the dis
k
should stay in equilibrium.
When running SWIFT with the parameters from 'dis
c
-patch.yml' and an
ideal gas EoS on these ICs the dis
c
should stay in equilibrium.
examples/Dis
k-
Patch/HydroStatic/dis
k
-patch-icc.yml
→
examples/Dis
c
Patch/HydroStatic/dis
c
-patch-icc.yml
View file @
7fd9ad30
...
...
@@ -19,7 +19,7 @@ Statistics:
# Parameters governing the snapshots
Snapshots
:
basename
:
Dis
k
-Patch
# Common part of the name of output files
basename
:
Dis
c
-Patch
# Common part of the name of output files
time_first
:
0.
# Time of the first output (in internal units)
delta_time
:
12.
# Time difference between consecutive outputs (in internal units)
...
...
@@ -33,12 +33,12 @@ SPH:
# Parameters related to the initial conditions
InitialConditions
:
file_name
:
Dis
k
-Patch.hdf5
# The file to read
file_name
:
Dis
c
-Patch.hdf5
# The file to read
# External potential parameters
Dis
k-
PatchPotential
:
Dis
c
PatchPotential
:
surface_density
:
10.
scale_height
:
100.
z_dis
k
:
200.
z_dis
c
:
200.
timestep_mult
:
0.03
growth_time
:
5.
examples/Dis
k-
Patch/HydroStatic/dis
k
-patch.yml
→
examples/Dis
c
Patch/HydroStatic/dis
c
-patch.yml
View file @
7fd9ad30
...
...
@@ -19,7 +19,7 @@ Statistics:
# Parameters governing the snapshots
Snapshots
:
basename
:
Dis
k
-Patch-dynamic
# Common part of the name of output files
basename
:
Dis
c
-Patch-dynamic
# Common part of the name of output files
time_first
:
968.
# Time of the first output (in internal units)
delta_time
:
24.
# Time difference between consecutive outputs (in internal units)
...
...
@@ -33,11 +33,11 @@ SPH:
# Parameters related to the initial conditions
InitialConditions
:
file_name
:
Dis
k
-Patch-dynamic.hdf5
# The file to read
file_name
:
Dis
c
-Patch-dynamic.hdf5
# The file to read
# External potential parameters
Dis
k-
PatchPotential
:
Dis
c
PatchPotential
:
surface_density
:
10.
scale_height
:
100.
z_dis
k
:
200.
z_dis
c
:
200.
timestep_mult
:
0.03
examples/Dis
k-
Patch/HydroStatic/dynamic.pro
→
examples/Dis
c
Patch/HydroStatic/dynamic.pro
View file @
7fd9ad30
File moved
examples/Dis
k-
Patch/HydroStatic/getGlass.sh
→
examples/Dis
c
Patch/HydroStatic/getGlass.sh
View file @
7fd9ad30
File moved
examples/Dis
k-
Patch/HydroStatic/makeIC.py
→
examples/Dis
c
Patch/HydroStatic/makeIC.py
View file @
7fd9ad30
...
...
@@ -25,9 +25,9 @@ import math
import
random
import
matplotlib.pyplot
as
plt
# Generates a dis
k
-patch in hydrostatic equilibrium
# Generates a dis
c
-patch in hydrostatic equilibrium
# see Creasey, Theuns & Bower, 2013, for the equations:
# dis
k
parameters are: surface density sigma
# dis
c
parameters are: surface density sigma
# scale height b
# density: rho(z) = (sigma/2b) sech^2(z/b)
# isothermal velocity dispersion = <v_z^2? = b pi G sigma
...
...
@@ -79,7 +79,7 @@ Radius = 100. # maximum radius of particles [kpc]
G
=
const_G
# File
fileName
=
"Dis
k
-Patch.hdf5"
fileName
=
"Dis
c
-Patch.hdf5"
#---------------------------------------------------
mass
=
1
...
...
@@ -145,7 +145,7 @@ mass = 0.*h + pmass
entropy_flag
=
0
vel
=
0
+
0
*
pos
# move centre of dis
k
to middle of box
# move centre of dis
c
to middle of box
pos
[:,:]
+=
boxSize
/
2
...
...
examples/Dis
k-
Patch/HydroStatic/test.pro
→
examples/Dis
c
Patch/HydroStatic/test.pro
View file @
7fd9ad30
...
...
@@ -8,7 +8,7 @@ iplot = 1 ; if iplot = 1, make plot of E/Lz conservation, else, simply compare f
@
physunits
indir
=
'./'
basefile
=
'Dis
k
-Patch_'
basefile
=
'Dis
c
-Patch_'
;
set
properties
of
potential
uL
=
phys
.
pc
;
unit
of
length
...
...
examples/EAGLE_25/README
View file @
7fd9ad30
...
...
@@ -13,4 +13,4 @@ The particle load of the main EAGLE simulation can be reproduced by
running these ICs on 64 cores.
MD5 checksum of the ICs:
ada2c728db2bd2d77a20c4eef52dfaf1
EAGLE_ICs_25.hdf5
02cd1c353b86230af047b5d4ab22afcf
EAGLE_ICs_25.hdf5
examples/ExternalPointMass/externalPointMass.yml
View file @
7fd9ad30
...
...
@@ -38,7 +38,7 @@ InitialConditions:
shift_z
:
50.
# External potential parameters
PointMass
:
PointMass
Potential
:
position_x
:
50.
# location of external point mass in internal units
position_y
:
50.
position_z
:
50.
...
...
examples/MultiTypes/multiTypes.yml
View file @
7fd9ad30
...
...
@@ -35,8 +35,9 @@ InitialConditions:
file_name
:
./multiTypes.hdf5
# The file to read
# External potential parameters
PointMass
:
PointMass
Potential
:
position_x
:
50.
# location of external point mass in internal units
position_y
:
50.
position_z
:
50.
mass
:
1e10
# mass of external point mass in internal units
timestep_mult
:
1e-2
examples/SedovBlast_1D/sedov.yml
View file @
7fd9ad30
...
...
@@ -21,7 +21,7 @@ Snapshots:
# Parameters governing the conserved quantities statistics
Statistics
:
delta_time
:
1e-
3
# Time between statistics output
delta_time
:
1e-
5
# Time between statistics output
# Parameters for the hydrodynamics scheme
SPH
:
...
...
examples/UniformBox_3D/uniformBox.yml
View file @
7fd9ad30
...
...
@@ -33,11 +33,3 @@ SPH:
# Parameters related to the initial conditions
InitialConditions
:
file_name
:
./uniformBox.hdf5
# The file to read
# External potential parameters
PointMass
:
position_x
:
50.
# location of external point mass in internal units
position_y
:
50.
position_z
:
50.
mass
:
1e10
# mass of external point mass in internal units
examples/main.c
View file @
7fd9ad30
...
...
@@ -541,7 +541,7 @@ int main(int argc, char *argv[]) {
/* Make sure output file is empty, only on one rank. */
char
dumpfile
[
30
];
snprintf
(
dumpfile
,
30
,
"thread_info_MPI-step%d.dat"
,
j
);
snprintf
(
dumpfile
,
30
,
"thread_info_MPI-step%d.dat"
,
j
+
1
);
FILE
*
file_thread
;
if
(
myrank
==
0
)
{
file_thread
=
fopen
(
dumpfile
,
"w"
);
...
...
@@ -593,7 +593,7 @@ int main(int argc, char *argv[]) {
#else
char
dumpfile
[
30
];
snprintf
(
dumpfile
,
30
,
"thread_info-step%d.dat"
,
j
);
snprintf
(
dumpfile
,
30
,
"thread_info-step%d.dat"
,
j
+
1
);
FILE
*
file_thread
;
file_thread
=
fopen
(
dumpfile
,
"w"
);
/* Add some information to help with the plots */
...
...
Prev
1
2
3
4
5
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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