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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
f4985653
Commit
f4985653
authored
9 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Propagate the part's kicked velocity to its gpart counter-part
parent
d97b013c
No related branches found
No related tags found
1 merge request
!135
First implementation of gpart motion
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/runner.c
+7
-1
7 additions, 1 deletion
src/runner.c
with
7 additions
and
1 deletion
src/runner.c
+
7
−
1
View file @
f4985653
...
...
@@ -961,6 +961,12 @@ void runner_dokick(struct runner *r, struct cell *c, int timer) {
xp
->
v_full
[
1
]
+=
a_tot
[
1
]
*
dt
;
xp
->
v_full
[
2
]
+=
a_tot
[
2
]
*
dt
;
if
(
p
->
gpart
!=
NULL
)
{
p
->
gpart
->
v_full
[
0
]
=
xp
->
v_full
[
0
];
p
->
gpart
->
v_full
[
1
]
=
xp
->
v_full
[
1
];
p
->
gpart
->
v_full
[
2
]
=
xp
->
v_full
[
2
];
}
/* Go back by half-step for the hydro velocity */
p
->
v
[
0
]
=
xp
->
v_full
[
0
]
-
half_dt
*
a_tot
[
0
];
p
->
v
[
1
]
=
xp
->
v_full
[
1
]
-
half_dt
*
a_tot
[
1
];
...
...
@@ -1020,7 +1026,7 @@ void runner_dokick(struct runner *r, struct cell *c, int timer) {
/* And aggregate */
updated
+=
cp
->
updated
;
g_updated
+=
cp
->
g_updated
;
g_updated
+=
cp
->
g_updated
;
e_kin
+=
cp
->
e_kin
;
e_int
+=
cp
->
e_int
;
e_pot
+=
cp
->
e_pot
;
...
...
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
register
or
sign in
to comment