Skip to content
Snippets Groups Projects
Commit c4dffca7 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Fix merge issue

Conflict with gparts changes
parent 7f14ce33
No related branches found
No related tags found
1 merge request!137size_t
...@@ -672,7 +672,6 @@ void runner_doghost(struct runner *r, struct cell *c) { ...@@ -672,7 +672,6 @@ void runner_doghost(struct runner *r, struct cell *c) {
*/ */
void runner_dodrift(struct runner *r, struct cell *c, int timer) { void runner_dodrift(struct runner *r, struct cell *c, int timer) {
const int nr_gparts = c->gcount;
const double timeBase = r->e->timeBase; const double timeBase = r->e->timeBase;
const double dt = (r->e->ti_current - r->e->ti_old) * timeBase; const double dt = (r->e->ti_current - r->e->ti_old) * timeBase;
const int ti_old = r->e->ti_old; const int ti_old = r->e->ti_old;
...@@ -688,8 +687,9 @@ void runner_dodrift(struct runner *r, struct cell *c, int timer) { ...@@ -688,8 +687,9 @@ void runner_dodrift(struct runner *r, struct cell *c, int timer) {
if (!c->split) { if (!c->split) {
/* Loop over all the g-particles in the cell */ /* Loop over all the g-particles in the cell */
const size_t nr_parts = c->count; const int nr_gparts = c->gcount;
for (size_t k = 0; k < nr_parts; k++) { for (size_t k = 0; k < nr_gparts; k++) {
/* Get a handle on the gpart. */ /* Get a handle on the gpart. */
struct gpart *const gp = &gparts[k]; struct gpart *const gp = &gparts[k];
...@@ -700,6 +700,8 @@ void runner_dodrift(struct runner *r, struct cell *c, int timer) { ...@@ -700,6 +700,8 @@ void runner_dodrift(struct runner *r, struct cell *c, int timer) {
} }
/* Loop over all the particles in the cell (more work for these !) */ /* Loop over all the particles in the cell (more work for these !) */
const size_t nr_parts = c->count;
for (size_t k = 0; k < nr_parts; k++) {
/* Get a handle on the part. */ /* Get a handle on the part. */
struct part *const p = &parts[k]; struct part *const p = &parts[k];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment