From 3eb8340cb34c4779e8d8c437b2619d762a3c6c24 Mon Sep 17 00:00:00 2001
From: loikki <loic.hausammann@protonmail.ch>
Date: Tue, 19 Feb 2019 13:24:48 +0100
Subject: [PATCH] Format

---
 src/runner.c                                  |  5 ++--
 src/space.c                                   |  5 ++--
 src/star_formation/EAGLE/star_formation.h     | 27 ++++++++++---------
 .../EAGLE/star_formation_iact.h               | 12 +++++----
 src/star_formation/GEAR/star_formation.h      | 27 ++++++++++---------
 src/star_formation/GEAR/star_formation_iact.h | 12 +++++----
 .../GEAR/star_formation_struct.h              |  1 -
 src/star_formation/none/star_formation.h      | 27 ++++++++++---------
 src/star_formation/none/star_formation_iact.h | 12 +++++----
 src/tools.c                                   |  2 +-
 10 files changed, 70 insertions(+), 60 deletions(-)

diff --git a/src/runner.c b/src/runner.c
index 33c335fceb..d3d76d3942 100644
--- a/src/runner.c
+++ b/src/runner.c
@@ -1316,7 +1316,7 @@ void runner_do_ghost(struct runner *r, struct cell *c, int timer) {
           /* Finish the density calculation */
           hydro_end_density(p, cosmo);
           chemistry_end_density(p, chemistry, cosmo);
-	  star_formation_end_density(p, star_formation, cosmo);
+          star_formation_end_density(p, star_formation, cosmo);
 
           /* Compute one step of the Newton-Raphson scheme */
           const float n_sum = p->density.wcount * h_old_dim;
@@ -1477,7 +1477,8 @@ void runner_do_ghost(struct runner *r, struct cell *c, int timer) {
             if (has_no_neighbours) {
               hydro_part_has_no_neighbours(p, xp, cosmo);
               chemistry_part_has_no_neighbours(p, xp, chemistry, cosmo);
-              star_formation_part_has_no_neighbours(p, xp, star_formation, cosmo);
+              star_formation_part_has_no_neighbours(p, xp, star_formation,
+                                                    cosmo);
             }
           }
         }
diff --git a/src/space.c b/src/space.c
index 9faf89a610..481f3eea43 100644
--- a/src/space.c
+++ b/src/space.c
@@ -56,8 +56,8 @@
 #include "multipole.h"
 #include "restart.h"
 #include "sort_part.h"
-#include "stars.h"
 #include "star_formation.h"
+#include "stars.h"
 #include "threadpool.h"
 #include "tools.h"
 #include "tracers.h"
@@ -3406,7 +3406,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/EAGLE/star_formation.h b/src/star_formation/EAGLE/star_formation.h
index a71b874e1b..56a122bdf1 100644
--- a/src/star_formation/EAGLE/star_formation.h
+++ b/src/star_formation/EAGLE/star_formation.h
@@ -647,13 +647,13 @@ __attribute__((always_inline)) INLINE static void star_formation_end_density(
  */
 __attribute__((always_inline)) INLINE static void
 star_formation_part_has_no_neighbours(struct part* restrict p,
-                                 struct xpart* restrict xp,
-                                 const struct star_formation* cd,
-                                 const struct cosmology* cosmo) {}
+                                      struct xpart* restrict xp,
+                                      const struct star_formation* cd,
+                                      const struct cosmology* cosmo) {}
 
 /**
- * @brief Sets the star_formation properties of the (x-)particles to a valid start
- * state.
+ * @brief Sets the star_formation properties of the (x-)particles to a valid
+ * start state.
  *
  * Nothing to do here.
  *
@@ -664,16 +664,17 @@ star_formation_part_has_no_neighbours(struct part* restrict p,
  * @param p Pointer to the particle data.
  * @param xp Pointer to the extended particle data.
  */
-__attribute__((always_inline)) INLINE static void star_formation_first_init_part(
-    const struct phys_const* restrict phys_const,
-    const struct unit_system* restrict us,
-    const struct cosmology* restrict cosmo,
-    const struct star_formation* data, const struct part* restrict p,
-    struct xpart* restrict xp) {}
+__attribute__((always_inline)) INLINE static void
+star_formation_first_init_part(const struct phys_const* restrict phys_const,
+                               const struct unit_system* restrict us,
+                               const struct cosmology* restrict cosmo,
+                               const struct star_formation* data,
+                               const struct part* restrict p,
+                               struct xpart* restrict xp) {}
 
 /**
- * @brief Sets the star_formation properties of the (x-)particles to a valid start
- * state.
+ * @brief Sets the star_formation properties of the (x-)particles to a valid
+ * start state.
  *
  * Nothing to do here.
  *
diff --git a/src/star_formation/EAGLE/star_formation_iact.h b/src/star_formation/EAGLE/star_formation_iact.h
index 22569dbe76..2ea4304e98 100644
--- a/src/star_formation/EAGLE/star_formation_iact.h
+++ b/src/star_formation/EAGLE/star_formation_iact.h
@@ -40,8 +40,8 @@ __attribute__((always_inline)) INLINE static void runner_iact_star_formation(
     struct part *restrict pj, float a, float H) {}
 
 /**
- * @brief do star_formation computation after the runner_iact_density (non symmetric
- * version)
+ * @brief do star_formation computation after the runner_iact_density (non
+ * symmetric version)
  *
  * @param r2 Comoving square distance between the two particles.
  * @param dx Comoving vector separating both particles (pi - pj).
@@ -52,8 +52,10 @@ __attribute__((always_inline)) INLINE static void runner_iact_star_formation(
  * @param a Current scale factor.
  * @param H Current Hubble parameter.
  */
