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
8d48e6aa
Commit
8d48e6aa
authored
Dec 19, 2017
by
Bert Vandenbroucke
Browse files
Implemented correct drifted velocity getter for gizmo.
parent
1cefa9b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hydro/Gizmo/hydro.h
View file @
8d48e6aa
...
...
@@ -764,7 +764,17 @@ __attribute__((always_inline)) INLINE static float hydro_get_mass(
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_get_drifted_velocities
(
const
struct
part
*
restrict
p
,
const
struct
xpart
*
xp
,
float
dt
,
float
v
[
3
])
{}
float
v
[
3
])
{
if
(
p
->
conserved
.
mass
>
0
.)
{
v
[
0
]
=
p
->
primitives
.
v
[
0
]
+
p
->
conserved
.
flux
.
momentum
[
0
]
*
dt
/
p
->
conserved
.
mass
;
v
[
1
]
=
p
->
primitives
.
v
[
1
]
+
p
->
conserved
.
flux
.
momentum
[
1
]
*
dt
/
p
->
conserved
.
mass
;
v
[
2
]
=
p
->
primitives
.
v
[
2
]
+
p
->
conserved
.
flux
.
momentum
[
2
]
*
dt
/
p
->
conserved
.
mass
;
}
}
/**
* @brief Returns the density of a particle
...
...
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