From c1df9144c33c50a4e55f21846e188bf0fbdb441a Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Sun, 28 Jul 2019 15:17:53 +0100
Subject: [PATCH] Use different names for the FOF and VR group IDs in the
 snapshots.

---
 src/fof_io.h          | 16 ++++++++--------
 src/velociraptor_io.h | 18 +++++++++---------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/fof_io.h b/src/fof_io.h
index 2fa3034c8a..24edefed3f 100644
--- a/src/fof_io.h
+++ b/src/fof_io.h
@@ -61,9 +61,9 @@ INLINE static int fof_write_parts(const struct part* parts,
 #ifdef WITH_FOF
 
   list[0] = io_make_output_field_convert_part(
-      "GroupIDs", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, parts, xparts,
+      "FOFGroupIDs", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, parts, xparts,
       convert_part_group_id,
-      "Friends-Of-Friends ID of the group this particle belongs to");
+      "Friends-Of-Friends ID of the group the particles belong to");
   return 1;
 #else
   return 0;
@@ -84,9 +84,9 @@ INLINE static int fof_write_gparts(const struct gpart* gparts,
 #ifdef WITH_FOF
 
   list[0] = io_make_output_field(
-      "GroupIDs", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, gparts,
+      "FOFGroupIDs", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, gparts,
       fof_data.group_id,
-      "Friends-Of-Friends ID of the group this particle belongs to");
+      "Friends-Of-Friends ID of the group the particles belong to");
 
   return 1;
 #else
@@ -108,9 +108,9 @@ INLINE static int fof_write_sparts(const struct spart* sparts,
 #ifdef WITH_FOF
 
   list[0] = io_make_output_field_convert_spart(
-      "GroupIDs", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, sparts,
+      "FOFGroupIDs", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, sparts,
       convert_spart_group_id,
-      "Friends-Of-Friends ID of the group this particle belongs to");
+      "Friends-Of-Friends ID of the group the particles belong to");
   return 1;
 #else
   return 0;
@@ -131,9 +131,9 @@ INLINE static int fof_write_bparts(const struct bpart* bparts,
 #ifdef WITH_FOF
 
   list[0] = io_make_output_field_convert_bpart(
-      "GroupIDs", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, bparts,
+      "FOFGroupIDs", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, bparts,
       convert_bpart_group_id,
-      "Friends-Of-Friends ID of the group this particle belongs to");
+      "Friends-Of-Friends ID of the group the particles belong to");
   return 1;
 #else
   return 0;
diff --git a/src/velociraptor_io.h b/src/velociraptor_io.h
index 4310c42880..446fc3131b 100644
--- a/src/velociraptor_io.h
+++ b/src/velociraptor_io.h
@@ -61,9 +61,9 @@ __attribute__((always_inline)) INLINE static int velociraptor_write_parts(
     struct io_props* list) {
 
   list[0] = io_make_output_field_convert_part(
-      "GroupID", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, parts, xparts,
-      velociraptor_convert_part_groupID,
-      "Group ID of the particle in the VELOCIraptor catalogue");
+      "VELOCIraptorGroupIDs", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, parts,
+      xparts, velociraptor_convert_part_groupID,
+      "Group IDs of the particles in the VELOCIraptor catalogue");
 
   return 1;
 }
@@ -72,8 +72,8 @@ __attribute__((always_inline)) INLINE static int velociraptor_write_gparts(
     const struct velociraptor_gpart_data* group_data, struct io_props* list) {
 
   list[0] = io_make_output_field(
-      "GroupID", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, group_data, groupID,
-      "Group ID of the particle in the VELOCIraptor catalogue");
+      "VELOCIraptorGroupIDs", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, group_data,
+      groupID, "Group IDs of the particles in the VELOCIraptor catalogue");
 
   return 1;
 }
@@ -82,9 +82,9 @@ __attribute__((always_inline)) INLINE static int velociraptor_write_sparts(
     const struct spart* sparts, struct io_props* list) {
 
   list[0] = io_make_output_field_convert_spart(
-      "GroupID", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, sparts,
+      "VELOCIraptorGroupIDs", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, sparts,
       velociraptor_convert_spart_groupID,
-      "Group ID of the particle in the VELOCIraptor catalogue");
+      "Group IDs of the particles in the VELOCIraptor catalogue");
 
   return 1;
 }
@@ -93,9 +93,9 @@ __attribute__((always_inline)) INLINE static int velociraptor_write_bparts(
     const struct bpart* bparts, struct io_props* list) {
 
   list[0] = io_make_output_field_convert_bpart(
-      "GroupID", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, bparts,
+      "VELOCIraptorGroupIDs", LONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, bparts,
       velociraptor_convert_bpart_groupID,
-      "Group ID of the particle in the VELOCIraptor catalogue");
+      "Group IDs of the particles in the VELOCIraptor catalogue");
 
   return 1;
 }
-- 
GitLab