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
a83b6f08
Commit
a83b6f08
authored
5 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Various small fixes related to black holes in space.c
parent
a666e8d5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/space.c
+9
-17
9 additions, 17 deletions
src/space.c
with
9 additions
and
17 deletions
src/space.c
+
9
−
17
View file @
a83b6f08
...
...
@@ -111,20 +111,6 @@ struct qstack {
volatile
int
ready
;
};
/**
* @brief Parallel particle-sorting stack
*/
struct
parallel_sort
{
struct
part
*
parts
;
struct
gpart
*
gparts
;
struct
xpart
*
xparts
;
struct
spart
*
sparts
;
int
*
ind
;
struct
qstack
*
stack
;
unsigned
int
stack_size
;
volatile
unsigned
int
first
,
last
,
waiting
;
};
/**
* @brief Information required to compute the particle cell indices.
*/
...
...
@@ -714,7 +700,7 @@ void space_allocate_extras(struct space *s, int verbose) {
/* Anything to do here? (Abort if we don't want extras)*/
if
(
space_extra_parts
==
0
&&
space_extra_gparts
==
0
&&
space_extra_sparts
==
0
)
space_extra_sparts
==
0
&&
space_extra_bparts
==
0
)
return
;
/* The top-level cells */
...
...
@@ -792,6 +778,8 @@ void space_allocate_extras(struct space *s, int verbose) {
error
(
"Reduction in top-level cells number not handled."
);
if
(
expected_num_extra_sparts
<
s
->
nr_extra_sparts
)
error
(
"Reduction in top-level cells number not handled."
);
if
(
expected_num_extra_bparts
<
s
->
nr_extra_bparts
)
error
(
"Reduction in top-level cells number not handled."
);
/* Do we have enough space for the extra gparts (i.e. we haven't used up any)
* ? */
...
...
@@ -2104,6 +2092,10 @@ void space_reorder_extras(struct space *s, int verbose) {
if
(
space_extra_sparts
)
threadpool_map
(
&
s
->
e
->
threadpool
,
space_reorder_extra_sparts_mapper
,
s
->
local_cells_top
,
s
->
nr_local_cells
,
sizeof
(
int
),
0
,
s
);
/* Re-order the black hole particles */
if
(
space_extra_bparts
)
error
(
"Missing implementation of BH extra reordering"
);
}
/**
...
...
@@ -3722,9 +3714,9 @@ void space_split_recursive(struct space *s, struct cell *c,
for
(
int
k
=
0
;
k
<
bcount
;
k
++
)
{
#ifdef SWIFT_DEBUG_CHECKS
if
(
bparts
[
k
].
time_bin
==
time_bin_not_created
)
error
(
"Extra
s
-particle present in space_split()"
);
error
(
"Extra
b
-particle present in space_split()"
);
if
(
bparts
[
k
].
time_bin
==
time_bin_inhibited
)
error
(
"Inhibited
s
-particle present in space_split()"
);
error
(
"Inhibited
b
-particle present in space_split()"
);
#endif
black_holes_time_bin_min
=
min
(
black_holes_time_bin_min
,
bparts
[
k
].
time_bin
);
...
...
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