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
LAMBERT Jean-charles
uns_projects
Commits
7b521f8b
Commit
7b521f8b
authored
Oct 02, 2017
by
LAMBERT Jean-charles
Browse files
add save velocity
parent
15f3220b
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/modules/simulations/ctree.py
View file @
7b521f8b
...
...
@@ -200,6 +200,7 @@ class CTree:
v
=
v
[
shuffle_idx_threshold
,
]
v
=
np
.
reshape
(
v
,(
-
1
,))
cxv
=
CSnapshot
(
None
).
center
(
p
,
v
,
m
*
rho
)
if
v
is
None
:
# no velocities
cxv
[
3
]
=
0.0
cxv
[
4
]
=
0.0
...
...
@@ -208,6 +209,8 @@ class CTree:
unso
=
CunsOut
(
outfile
,
"nemo"
)
unso
.
setValueF
(
"time"
,
self
.
__time
)
unso
.
setArrayF
(
"all"
,
"pos"
,
p
)
if
self
.
__vel
is
not
None
:
unso
.
setArrayF
(
"all"
,
"vel"
,
v
)
unso
.
setArrayF
(
"all"
,
"mass"
,
m
)
unso
.
setArrayF
(
"all"
,
"rho"
,
rho
)
unso
.
setArrayF
(
"all"
,
"hsml"
,
hsml
)
...
...
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