Skip to content
Snippets Groups Projects
Commit 67b26903 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Links are correct. No need to comment this out.

parent 96d0e818
No related branches found
No related tags found
1 merge request!143Gravity particles
...@@ -481,7 +481,7 @@ void cell_split(struct cell *c) { ...@@ -481,7 +481,7 @@ void cell_split(struct cell *c) {
c->progeny[k]->xparts = &c->xparts[left[k]]; c->progeny[k]->xparts = &c->xparts[left[k]];
} }
/* Re-link the gparts. THIS IS BROKEN BUT NEEDS MENDING J & T */ /* Re-link the gparts. */
for (int k = 0; k < count; k++) for (int k = 0; k < count; k++)
if (parts[k].gpart != NULL) parts[k].gpart->part = &parts[k]; if (parts[k].gpart != NULL) parts[k].gpart->part = &parts[k];
...@@ -574,11 +574,10 @@ void cell_split(struct cell *c) { ...@@ -574,11 +574,10 @@ void cell_split(struct cell *c) {
c->progeny[k]->gcount = right[k] - left[k] + 1; c->progeny[k]->gcount = right[k] - left[k] + 1;
c->progeny[k]->gparts = &c->gparts[left[k]]; c->progeny[k]->gparts = &c->gparts[left[k]];
} }
#ifdef LINK
/* Re-link the parts. */ /* Re-link the parts. */
for (int k = 0; k < gcount; k++) for (int k = 0; k < gcount; k++)
if (gparts[k].id > 0) gparts[k].part->gpart = &gparts[k]; if (gparts[k].id > 0) gparts[k].part->gpart = &gparts[k];
#endif
} }
/** /**
...@@ -591,11 +590,7 @@ void cell_init_parts(struct cell *c, void *data) { ...@@ -591,11 +590,7 @@ void cell_init_parts(struct cell *c, void *data) {
struct part *p = c->parts; struct part *p = c->parts;
struct xpart *xp = c->xparts; struct xpart *xp = c->xparts;
int count = c->gcount; const int count = c->count;
if(!count) count = c->count;
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
p[i].ti_begin = 0; p[i].ti_begin = 0;
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment