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
b5b6c6dc
Commit
b5b6c6dc
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Use the correct offset for the particle arrays when re-linking.
parent
9a8b7e4a
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!716
Delayed foreign allocation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cell.c
+6
-1
6 additions, 1 deletion
src/cell.c
with
6 additions
and
1 deletion
src/cell.c
+
6
−
1
View file @
b5b6c6dc
...
...
@@ -103,6 +103,11 @@ int cell_getsize(struct cell *c) {
*/
int
cell_link_parts
(
struct
cell
*
c
,
struct
part
*
parts
)
{
#ifdef SWIFT_DEBUG_CHECKS
if
(
c
->
hydro
.
parts
!=
NULL
)
error
(
"Linking parts into a cell that was already linked"
);
#endif
c
->
hydro
.
parts
=
parts
;
/* Fill the progeny recursively, depth-first. */
...
...
@@ -151,7 +156,7 @@ int cell_link_foreign_parts(struct cell *c, struct part *parts) {
int
count
=
0
;
for
(
int
k
=
0
;
k
<
8
;
k
++
)
{
if
(
c
->
progeny
[
k
]
!=
NULL
)
{
count
+=
cell_link_foreign_parts
(
c
->
progeny
[
k
],
parts
);
count
+=
cell_link_foreign_parts
(
c
->
progeny
[
k
],
&
parts
[
count
]
);
}
}
return
count
;
...
...
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