-__attribute__((always_inline)) INLINE static void runner_iact_nonsym_star_formation(
-    float r2, const float *dx, float hi, float hj, struct part *restrict pi,
-    const struct part *restrict pj, float a, float H) {}
+__attribute__((always_inline)) INLINE static void
+runner_iact_nonsym_star_formation(float r2, const float *dx, float hi, float hj,
+                                  struct part *restrict pi,
+                                  const struct part *restrict pj, float a,
+                                  float H) {}
 
 #endif /* SWIFT_EAGLE_STAR_FORMATION_IACT_H */
diff --git a/src/star_formation/GEAR/star_formation.h b/src/star_formation/GEAR/star_formation.h
index 6923c3e8c9..420cecb6f6 100644
--- a/src/star_formation/GEAR/star_formation.h
+++ b/src/star_formation/GEAR/star_formation.h
@@ -175,13 +175,13 @@ __attribute__((always_inline)) INLINE static void star_formation_end_density(
  */
 __attribute__((always_inline)) INLINE static void
 star_formation_part_has_no_neighbours(struct part* restrict p,
-                                 struct xpart* restrict xp,
-                                 const struct star_formation* cd,
-                                 const struct cosmology* cosmo) {}
+                                      struct xpart* restrict xp,
+                                      const struct star_formation* cd,
+                                      const struct cosmology* cosmo) {}
 
 /**
- * @brief Sets the star_formation properties of the (x-)particles to a valid start
- * state.
+ * @brief Sets the star_formation properties of the (x-)particles to a valid
+ * start state.
  *
  * Nothing to do here.
  *
@@ -192,16 +192,17 @@ star_formation_part_has_no_neighbours(struct part* restrict p,
  * @param p Pointer to the particle data.
  * @param xp Pointer to the extended particle data.
  */
-__attribute__((always_inline)) INLINE static void star_formation_first_init_part(
-    const struct phys_const* restrict phys_const,
-    const struct unit_system* restrict us,
-    const struct cosmology* restrict cosmo,
-    const struct star_formation* data, const struct part* restrict p,
-    struct xpart* restrict xp) {}
+__attribute__((always_inline)) INLINE static void
+star_formation_first_init_part(const struct phys_const* restrict phys_const,
+                               const struct unit_system* restrict us,
+                               const struct cosmology* restrict cosmo,
+                               const struct star_formation* data,
+                               const struct part* restrict p,
+                               struct xpart* restrict xp) {}
 
 /**
- * @brief Sets the star_formation properties of the (x-)particles to a valid start
- * state.
+ * @brief Sets the star_formation properties of the (x-)particles to a valid
+ * start state.
  *
  * Nothing to do here.
  *
diff --git a/src/star_formation/GEAR/star_formation_iact.h b/src/star_formation/GEAR/star_formation_iact.h
index 0f4a74477a..ef47470015 100644
--- a/src/star_formation/GEAR/star_formation_iact.h
+++ b/src/star_formation/GEAR/star_formation_iact.h
@@ -40,8 +40,8 @@ __attribute__((always_inline)) INLINE static void runner_iact_star_formation(
     struct part *restrict pj, float a, float H) {}
 
 /**
- * @brief do star_formation computation after the runner_iact_density (non symmetric
- * version)
+ * @brief do star_formation computation after the runner_iact_density (non
+ * symmetric version)
  *
  * @param r2 Comoving square distance between the two particles.
  * @param dx Comoving vector separating both particles (pi - pj).
@@ -52,8 +52,10 @@ __attribute__((always_inline)) INLINE static void runner_iact_star_formation(
  * @param a Current scale factor.
  * @param H Current Hubble parameter.
  */
-__attribute__((always_inline)) INLINE static void runner_iact_nonsym_star_formation(
-    float r2, const float *dx, float hi, float hj, struct part *restrict pi,
-    const struct part *restrict pj, float a, float H) {}
+__attribute__((always_inline)) INLINE static void
+runner_iact_nonsym_star_formation(float r2, const float *dx, float hi, float hj,
+                                  struct part *restrict pi,
+                                  const struct part *restrict pj, float a,
+                                  float H) {}
 
 #endif /* SWIFT_GEAR_STAR_FORMATION_IACT_H */
diff --git a/src/star_formation/GEAR/star_formation_struct.h b/src/star_formation/GEAR/star_formation_struct.h
index 58f7379b10..9b4e216fd2 100644
--- a/src/star_formation/GEAR/star_formation_struct.h
+++ b/src/star_formation/GEAR/star_formation_struct.h
@@ -28,5 +28,4 @@ struct star_formation_xpart_data {};
 /* Starformation struct */
 struct star_formation {};
 
-
 #endif /* SWIFT_GEAR_STAR_FORMATION_STRUCT_H */
diff --git a/src/star_formation/none/star_formation.h b/src/star_formation/none/star_formation.h
index aa62da928a..7dbe5b20cc 100644
--- a/src/star_formation/none/star_formation.h
+++ b/src/star_formation/none/star_formation.h
@@ -178,13 +178,13 @@ __attribute__((always_inline)) INLINE static void star_formation_end_density(
  */
 __attribute__((always_inline)) INLINE static void
 star_formation_part_has_no_neighbours(struct part* restrict p,
-                                 struct xpart* restrict xp,
-                                 const struct star_formation* cd,
-                                 const struct cosmology* cosmo) {}
+                                      struct xpart* restrict xp,
+                                      const struct star_formation* cd,
+                                      const struct cosmology* cosmo) {}
 
 /**
- * @brief Sets the star_formation properties of the (x-)particles to a valid start
- * state.
+ * @brief Sets the star_formation properties of the (x-)particles to a valid
+ * start state.
  *
  * Nothing to do here.
  *
@@ -195,16 +195,17 @@ star_formation_part_has_no_neighbours(struct part* restrict p,
  * @param p Pointer to the particle data.
  * @param xp Pointer to the extended particle data.
  */
-__attribute__((always_inline)) INLINE static void star_formation_first_init_part(
-    const struct phys_const* restrict phys_const,
-    const struct unit_system* restrict us,
-    const struct cosmology* restrict cosmo,
-    const struct star_formation* data, const struct part* restrict p,
-    struct xpart* restrict xp) {}
+__attribute__((always_inline)) INLINE static void
+star_formation_first_init_part(const struct phys_const* restrict phys_const,
+                               const struct unit_system* restrict us,
+                               const struct cosmology* restrict cosmo,
+                               const struct star_formation* data,
+                               const struct part* restrict p,
+                               struct xpart* restrict xp) {}
 
 /**
- * @brief Sets the star_formation properties of the (x-)particles to a valid start
- * state.
+ * @brief Sets the star_formation properties of the (x-)particles to a valid
+ * start state.
  *
  * Nothing to do here.
  *
diff --git a/src/star_formation/none/star_formation_iact.h b/src/star_formation/none/star_formation_iact.h
index d31f862175..dd74115bec 100644
--- a/src/star_formation/none/star_formation_iact.h
+++ b/src/star_formation/none/star_formation_iact.h
@@ -40,8 +40,8 @@ __attribute__((always_inline)) INLINE static void runner_iact_star_formation(
     struct part *restrict pj, float a, float H) {}
 
 /**
- * @brief do star_formation computation after the runner_iact_density (non symmetric
- * version)
+ * @brief do star_formation computation after the runner_iact_density (non
+ * symmetric version)
  *
  * @param r2 Comoving square distance between the two particles.
  * @param dx Comoving vector separating both particles (pi - pj).
@@ -52,8 +52,10 @@ __attribute__((always_inline)) INLINE static void runner_iact_star_formation(
  * @param a Current scale factor.
  * @param H Current Hubble parameter.
  */
-__attribute__((always_inline)) INLINE static void runner_iact_nonsym_star_formation(
-    float r2, const float *dx, float hi, float hj, struct part *restrict pi,
-    const struct part *restrict pj, float a, float H) {}
+__attribute__((always_inline)) INLINE static void
+runner_iact_nonsym_star_formation(float r2, const float *dx, float hi, float hj,
+                                  struct part *restrict pi,
+                                  const struct part *restrict pj, float a,
+                                  float H) {}
 
 #endif /* SWIFT_NONE_STAR_FORMATION_IACT_H */
diff --git a/src/tools.c b/src/tools.c
index f31fee3c9e..43ac0177da 100644
--- a/src/tools.c
+++ b/src/tools.c
@@ -45,8 +45,8 @@
 #include "part.h"
 #include "periodic.h"
 #include "runner.h"
-#include "stars.h"
 #include "star_formation_iact.h"
+#include "stars.h"
 
 /**
  *  Factorize a given integer, attempts to keep larger pair of factors.
-- 
GitLab