From de06a27652adc51fc3fa2b7c56ebbd16b38962b9 Mon Sep 17 00:00:00 2001
From: James Willis <james.s.willis@durham.ac.uk>
Date: Wed, 1 Aug 2018 20:11:05 +0100
Subject: [PATCH] Added comments.

---
 examples/main.c              | 2 +-
 src/space.c                  | 6 ++++++
 src/velociraptor_interface.c | 3 +--
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/examples/main.c b/examples/main.c
index fe95b549a1..582506e48b 100644
--- a/examples/main.c
+++ b/examples/main.c
@@ -714,7 +714,7 @@ int main(int argc, char *argv[]) {
     }
 
 #ifdef WITH_MPI
-    if (periodic && with_self_gravity && nr_nodes > 1)
+    if (periodic && with_self_gravity)
       error("Periodic self-gravity over MPI temporarily disabled.");
 #endif
 
diff --git a/src/space.c b/src/space.c
index e78c72725a..f52715260a 100644
--- a/src/space.c
+++ b/src/space.c
@@ -1265,6 +1265,8 @@ void space_sparts_get_cell_index_mapper(void *map_data, int nr_sparts,
 /**
  * @brief Computes the cell index of all the particles.
  *
+ * Also computes the minimal mass of all #part.
+ *
  * @param s The #space.
  * @param ind The array of indices to fill.
  * @param cell_counts The cell counters to update.
@@ -1298,6 +1300,8 @@ void space_parts_get_cell_index(struct space *s, int *ind, int *cell_counts,
 /**
  * @brief Computes the cell index of all the g-particles.
  *
+ * Also computes the minimal mass of all dark-matter #gpart.
+ *
  * @param s The #space.
  * @param gind The array of indices to fill.
  * @param cell_counts The cell counters to update.
@@ -1331,6 +1335,8 @@ void space_gparts_get_cell_index(struct space *s, int *gind, int *cell_counts,
 /**
  * @brief Computes the cell index of all the s-particles.
  *
+ * Also computes the minimal mass of all #spart.
+ *
  * @param s The #space.
  * @param sind The array of indices to fill.
  * @param cell_counts The cell counters to update.
diff --git a/src/velociraptor_interface.c b/src/velociraptor_interface.c
index 9e59a36d6b..2a6de61039 100644
--- a/src/velociraptor_interface.c
+++ b/src/velociraptor_interface.c
@@ -144,10 +144,9 @@ void velociraptor_init(struct engine *e) {
     message("No. of top-level cells: %d", sim_info.numcells);
     message("Top-level cell locations range: (%e,%e,%e) -> (%e,%e,%e)", sim_info.cellloc[0].loc[0], sim_info.cellloc[0].loc[1], sim_info.cellloc[0].loc[2], sim_info.cellloc[sim_info.numcells - 1].loc[0], sim_info.cellloc[sim_info.numcells - 1].loc[1], sim_info.cellloc[sim_info.numcells - 1].loc[2]);
 
+    /* Initialise VELOCIraptor. */
     if(!InitVelociraptor(configfilename, outputFileName, cosmo_info, unit_info, sim_info)) error("Exiting. VELOCIraptor initialisation failed.");
 
-    /* Free cell locations after VELOCIraptor has copied them. */
-    //free(sim_info.cellloc);
 }
 
 /**
-- 
GitLab