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
6264dfea
Commit
6264dfea
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
No unnecessary parameters
parent
2b8b4e50
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!301
New time line
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/drift.h
+1
-1
1 addition, 1 deletion
src/drift.h
src/hydro/Gadget2/hydro.h
+2
-4
2 additions, 4 deletions
src/hydro/Gadget2/hydro.h
src/runner.c
+1
-3
1 addition, 3 deletions
src/runner.c
with
4 additions
and
8 deletions
src/drift.h
+
1
−
1
View file @
6264dfea
...
...
@@ -87,7 +87,7 @@ __attribute__((always_inline)) INLINE static void drift_part(
p
->
v
[
2
]
+=
p
->
a_hydro
[
2
]
*
dt
;
/* Predict the values of the extra fields */
hydro_predict_extra
(
p
,
xp
,
dt
,
ti_old
,
ti_current
,
timeBase
);
hydro_predict_extra
(
p
,
xp
,
dt
);
/* Compute offset since last cell construction */
xp
->
x_diff
[
0
]
-=
xp
->
v_full
[
0
]
*
dt
;
...
...
This diff is collapsed.
Click to expand it.
src/hydro/Gadget2/hydro.h
+
2
−
4
View file @
6264dfea
...
...
@@ -271,8 +271,7 @@ __attribute__((always_inline)) INLINE static void hydro_end_density(
* @param timeBase The minimal time-step size
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_prepare_force
(
struct
part
*
restrict
p
,
struct
xpart
*
restrict
xp
,
integertime_t
ti_current
,
double
timeBase
)
{
struct
part
*
restrict
p
,
struct
xpart
*
restrict
xp
)
{
const
float
fac_mu
=
1
.
f
;
/* Will change with cosmological integration */
...
...
@@ -363,8 +362,7 @@ __attribute__((always_inline)) INLINE static void hydro_reset_predicted_values(
* @param timeBase The minimal time-step size
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_predict_extra
(
struct
part
*
restrict
p
,
const
struct
xpart
*
restrict
xp
,
float
dt
,
integertime_t
t0
,
integertime_t
t1
,
double
timeBase
)
{
struct
part
*
restrict
p
,
const
struct
xpart
*
restrict
xp
,
float
dt
)
{
const
float
h_inv
=
1
.
f
/
p
->
h
;
...
...
This diff is collapsed.
Click to expand it.
src/runner.c
+
1
−
3
View file @
6264dfea
...
...
@@ -592,8 +592,6 @@ void runner_do_ghost(struct runner *r, struct cell *c, int timer) {
struct
xpart
*
restrict
xparts
=
c
->
xparts
;
int
redo
,
count
=
c
->
count
;
const
struct
engine
*
e
=
r
->
e
;
const
integertime_t
ti_current
=
e
->
ti_current
;
const
double
timeBase
=
e
->
timeBase
;
const
float
target_wcount
=
e
->
hydro_properties
->
target_neighbours
;
const
float
max_wcount
=
target_wcount
+
e
->
hydro_properties
->
delta_neighbours
;
...
...
@@ -675,7 +673,7 @@ void runner_do_ghost(struct runner *r, struct cell *c, int timer) {
/* As of here, particle force variables will be set. */
/* Compute variables required for the force loop */
hydro_prepare_force
(
p
,
xp
,
ti_current
,
timeBase
);
hydro_prepare_force
(
p
,
xp
);
/* The particle force values are now set. Do _NOT_
try to read any particle density variables! */
...
...
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