From 069e80ed12738ff45f96175dbb3c16f180c2f89f Mon Sep 17 00:00:00 2001 From: James Willis <james.s.willis@durham.ac.uk> Date: Sun, 22 Apr 2018 16:56:49 +0800 Subject: [PATCH] Store the FOF linking length in the space and store the particle offset into the global pid array in the gpart. --- src/gravity/Default/gravity_part.h | 2 ++ src/space.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/gravity/Default/gravity_part.h b/src/gravity/Default/gravity_part.h index 06b9c52e14..ef93488f0b 100644 --- a/src/gravity/Default/gravity_part.h +++ b/src/gravity/Default/gravity_part.h @@ -50,6 +50,8 @@ struct gpart { /*! Type of the #gpart (DM, gas, star, ...) */ enum part_type type; + size_t offset; + #ifdef SWIFT_DEBUG_CHECKS /* Numer of gparts this gpart interacted with */ diff --git a/src/space.h b/src/space.h index 76d9369db2..23f01fedbf 100644 --- a/src/space.h +++ b/src/space.h @@ -155,6 +155,9 @@ struct space { /*! The associated engine. */ struct engine *e; + /*! The FOF linking length squared. */ + double l_x2; + #ifdef WITH_MPI /*! Buffers for parts that we will receive from foreign cells. */ -- GitLab