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
c5918242
Commit
c5918242
authored
Nov 06, 2016
by
Pedro Gonnet
Browse files
leave some buffer in the ind and gind arrays in case we get more strays than we lose.
parent
6d749362
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/space.c
View file @
c5918242
...
...
@@ -453,14 +453,14 @@ void space_rebuild(struct space *s, int verbose) {
const
int
ti_current
=
(
s
->
e
!=
NULL
)
?
s
->
e
->
ti_current
:
0
;
/* Run through the particles and get their cell index. */
const
size_t
ind_size
=
s
->
size_parts
+
1
;
const
size_t
ind_size
=
s
->
size_parts
+
1
00
;
int
*
ind
;
if
((
ind
=
(
int
*
)
malloc
(
sizeof
(
int
)
*
ind_size
))
==
NULL
)
error
(
"Failed to allocate temporary particle indices."
);
if
(
ind_size
>
0
)
space_parts_get_cell_index
(
s
,
ind
,
cells_top
,
verbose
);
/* Run through the gravity particles and get their cell index. */
const
size_t
gind_size
=
s
->
size_gparts
+
1
;
const
size_t
gind_size
=
s
->
size_gparts
+
1
00
;
int
*
gind
;
if
((
gind
=
(
int
*
)
malloc
(
sizeof
(
int
)
*
gind_size
))
==
NULL
)
error
(
"Failed to allocate temporary g-particle indices."
);
...
...
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