Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
e51b15cd
Commit
e51b15cd
authored
May 22, 2018
by
Bert Vandenbroucke
Committed by
Matthieu Schaller
Jun 18, 2018
Browse files
Options
Downloads
Patches
Plain Diff
Added correct variable conversion to plot script.
parent
0ce6e5bc
No related branches found
No related tags found
2 merge requests
!566
Periodic gravity calculation
,
!565
Mesh force task
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/ZeldovichPancake_3D/plotSolution.py
+2
-0
2 additions, 0 deletions
examples/ZeldovichPancake_3D/plotSolution.py
examples/ZeldovichPancake_3D/run.sh
+2
-2
2 additions, 2 deletions
examples/ZeldovichPancake_3D/run.sh
with
4 additions
and
2 deletions
examples/ZeldovichPancake_3D/plotSolution.py
+
2
−
0
View file @
e51b15cd
...
...
@@ -66,6 +66,7 @@ sim = h5py.File("zeldovichPancake_%04d.hdf5"%snap, "r")
boxSize
=
sim
[
"
/Header
"
].
attrs
[
"
BoxSize
"
][
0
]
time
=
sim
[
"
/Header
"
].
attrs
[
"
Time
"
][
0
]
redshift
=
sim
[
"
/Header
"
].
attrs
[
"
Redshift
"
][
0
]
a
=
sim
[
"
/Header
"
].
attrs
[
"
Scale-factor
"
][
0
]
scheme
=
sim
[
"
/HydroScheme
"
].
attrs
[
"
Scheme
"
]
kernel
=
sim
[
"
/HydroScheme
"
].
attrs
[
"
Kernel function
"
]
neighbours
=
sim
[
"
/HydroScheme
"
].
attrs
[
"
Kernel target N_ngb
"
]
...
...
@@ -131,6 +132,7 @@ subplot(234)
#plot(x, u, '.', color='r', ms=4.0)
#plot(x_s, u_s, '--', color='k', alpha=0.8, lw=1.2)
u
*=
(
unit_length_in_si
**
2
/
unit_time_in_si
**
2
)
u
/=
a
**
(
3
*
(
gas_gamma
-
1.
))
T
=
(
gas_gamma
-
1.
)
*
u
*
mH_in_kg
/
k_in_J_K
print
T
.
mean
()
plot
(
x
,
T
,
'
.
'
,
color
=
'
r
'
,
ms
=
4.0
)
...
...
This diff is collapsed.
Click to expand it.
examples/ZeldovichPancake_3D/run.sh
+
2
−
2
View file @
e51b15cd
...
...
@@ -8,7 +8,7 @@ then
fi
# Run SWIFT
../swift
-s
-c
-G
-v
1
-t
1
zeldovichPancake.yml 2>&1 |
tee
output.log
../swift
-s
-c
-G
-t
4
zeldovichPancake.yml 2>&1 |
tee
output.log
# Plot the result
#
python plotSolution.py
1
python plotSolution.py
2
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
sign in
to comment