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
66680911
Commit
66680911
authored
Mar 11, 2016
by
Matthieu Schaller
Browse files
Don't forget to initialise x_old otherwise rebuild is triggered every time-step.
parent
5f1ebdf6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/space.c
View file @
66680911
...
...
@@ -1060,6 +1060,7 @@ void space_do_split(struct space *s, struct cell *c) {
struct
cell
*
temp
;
struct
part
*
parts
=
c
->
parts
;
struct
gpart
*
gparts
=
c
->
gparts
;
struct
xpart
*
xparts
=
c
->
xparts
;
/* Check the depth. */
if
(
c
->
depth
>
s
->
maxdepth
)
s
->
maxdepth
=
c
->
depth
;
...
...
@@ -1130,8 +1131,12 @@ void space_do_split(struct space *s, struct cell *c) {
/* Get dt_min/dt_max. */
for
(
int
k
=
0
;
k
<
count
;
k
++
)
{
struct
part
*
p
=
&
parts
[
k
];
struct
xpart
*
xp
=
&
xparts
[
k
];
const
float
h
=
p
->
h
;
const
int
ti_end
=
p
->
ti_end
;
xp
->
x_old
[
0
]
=
p
->
x
[
0
];
xp
->
x_old
[
1
]
=
p
->
x
[
1
];
xp
->
x_old
[
2
]
=
p
->
x
[
2
];
if
(
h
>
h_max
)
h_max
=
h
;
if
(
ti_end
<
ti_end_min
)
ti_end_min
=
ti_end
;
if
(
ti_end
>
ti_end_max
)
ti_end_max
=
ti_end
;
...
...
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