Skip to content
GitLab
Menu
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
ba9fe05e
Commit
ba9fe05e
authored
Dec 18, 2017
by
Matthieu Schaller
Browse files
Merge branch 'update_acceleration_in_kick1' into 'master'
Kick1 update See merge request
!472
parents
9115e7c7
9689a06b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/runner.c
View file @
ba9fe05e
...
...
@@ -1001,6 +1001,21 @@ void runner_do_kick1(struct runner *r, struct cell *c, int timer) {
/* do the kick */
kick_part
(
p
,
xp
,
ti_begin
,
ti_begin
+
ti_step
/
2
,
timeBase
);
/* Update the accelerations to be used in the drift for hydro */
if
(
p
->
gpart
!=
NULL
)
{
const
float
a_tot
[
3
]
=
{
p
->
a_hydro
[
0
]
+
p
->
gpart
->
a_grav
[
0
],
p
->
a_hydro
[
1
]
+
p
->
gpart
->
a_grav
[
1
],
p
->
a_hydro
[
2
]
+
p
->
gpart
->
a_grav
[
2
]};
p
->
a_hydro
[
0
]
=
a_tot
[
0
];
p
->
a_hydro
[
1
]
=
a_tot
[
1
];
p
->
a_hydro
[
2
]
=
a_tot
[
2
];
p
->
gpart
->
a_grav
[
0
]
=
a_tot
[
0
];
p
->
gpart
->
a_grav
[
1
]
=
a_tot
[
1
];
p
->
gpart
->
a_grav
[
2
]
=
a_tot
[
2
];
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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