From a443708fa75a17a581d9db46693aa057816b1dcf Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Mon, 20 Feb 2017 18:10:59 +0000
Subject: [PATCH] Code refactoring: cell_drift() ---> cell_drift_particles()

---
 src/cell.c                 | 4 ++--
 src/cell.h                 | 2 +-
 src/common_io.c            | 4 ++--
 src/runner.c               | 8 ++++----
 src/runner_doiact.h        | 6 +++---
 src/runner_doiact_nosort.h | 8 ++++----
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/cell.c b/src/cell.c
index c31f28236a..c3713c2052 100644
--- a/src/cell.c
+++ b/src/cell.c
@@ -1246,7 +1246,7 @@ void cell_set_super(struct cell *c, struct cell *super) {
  * @param c The #cell.
  * @param e The #engine (to get ti_current).
  */
-void cell_drift(struct cell *c, const struct engine *e) {
+void cell_drift_particles(struct cell *c, const struct engine *e) {
 
   const double timeBase = e->timeBase;
   const integertime_t ti_old = c->ti_old;
@@ -1270,7 +1270,7 @@ void cell_drift(struct cell *c, const struct engine *e) {
     for (int k = 0; k < 8; k++)
       if (c->progeny[k] != NULL) {
         struct cell *cp = c->progeny[k];
-        cell_drift(cp, e);
+        cell_drift_particles(cp, e);
         dx_max = max(dx_max, cp->dx_max);
         h_max = max(h_max, cp->h_max);
       }
diff --git a/src/cell.h b/src/cell.h
index 5e17058001..506a3d5be1 100644
--- a/src/cell.h
+++ b/src/cell.h
@@ -331,7 +331,7 @@ void cell_check_drift_point(struct cell *c, void *data);
 int cell_is_drift_needed(struct cell *c, const struct engine *e);
 int cell_unskip_tasks(struct cell *c, struct scheduler *s);
 void cell_set_super(struct cell *c, struct cell *super);
-void cell_drift(struct cell *c, const struct engine *e);
+void cell_drift_particles(struct cell *c, const struct engine *e);
 void cell_check_timesteps(struct cell *c);
 
 #endif /* SWIFT_CELL_H */
diff --git a/src/common_io.c b/src/common_io.c
index 567ae7249d..2a375c4c6d 100644
--- a/src/common_io.c
+++ b/src/common_io.c
@@ -134,7 +134,7 @@ int io_is_double_precision(enum IO_DATA_TYPE type) {
  *
  * @param grp The group from which to read.
  * @param name The name of the attribute to read.
- * @param type The #DATA_TYPE of the attribute.
+ * @param type The #IO_DATA_TYPE of the attribute.
  * @param data (output) The attribute read from the HDF5 group.
  *
  * Calls #error() if an error occurs.
@@ -161,7 +161,7 @@ void io_read_attribute(hid_t grp, char* name, enum IO_DATA_TYPE type,
  *
  * @param grp The group in which to write.
  * @param name The name of the attribute to write.
- * @param type The #DATA_TYPE of the attribute.
+ * @param type The #IO_DATA_TYPE of the attribute.
  * @param data The attribute to write.
  * @param num The number of elements to write
  *
diff --git a/src/runner.c b/src/runner.c
index 8f7085a73d..da1ec4a600 100644
--- a/src/runner.c
+++ b/src/runner.c
@@ -810,11 +810,11 @@ void runner_do_unskip_mapper(void *map_data, int num_elements,
  * @param c The cell.
  * @param timer Are we timing this ?
  */
-void runner_do_drift(struct runner *r, struct cell *c, int timer) {
+void runner_do_drift_particles(struct runner *r, struct cell *c, int timer) {
 
   TIMER_TIC;
 
-  cell_drift(c, r->e);
+  cell_drift_particles(c, r->e);
 
   if (timer) TIMER_TOC(timer_drift);
 }
@@ -834,7 +834,7 @@ void runner_do_drift_mapper(void *map_data, int num_elements,
 
   for (int ind = 0; ind < num_elements; ind++) {
     struct cell *c = &cells[ind];
-    if (c != NULL && c->nodeID == e->nodeID) cell_drift(c, e);
+    if (c != NULL && c->nodeID == e->nodeID) cell_drift_particles(c, e);
   }
 }
 
@@ -1700,7 +1700,7 @@ void *runner_main(void *data) {
           break;
 #endif
         case task_type_drift:
-          runner_do_drift(r, ci, 1);
+          runner_do_drift_particles(r, ci, 1);
           break;
         case task_type_kick1:
           runner_do_kick1(r, ci, 1);
diff --git a/src/runner_doiact.h b/src/runner_doiact.h
index 5ebd36ef7b..1fbaa3398d 100644
--- a/src/runner_doiact.h
+++ b/src/runner_doiact.h
@@ -746,8 +746,8 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj) {
   /* Anything to do here? */
   if (!cell_is_active(ci, e) && !cell_is_active(cj, e)) return;
 
-  if (!cell_is_drifted(ci, e)) cell_drift(ci, e);
-  if (!cell_is_drifted(cj, e)) cell_drift(cj, e);
+  if (!cell_is_drifted(ci, e)) cell_drift_particles(ci, e);
+  if (!cell_is_drifted(cj, e)) cell_drift_particles(cj, e);
 
   /* Get the sort ID. */
   double shift[3] = {0.0, 0.0, 0.0};
@@ -1397,7 +1397,7 @@ void DOSELF1(struct runner *r, struct cell *restrict c) {
 
   if (!cell_is_active(c, e)) return;
 
-  if (!cell_is_drifted(c, e)) cell_drift(c, e);
+  if (!cell_is_drifted(c, e)) cell_drift_particles(c, e);
 
   struct part *restrict parts = c->parts;
   const int count = c->count;
diff --git a/src/runner_doiact_nosort.h b/src/runner_doiact_nosort.h
index beb7fd7026..6a442afbdb 100644
--- a/src/runner_doiact_nosort.h
+++ b/src/runner_doiact_nosort.h
@@ -15,8 +15,8 @@ void DOPAIR1_NOSORT(struct runner *r, struct cell *ci, struct cell *cj) {
   /* Anything to do here? */
   if (!cell_is_active(ci, e) && !cell_is_active(cj, e)) return;
 
-  if (!cell_is_drifted(ci, e)) cell_drift(ci, e);
-  if (!cell_is_drifted(cj, e)) cell_drift(cj, e);
+  if (!cell_is_drifted(ci, e)) cell_drift_particles(ci, e);
+  if (!cell_is_drifted(cj, e)) cell_drift_particles(cj, e);
 
   /* Get the relative distance between the pairs, wrapping. */
   double shift[3] = {0.0, 0.0, 0.0};
@@ -140,8 +140,8 @@ void DOPAIR2_NOSORT(struct runner *r, struct cell *ci, struct cell *cj) {
   /* Anything to do here? */
   if (!cell_is_active(ci, e) && !cell_is_active(cj, e)) return;
 
-  if (!cell_is_drifted(ci, e)) cell_drift(ci, e);
-  if (!cell_is_drifted(cj, e)) cell_drift(cj, e);
+  if (!cell_is_drifted(ci, e)) cell_drift_particles(ci, e);
+  if (!cell_is_drifted(cj, e)) cell_drift_particles(cj, e);
 
   /* Get the relative distance between the pairs, wrapping. */
   double shift[3] = {0.0, 0.0, 0.0};
-- 
GitLab