From bae5999025d7df7b860c314909865ef101f33bb1 Mon Sep 17 00:00:00 2001 From: loikki <loic.hausammann@protonmail.ch> Date: Sun, 16 Jun 2019 19:36:41 +0200 Subject: [PATCH] Format --- src/runner.c | 10 +++++----- src/runner_doiact.h | 10 +++++----- src/space.c | 3 ++- src/star_formation/GEAR/star_formation_logger.h | 12 ++++++------ .../GEAR/star_formation_logger_struct.h | 1 - 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/runner.c b/src/runner.c index 6e562f1fe9..644d7f6171 100644 --- a/src/runner.c +++ b/src/runner.c @@ -2387,16 +2387,16 @@ void runner_do_ghost(struct runner *r, struct cell *c, int timer) { /* Left or right? */ if (l->t->ci == finger) runner_dopair_subset_branch_density(r, finger, parts, pid, - count, l->t->cj); + count, l->t->cj); else runner_dopair_subset_branch_density(r, finger, parts, pid, - count, l->t->ci); + count, l->t->ci); } /* Otherwise, sub-self interaction? */ else if (l->t->type == task_type_sub_self) runner_dosub_subset_density(r, finger, parts, pid, count, NULL, - 1); + 1); /* Otherwise, sub-pair interaction? */ else if (l->t->type == task_type_sub_pair) { @@ -2404,10 +2404,10 @@ void runner_do_ghost(struct runner *r, struct cell *c, int timer) { /* Left or right? */ if (l->t->ci == finger) runner_dosub_subset_density(r, finger, parts, pid, count, - l->t->cj, 1); + l->t->cj, 1); else runner_dosub_subset_density(r, finger, parts, pid, count, - l->t->ci, 1); + l->t->ci, 1); } } } diff --git a/src/runner_doiact.h b/src/runner_doiact.h index 28f001fb32..1a39c8d49f 100644 --- a/src/runner_doiact.h +++ b/src/runner_doiact.h @@ -665,8 +665,8 @@ void DOPAIR_SUBSET_NAIVE(struct runner *r, struct cell *restrict ci, */ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci, struct part *restrict parts_i, int *restrict ind, int count, - struct cell *restrict cj, const int sid, const int flipped, - const double *shift) { + struct cell *restrict cj, const int sid, const int flipped, + const double *shift) { const struct engine *e = r->e; const struct cosmology *cosmo = e->cosmology; @@ -2437,7 +2437,7 @@ void DOSUB_SELF2(struct runner *r, struct cell *ci, int gettimer) { } void DOSUB_SUBSET(struct runner *r, struct cell *ci, struct part *parts, - int *ind, int count, struct cell *cj, int gettimer) { + int *ind, int count, struct cell *cj, int gettimer) { const struct engine *e = r->e; struct space *s = e->s; @@ -2501,10 +2501,10 @@ void DOSUB_SUBSET(struct runner *r, struct cell *ci, struct part *parts, const int pjd = csp->pairs[k].pjd; if (ci->progeny[pid] == sub && cj->progeny[pjd] != NULL) DOSUB_SUBSET(r, ci->progeny[pid], parts, ind, count, cj->progeny[pjd], - 0); + 0); if (ci->progeny[pid] != NULL && cj->progeny[pjd] == sub) DOSUB_SUBSET(r, cj->progeny[pjd], parts, ind, count, ci->progeny[pid], - 0); + 0); } } diff --git a/src/space.c b/src/space.c index aa04571c91..49c7147437 100644 --- a/src/space.c +++ b/src/space.c @@ -4082,7 +4082,8 @@ void space_first_init_parts_mapper(void *restrict map_data, int count, chemistry_first_init_part(phys_const, us, cosmo, chemistry, &p[k], &xp[k]); /* Also initialise the star formation */ - star_formation_first_init_part(phys_const, us, cosmo, star_formation, &p[k], &xp[k]); + star_formation_first_init_part(phys_const, us, cosmo, star_formation, &p[k], + &xp[k]); /* And the cooling */ cooling_first_init_part(phys_const, us, cosmo, cool_func, &p[k], &xp[k]); diff --git a/src/star_formation/GEAR/star_formation_logger.h b/src/star_formation/GEAR/star_formation_logger.h index 3c699d26c5..22a65eed8f 100644 --- a/src/star_formation/GEAR/star_formation_logger.h +++ b/src/star_formation/GEAR/star_formation_logger.h @@ -30,7 +30,6 @@ #include "star_formation_logger_struct.h" #include "units.h" - /** * @brief Update the stellar quantities in the current cell after creating * the new star particle spart sp. @@ -48,7 +47,8 @@ INLINE static void star_formation_logger_log_new_spart( /* Increase the number of stars */ sf->number_of_stars += 1; - /* No need to deal with the integrated quantities, only the engine's one is updated */ + /* No need to deal with the integrated quantities, only the engine's one is + * updated */ } /** @@ -65,7 +65,6 @@ INLINE static void star_formation_logger_log_inactive_cell( /* initialize number of stars to zero*/ sf->number_of_stars = 0; - } /** * @brief Initialize the star formation history structure in the #engine @@ -131,7 +130,6 @@ INLINE static void star_formation_logger_add_to_engine( sf_update->new_stellar_mass += sf_add->new_stellar_mass; sf_update->total_number_stars += sf_add->number_new_stars; sf_update->total_stellar_mass += sf_add->new_stellar_mass; - } /** @@ -149,7 +147,8 @@ INLINE static void star_formation_logger_write_to_log_file( struct star_formation_history sf, const int step) { fprintf(fp, "%6d %16e %12.7f %14e %14ld %14e %14ld %14e\n", step, time, a, z, - sf.total_number_stars, sf.total_stellar_mass, sf.number_new_stars, sf.new_stellar_mass); + sf.total_number_stars, sf.total_stellar_mass, sf.number_new_stars, + sf.new_stellar_mass); } /** * @brief Initialize the SFH logger file @@ -182,7 +181,8 @@ INLINE static void star_formation_logger_init_log_file( fprintf(fp, "# Unit = %e gram\n", us->UnitMass_in_cgs); fprintf(fp, "# Unit = %e solar mass\n", 1.f / phys_const->const_solar_mass); - fprintf(fp, "# (6) Number of stars formed in the current time step (no unit).\n"); + fprintf(fp, + "# (6) Number of stars formed in the current time step (no unit).\n"); fprintf(fp, "# (7) Mass of stars formed in the current time step.\n"); fprintf(fp, "# Unit = %e gram\n", us->UnitMass_in_cgs); fprintf(fp, "# Unit = %e solar mass\n", diff --git a/src/star_formation/GEAR/star_formation_logger_struct.h b/src/star_formation/GEAR/star_formation_logger_struct.h index 7939bb12eb..718066fd61 100644 --- a/src/star_formation/GEAR/star_formation_logger_struct.h +++ b/src/star_formation/GEAR/star_formation_logger_struct.h @@ -35,7 +35,6 @@ struct star_formation_history { /*! Number of stars created in this timestep */ long int number_new_stars; - }; #endif /* SWIFT_GEAR_STAR_FORMATION_LOGGER_STRUCT_H */ -- GitLab