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
af1f075e
Commit
af1f075e
authored
Sep 15, 2016
by
Bert Vandenbroucke
Browse files
Fixed bug in HLLC Riemann solver flux calculation.
parent
c10ad9db
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/riemann/riemann_hllc.h
View file @
af1f075e
...
...
@@ -145,11 +145,13 @@ __attribute__((always_inline)) INLINE static void riemann_solve_for_flux(
we add the extra velocity flux due to the absolute motion of the fluid
similarly, we need to add the energy fluxes due to the absolute motion */
v2
=
vij
[
0
]
*
vij
[
0
]
+
vij
[
1
]
*
vij
[
1
]
+
vij
[
2
]
*
vij
[
2
];
// order is important: we first use the momentum fluxes to update the energy
// flux and then de-boost the momentum fluxes!
totflux
[
4
]
+=
vij
[
0
]
*
totflux
[
1
]
+
vij
[
1
]
*
totflux
[
2
]
+
vij
[
2
]
*
totflux
[
3
]
+
0
.
5
*
v2
*
totflux
[
0
];
totflux
[
1
]
+=
vij
[
0
]
*
totflux
[
0
];
totflux
[
2
]
+=
vij
[
1
]
*
totflux
[
0
];
totflux
[
3
]
+=
vij
[
2
]
*
totflux
[
0
];
totflux
[
4
]
+=
vij
[
0
]
*
totflux
[
1
]
+
vij
[
1
]
*
totflux
[
2
]
+
vij
[
2
]
*
totflux
[
3
]
+
0
.
5
*
v2
*
totflux
[
0
];
}
#endif
/* SWIFT_RIEMANN_HLLC_H */
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