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
50678501
Commit
50678501
authored
7 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Code formatting
parent
c46d0c91
No related branches found
No related tags found
1 merge request
!524
Improvements to GIZMO implementation
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/hydro/Gizmo/hydro_unphysical.h
+2
-2
2 additions, 2 deletions
src/hydro/Gizmo/hydro_unphysical.h
src/riemann/riemann_hllc.h
+8
-5
8 additions, 5 deletions
src/riemann/riemann_hllc.h
with
10 additions
and
7 deletions
src/hydro/Gizmo/hydro_unphysical.h
+
2
−
2
View file @
50678501
...
...
@@ -41,9 +41,9 @@
#endif
#define gizmo_check_physical_quantity(name, quantity) \
if (quantity < 0.f) {
\
if (quantity < 0.f) { \
gizmo_unphysical_message(name, quantity); \
quantity = 0.f;
\
quantity = 0.f; \
}
#else // defined(GIZMO_UNPHYSICAL_ERROR) || defined(GIZMO_UNPHYSICAL_RESCUE)
...
...
This diff is collapsed.
Click to expand it.
src/riemann/riemann_hllc.h
+
8
−
5
View file @
50678501
...
...
@@ -73,17 +73,20 @@ __attribute__((always_inline)) INLINE static void riemann_solve_for_flux(
float
qL
=
1
.
f
;
if
(
pstar
>
WL
[
4
])
{
qL
=
sqrtf
(
1
.
f
+
0
.
5
f
*
hydro_gamma_plus_one
*
hydro_one_over_gamma
*
(
pstar
/
WL
[
4
]
-
1
.
f
));
0
.
5
f
*
hydro_gamma_plus_one
*
hydro_one_over_gamma
*
(
pstar
/
WL
[
4
]
-
1
.
f
));
}
float
qR
=
1
.
f
;
if
(
pstar
>
WR
[
4
])
{
qR
=
sqrtf
(
1
.
f
+
0
.
5
f
*
hydro_gamma_plus_one
*
hydro_one_over_gamma
*
(
pstar
/
WR
[
4
]
-
1
.
f
));
0
.
5
f
*
hydro_gamma_plus_one
*
hydro_one_over_gamma
*
(
pstar
/
WR
[
4
]
-
1
.
f
));
}
const
float
SL
=
uL
-
aL
*
qL
;
const
float
SR
=
uR
+
aR
*
qR
;
const
float
Sstar
=
(
WR
[
4
]
-
WL
[
4
]
+
WL
[
0
]
*
uL
*
(
SL
-
uL
)
-
WR
[
0
]
*
uR
*
(
SR
-
uR
))
/
(
WL
[
0
]
*
(
SL
-
uL
)
-
WR
[
0
]
*
(
SR
-
uR
));
const
float
Sstar
=
(
WR
[
4
]
-
WL
[
4
]
+
WL
[
0
]
*
uL
*
(
SL
-
uL
)
-
WR
[
0
]
*
uR
*
(
SR
-
uR
))
/
(
WL
[
0
]
*
(
SL
-
uL
)
-
WR
[
0
]
*
(
SR
-
uR
));
/* STEP 3: HLLC flux in a frame moving with the interface velocity */
if
(
Sstar
>=
0
.
f
)
{
...
...
@@ -157,7 +160,7 @@ __attribute__((always_inline)) INLINE static void riemann_solve_for_flux(
}
}
/* deboost to lab frame we add the flux contribution due to the
/* deboost to lab frame we add the flux contribution due to the
movement of the interface the density flux is unchanged
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 */
...
...
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