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
e351174e
Commit
e351174e
authored
Oct 18, 2015
by
Matthieu Schaller
Browse files
Get number of particles from stdin in the IC script.
parent
a9f62315
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/UniformBox/makeIC.py
View file @
e351174e
...
...
@@ -19,18 +19,19 @@
##############################################################################
import
h5py
import
sys
from
numpy
import
*
# Generates a swift IC file containing a cartesian distribution of particles
# at a constant density and pressure in a cubic box
# Parameters
periodic
=
1
# 1 For periodic box
periodic
=
1
# 1 For periodic box
boxSize
=
1.
L
=
1200
# Number of particles along one axis
rho
=
2.
# Density
P
=
1.
# Pressure
gamma
=
5.
/
3.
# Gas adiabatic index
L
=
int
(
sys
.
argv
[
1
])
# Number of particles along one axis
rho
=
2.
# Density
P
=
1.
# Pressure
gamma
=
5.
/
3.
# Gas adiabatic index
fileName
=
"uniformBox.hdf5"
...
...
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