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
c8233de4
Commit
c8233de4
authored
6 years ago
by
Josh Borrow
Committed by
Matthieu Schaller
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix gizmo compilation
parent
b4786d13
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/proxy.c
+2
-2
2 additions, 2 deletions
src/proxy.c
src/runner.c
+33
-19
33 additions, 19 deletions
src/runner.c
with
35 additions
and
21 deletions
src/proxy.c
+
2
−
2
View file @
c8233de4
...
...
@@ -106,8 +106,8 @@ void proxy_tags_exchange(struct proxy *proxies, int num_proxies,
num_reqs_in
+=
proxies
[
k
].
nr_cells_in
;
num_reqs_out
+=
proxies
[
k
].
nr_cells_out
;
}
MPI_Request
*
reqs_in
;
int
*
cids_in
;
MPI_Request
*
reqs_in
=
NULL
;
int
*
cids_in
=
NULL
;
if
((
reqs_in
=
(
MPI_Request
*
)
malloc
(
sizeof
(
MPI_Request
)
*
(
num_reqs_in
+
num_reqs_out
)))
==
NULL
||
(
cids_in
=
(
int
*
)
malloc
(
sizeof
(
int
)
*
(
num_reqs_in
+
num_reqs_out
)))
==
...
...
This diff is collapsed.
Click to expand it.
src/runner.c
+
33
−
19
View file @
c8233de4
...
...
@@ -643,6 +643,7 @@ void runner_do_extra_ghost(struct runner *r, struct cell *c, int timer) {
const
int
count
=
c
->
count
;
const
struct
engine
*
e
=
r
->
e
;
const
integertime_t
ti_end
=
e
->
ti_current
;
const
int
with_cosmology
=
(
e
->
policy
&
engine_policy_cosmology
);
const
double
time_base
=
e
->
time_base
;
const
struct
cosmology
*
cosmo
=
e
->
cosmology
;
...
...
@@ -665,9 +666,15 @@ void runner_do_extra_ghost(struct runner *r, struct cell *c, int timer) {
struct
xpart
*
restrict
xp
=
&
xparts
[
i
];
if
(
part_is_active
(
p
,
e
))
{
/* Calculate the time-step for passing to hydro_prepare_force, used for
* the evolution of alpha factors (i.e. those involved in the artificial
* viscosity and thermal conduction terms) */
/* Finish the gradient calculation */
hydro_end_gradient
(
p
);
/* As of here, particle force variables will be set. */
/* Calculate the time-step for passing to hydro_prepare_force.
* This is the physical time between the start and end of the time-step
* without any scale-factor powers. */
double
dt_alpha
;
if
(
with_cosmology
)
{
const
integertime_t
ti_step
=
get_integer_timestep
(
p
->
time_bin
);
...
...
@@ -676,11 +683,6 @@ void runner_do_extra_ghost(struct runner *r, struct cell *c, int timer) {
dt_alpha
=
get_timestep
(
p
->
time_bin
,
time_base
);
}
/* Finish the gradient calculation */
hydro_end_gradient
(
p
);
/* As of here, particle force variables will be set. */
/* Compute variables required for the force loop */
hydro_prepare_force
(
p
,
xp
,
cosmo
,
dt_alpha
);
...
...
@@ -774,17 +776,6 @@ void runner_do_ghost(struct runner *r, struct cell *c, int timer) {
float
h_new
;
int
has_no_neighbours
=
0
;
/* Calculate the time-step for passing to hydro_prepare_force, used for
* the evolution of alpha factors (i.e. those involved in the artificial
* viscosity and thermal conduction terms) */
double
dt_alpha
;
if
(
with_cosmology
)
{
const
integertime_t
ti_step
=
get_integer_timestep
(
p
->
time_bin
);
dt_alpha
=
cosmology_get_delta_time
(
cosmo
,
ti_end
-
ti_step
,
ti_end
);
}
else
{
dt_alpha
=
get_timestep
(
p
->
time_bin
,
time_base
);
}
if
(
p
->
density
.
wcount
==
0
.
f
)
{
/* No neighbours case */
/* Flag that there were no neighbours */
...
...
@@ -831,6 +822,18 @@ void runner_do_ghost(struct runner *r, struct cell *c, int timer) {
#else
/* As of here, particle force variables will be set. */
/* Calculate the time-step for passing to hydro_prepare_force.
* This is the physical time between the start and end of the
* time-step without any scale-factor powers. */
double
dt_alpha
;
if
(
with_cosmology
)
{
const
integertime_t
ti_step
=
get_integer_timestep
(
p
->
time_bin
);
dt_alpha
=
cosmology_get_delta_time
(
cosmo
,
ti_end
-
ti_step
,
ti_end
);
}
else
{
dt_alpha
=
get_timestep
(
p
->
time_bin
,
time_base
);
}
/* Compute variables required for the force loop */
hydro_prepare_force
(
p
,
xp
,
cosmo
,
dt_alpha
);
...
...
@@ -913,6 +916,17 @@ void runner_do_ghost(struct runner *r, struct cell *c, int timer) {
#else
/* As of here, particle force variables will be set. */
/* Calculate the time-step for passing to hydro_prepare_force.
* This is the physical time between the start and end of the time-step
* without any scale-factor powers. */
double
dt_alpha
;
if
(
with_cosmology
)
{
const
integertime_t
ti_step
=
get_integer_timestep
(
p
->
time_bin
);
dt_alpha
=
cosmology_get_delta_time
(
cosmo
,
ti_end
-
ti_step
,
ti_end
);
}
else
{
dt_alpha
=
get_timestep
(
p
->
time_bin
,
time_base
);
}
/* Compute variables required for the force loop */
hydro_prepare_force
(
p
,
xp
,
cosmo
,
dt_alpha
);
...
...
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