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
b57dd387
Commit
b57dd387
authored
9 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Minimal SPH also moved to integer timeline
parent
095b5eda
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!136
Master
,
!94
Integer timeline
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/hydro/Minimal/hydro.h
+7
-5
7 additions, 5 deletions
src/hydro/Minimal/hydro.h
src/hydro/Minimal/hydro_debug.h
+3
-3
3 additions, 3 deletions
src/hydro/Minimal/hydro_debug.h
src/hydro/Minimal/hydro_part.h
+2
-2
2 additions, 2 deletions
src/hydro/Minimal/hydro_part.h
with
12 additions
and
10 deletions
src/hydro/Minimal/hydro.h
+
7
−
5
View file @
b57dd387
...
...
@@ -116,10 +116,11 @@ __attribute__((always_inline))
*
* @param p The particle to act upon
* @param xp The extended particle data to act upon
* @param time The current time
* @param ti_current The current time (on the timeline)
* @param timeBase The minimal time-step size
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_prepare_force
(
struct
part
*
p
,
struct
xpart
*
xp
,
float
tim
e
)
{
struct
part
*
p
,
struct
xpart
*
xp
,
int
ti_current
,
double
timeBas
e
)
{
p
->
force
.
pressure
=
p
->
rho
*
p
->
u
*
(
const_hydro_gamma
-
1
.
f
);
}
...
...
@@ -154,11 +155,12 @@ __attribute__((always_inline))
*
* @param p The particle
* @param xp The extended data of the particle
* @param t0 The time at the start of the drift
* @param t1 The time at the end of the drift
* @param t0 The time at the start of the drift (on the timeline)
* @param t1 The time at the end of the drift (on the timeline)
* @param timeBase The minimal time-step size
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_predict_extra
(
struct
part
*
p
,
struct
xpart
*
xp
,
floa
t
t0
,
float
t1
)
{
struct
part
*
p
,
struct
xpart
*
xp
,
in
t
t0
,
int
t1
,
double
timeBase
)
{
const
float
dt
=
t1
-
t0
;
...
...
This diff is collapsed.
Click to expand it.
src/hydro/Minimal/hydro_debug.h
+
3
−
3
View file @
b57dd387
...
...
@@ -24,10 +24,10 @@ __attribute__((always_inline))
"v=[%.3e,%.3e,%.3e],v_full=[%.3e,%.3e,%.3e]
\n
a=[%.3e,%.3e,%.3e], "
"u_full=%.3e, u=%.3e, du/dt=%.3e v_sig=%.3e, P=%.3e
\n
"
"h=%.3e, dh/dt=%.3e "
"wcount=%d, m=%.3e, dh_drho=%.3e, rho=%.3e, t_begin=%
.3e
, t_end=%
.3e
\n
"
,
"wcount=%d, m=%.3e, dh_drho=%.3e, rho=%.3e, t_begin=%
d
, t_end=%
d
\n
"
,
p
->
x
[
0
],
p
->
x
[
1
],
p
->
x
[
2
],
p
->
v
[
0
],
p
->
v
[
1
],
p
->
v
[
2
],
xp
->
v_full
[
0
],
xp
->
v_full
[
1
],
xp
->
v_full
[
2
],
p
->
a_hydro
[
0
],
p
->
a_hydro
[
1
],
p
->
a_hydro
[
2
],
xp
->
u_full
,
p
->
u
,
p
->
u_dt
,
p
->
force
.
v_sig
,
p
->
force
.
pressure
,
p
->
h
,
p
->
h_dt
,
(
int
)
p
->
density
.
wcount
,
p
->
mass
,
p
->
rho_dh
,
p
->
rho
,
p
->
t_begin
,
p
->
t_end
);
p
->
h_dt
,
(
int
)
p
->
density
.
wcount
,
p
->
mass
,
p
->
rho_dh
,
p
->
rho
,
p
->
t
i
_begin
,
p
->
t
i
_end
);
}
This diff is collapsed.
Click to expand it.
src/hydro/Minimal/hydro_part.h
+
2
−
2
View file @
b57dd387
...
...
@@ -55,9 +55,9 @@ struct part {
float
h_dt
;
/*!< Time derivative of smoothing length */
floa
t
t_begin
;
/*!< Time at the beginning of time-step. */
in
t
t
i
_begin
;
/*!< Time at the beginning of time-step. */
floa
t
t_end
;
/*!< Time at the end of time-step. */
in
t
t
i
_end
;
/*!< Time at the end of time-step. */
float
u
;
/*!< Particle internal energy. */
...
...
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