Commit c07c0c94 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Code formatting and uninitialization fix.

parent da341848
......@@ -305,8 +305,8 @@ static void dumpCells_map(struct cell *c, void *data) {
/* Only cells with particles are dumped. */
if (c->count > 0 || c->gcount > 0 || c->scount > 0) {
/* In MPI mode we may only output cells with foreign partners.
* These define the edges of the partitions. */
/* In MPI mode we may only output cells with foreign partners.
* These define the edges of the partitions. */
int ismpiactive = 0;
#if WITH_MPI
ismpiactive = (c->send_xv != NULL);
......@@ -326,7 +326,8 @@ static void dumpCells_map(struct cell *c, void *data) {
/* So output local super cells that are active and have MPI
* tasks as requested. */
if (c->nodeID == e->nodeID && (!super ||(super && c->super == c)) && active && mpiactive) {
if (c->nodeID == e->nodeID && (!super || (super && c->super == c)) &&
active && mpiactive) {
/* If requested we work out how many particles are active in this cell. */
int pactcount = 0;
......@@ -370,8 +371,8 @@ static void dumpCells_map(struct cell *c, void *data) {
* @param rank node ID of MPI rank, or 0 if not relevant.
* @param step the current engine step, or some unique integer.
*/
void dumpCells(const char *prefix, int super, int active, int mpiactive, int pactive,
struct space *s, int rank, int step) {
void dumpCells(const char *prefix, int super, int active, int mpiactive,
int pactive, struct space *s, int rank, int step) {
FILE *file = NULL;
......
......@@ -4431,8 +4431,8 @@ void engine_step(struct engine *e) {
/* Print the number of active tasks ? */
if (e->verbose) engine_print_task_counts(e);
/* Dump local cells and active particle counts. */
/* dumpCells("cells", 0, 0, 0, 0, e->s, e->nodeID, e->step); */
/* Dump local cells and active particle counts. */
/* dumpCells("cells", 0, 0, 0, 0, e->s, e->nodeID, e->step); */
#ifdef SWIFT_DEBUG_CHECKS
/* Check that we have the correct total mass in the top-level multipoles */
......
......@@ -410,7 +410,7 @@ void gravity_exact_force_compute_mapper(void *map_data, int nr_gparts,
struct gpart *gpi = &gparts[i];
long long id;
long long id = 0;
if (gpi->type == swift_type_gas)
id = parts[-gpi->id_or_neg_offset].id;
else if (gpi->type == swift_type_star)
......@@ -597,7 +597,7 @@ void gravity_exact_force_check(struct space *s, const struct engine *e,
struct gpart *gpi = &s->gparts[i];
long long id;
long long id = 0;
if (gpi->type == swift_type_gas)
id = parts[-gpi->id_or_neg_offset].id;
else if (gpi->type == swift_type_star)
......@@ -648,7 +648,7 @@ void gravity_exact_force_check(struct space *s, const struct engine *e,
struct gpart *gpi = &s->gparts[i];
long long id;
long long id = 0;
if (gpi->type == swift_type_gas)
id = parts[-gpi->id_or_neg_offset].id;
else if (gpi->type == swift_type_star)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment