From a207d0bcf3044c58d01bf823de2d652e5b61df03 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Thu, 28 Sep 2017 10:42:31 +0100
Subject: [PATCH] Code formatting

---
 src/cell.c      | 11 +++++++----
 src/cell.h      |  1 -
 src/scheduler.c | 12 ++++++------
 3 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/cell.c b/src/cell.c
index 99c6bfc922..006df3e9cf 100644
--- a/src/cell.c
+++ b/src/cell.c
@@ -209,7 +209,8 @@ int cell_pack(struct cell *restrict c, struct pcell *restrict pc) {
  *
  * @return The number of cells created.
  */
-int cell_unpack(struct pcell *restrict pc, struct cell *restrict c, struct space *restrict s) {
+int cell_unpack(struct pcell *restrict pc, struct cell *restrict c,
+                struct space *restrict s) {
 
 #ifdef WITH_MPI
 
@@ -275,7 +276,8 @@ int cell_unpack(struct pcell *restrict pc, struct cell *restrict c, struct space
  *
  * @return The number of packed cells.
  */
-int cell_pack_end_step(struct cell *restrict c, struct pcell_step *restrict pcells) {
+int cell_pack_end_step(struct cell *restrict c,
+                       struct pcell_step *restrict pcells) {
 
 #ifdef WITH_MPI
 
@@ -308,12 +310,13 @@ int cell_pack_end_step(struct cell *restrict c, struct pcell_step *restrict pcel
  *
  * @return The number of cells created.
  */
-int cell_unpack_end_step(struct cell *restrict c, struct pcell_step *restrict pcells) {
+int cell_unpack_end_step(struct cell *restrict c,
+                         struct pcell_step *restrict pcells) {
 
 #ifdef WITH_MPI
 
   /* Unpack this cell's data. */
-  c->ti_end_min = pcells[0].ti_end_min ;
+  c->ti_end_min = pcells[0].ti_end_min;
   c->dx_max_part = pcells[0].dx_max_part;
   c->dx_max_gpart = pcells[0].dx_max_gpart;
 
diff --git a/src/cell.h b/src/cell.h
index 7ba50fec73..efc90e9004 100644
--- a/src/cell.h
+++ b/src/cell.h
@@ -112,7 +112,6 @@ struct pcell {
 
 } SWIFT_STRUCT_ALIGN;
 
-
 /**
  * @brief Cell information at the end of a time-step.
  */
diff --git a/src/scheduler.c b/src/scheduler.c
index f94ec94b97..b2466d5510 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -1275,9 +1275,9 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
 #ifdef WITH_MPI
         if (t->subtype == task_subtype_tend) {
           t->buff = malloc(sizeof(struct pcell_step) * t->ci->pcell_size);
-          err = MPI_Irecv(t->buff, t->ci->pcell_size * sizeof(struct pcell_step),
-                          MPI_BYTE, t->ci->nodeID, t->flags, MPI_COMM_WORLD,
-                          &t->req);
+          err = MPI_Irecv(
+              t->buff, t->ci->pcell_size * sizeof(struct pcell_step), MPI_BYTE,
+              t->ci->nodeID, t->flags, MPI_COMM_WORLD, &t->req);
         } else if (t->subtype == task_subtype_xv ||
                    t->subtype == task_subtype_rho ||
                    t->subtype == task_subtype_gradient) {
@@ -1311,9 +1311,9 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
         if (t->subtype == task_subtype_tend) {
           t->buff = malloc(sizeof(struct pcell_step) * t->ci->pcell_size);
           cell_pack_end_step(t->ci, t->buff);
-          err = MPI_Isend(t->buff, t->ci->pcell_size * sizeof(struct pcell_step),
-                          MPI_BYTE, t->cj->nodeID, t->flags, MPI_COMM_WORLD,
-                          &t->req);
+          err = MPI_Isend(
+              t->buff, t->ci->pcell_size * sizeof(struct pcell_step), MPI_BYTE,
+              t->cj->nodeID, t->flags, MPI_COMM_WORLD, &t->req);
         } else if (t->subtype == task_subtype_xv ||
                    t->subtype == task_subtype_rho ||
                    t->subtype == task_subtype_gradient) {
-- 
GitLab