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
40f339b9
Commit
40f339b9
authored
May 03, 2019
by
Matthieu Schaller
Browse files
Post-rebase fixes
parent
f8cfc4e6
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
src/cell.c
View file @
40f339b9
This diff is collapsed.
Click to expand it.
src/engine_maketasks.c
View file @
40f339b9
...
...
@@ -287,10 +287,11 @@ void engine_addtasks_send_stars(struct engine *e, struct cell *ci,
scheduler_addunlock
(
s
,
ci
->
top
->
hydro
.
star_formation
,
t_sf_counts
);
}
engine_addlink
(
e
,
&
ci
->
mpi
.
send
,
t_feedback
);
engine_addlink
(
e
,
&
ci
->
mpi
.
send
,
t_ti
);
if
(
with_star_formation
)
{
engine_addlink
(
e
,
&
ci
->
mpi
.
send
,
t_sf_counts
);
engine_addlink
(
e
,
&
ci
->
mpi
.
send
,
t_feedback
);
engine_addlink
(
e
,
&
ci
->
mpi
.
send
,
t_ti
);
if
(
with_star_formation
)
{
engine_addlink
(
e
,
&
ci
->
mpi
.
send
,
t_sf_counts
);
}
}
}
...
...
@@ -298,7 +299,7 @@ void engine_addtasks_send_stars(struct engine *e, struct cell *ci,
if
(
ci
->
split
)
for
(
int
k
=
0
;
k
<
8
;
k
++
)
if
(
ci
->
progeny
[
k
]
!=
NULL
)
engine_addtasks_send_stars
(
e
,
ci
->
progeny
[
k
],
cj
,
t_feedback
,
engine_addtasks_send_stars
(
e
,
ci
->
progeny
[
k
],
cj
,
t_feedback
,
t_sf_counts
,
t_ti
,
with_star_formation
);
#else
...
...
@@ -512,9 +513,9 @@ void engine_addtasks_recv_stars(struct engine *e, struct cell *c,
if
(
t_feedback
!=
NULL
)
{
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_feedback
);
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_ti
);
if
(
with_star_formation
&&
c
->
hydro
.
count
>
0
)
{
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_sf_counts
);
}
if
(
with_star_formation
&&
c
->
hydro
.
count
>
0
)
{
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_sf_counts
);
}
#ifdef SWIFT_DEBUG_CHECKS
if
(
c
->
nodeID
==
e
->
nodeID
)
error
(
"Local cell!"
);
...
...
@@ -536,7 +537,7 @@ void engine_addtasks_recv_stars(struct engine *e, struct cell *c,
if
(
c
->
split
)
for
(
int
k
=
0
;
k
<
8
;
k
++
)
if
(
c
->
progeny
[
k
]
!=
NULL
)
engine_addtasks_recv_stars
(
e
,
c
->
progeny
[
k
],
t_feedback
,
t_sf_counts
,
engine_addtasks_recv_stars
(
e
,
c
->
progeny
[
k
],
t_feedback
,
t_sf_counts
,
t_ti
,
with_star_formation
);
#else
...
...
@@ -2464,6 +2465,13 @@ void engine_addtasks_send_mapper(void *map_data, int num_elements,
/*t_sf_counts=*/
NULL
,
/*t_ti=*/
NULL
,
with_star_formation
);
/* Add the send tasks for the cells in the proxy that have a black holes
* connection. */
if
((
e
->
policy
&
engine_policy_black_holes
)
&&
(
type
&
proxy_cell_type_hydro
))
engine_addtasks_send_black_holes
(
e
,
ci
,
cj
,
/*t_feedback=*/
NULL
,
/*t_ti=*/
NULL
);
/* Add the send tasks for the cells in the proxy that have a gravity
* connection. */
if
((
e
->
policy
&
engine_policy_self_gravity
)
&&
...
...
@@ -2496,6 +2504,11 @@ void engine_addtasks_recv_mapper(void *map_data, int num_elements,
/*t_sf_counts=*/
NULL
,
/*t_ti=*/
NULL
,
with_star_formation
);
/* Add the recv tasks for the cells in the proxy that have a black holes
* connection. */
if
((
e
->
policy
&
engine_policy_feedback
)
&&
(
type
&
proxy_cell_type_hydro
))
engine_addtasks_recv_black_holes
(
e
,
ci
,
NULL
,
NULL
);
/* Add the recv tasks for the cells in the proxy that have a gravity
* connection. */
if
((
e
->
policy
&
engine_policy_self_gravity
)
&&
...
...
src/space.c
View file @
40f339b9
...
...
@@ -4245,6 +4245,7 @@ void space_first_init_bparts_mapper(void *restrict map_data, int count,
struct
bpart
*
restrict
bp
=
(
struct
bpart
*
)
map_data
;
const
struct
space
*
restrict
s
=
(
struct
space
*
)
extra_data
;
const
struct
engine
*
e
=
s
->
e
;
const
struct
black_holes_props
*
props
=
e
->
black_holes_properties
;
#ifdef SWIFT_DEBUG_CHECKS
const
ptrdiff_t
delta
=
bp
-
s
->
bparts
;
...
...
@@ -4278,10 +4279,17 @@ void space_first_init_bparts_mapper(void *restrict map_data, int count,
#endif
}
/* Check that the smoothing lengths are non-zero */
for
(
int
k
=
0
;
k
<
count
;
k
++
)
{
if
(
bp
[
k
].
h
<=
0
.)
error
(
"Invalid value of smoothing length for bpart %lld h=%e"
,
bp
[
k
].
id
,
bp
[
k
].
h
);
}
/* Initialise the rest */
for
(
int
k
=
0
;
k
<
count
;
k
++
)
{
black_holes_first_init_bpart
(
&
bp
[
k
]);
black_holes_first_init_bpart
(
&
bp
[
k
]
,
props
);
#ifdef SWIFT_DEBUG_CHECKS
if
(
bp
[
k
].
gpart
&&
bp
[
k
].
gpart
->
id_or_neg_offset
!=
-
(
k
+
delta
))
...
...
src/task.c
View file @
40f339b9
...
...
@@ -99,8 +99,8 @@ const char *subtaskID_names[task_subtype_count] = {
"limiter"
,
"grav"
,
"external_grav"
,
"tend_part"
,
"tend_gpart"
,
"tend_spart"
,
"tend_bpart"
,
"xv"
,
"rho"
,
"gpart"
,
"multipole"
,
"spart"
,
"stars_density"
,
"stars_feedback"
,
"sf_count"
,
"bpart
"
,
"bh_density
"
,
"bh_feedback"
};
"stars_density"
,
"stars_feedback"
,
"sf_count"
,
"bpart"
,
"bh_density"
,
"bh_feedback"
};
#ifdef WITH_MPI
/* MPI communicators for the subtypes. */
...
...
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