From 4de38704bd81016b0aaf591f90d996891c200c25 Mon Sep 17 00:00:00 2001
From: loikki <loic.hausammann@protonmail.ch>
Date: Thu, 26 Jul 2018 17:00:07 +0200
Subject: [PATCH] Add active functions for stars

---
 src/active.h | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/src/active.h b/src/active.h
index 949babf1b1..d73e7b9ef4 100644
--- a/src/active.h
+++ b/src/active.h
@@ -73,6 +73,20 @@ __attribute__((always_inline)) INLINE static int cell_are_gpart_drifted(
   return (c->ti_old_gpart == e->ti_current);
 }
 
+/**
+ * @brief Check that the #spart in a #cell have been drifted to the current
+ * time.
+ *
+ * @param c The #cell.
+ * @param e The #engine containing information about the current time.
+ * @return 1 if the #cell has been drifted to the current time, 0 otherwise.
+ */
+__attribute__((always_inline)) INLINE static int cell_are_spart_drifted(
+    const struct cell *c, const struct engine *e) {
+
+  return 1;
+}
+
 /* Are cells / particles active for regular tasks ? */
 
 /**
@@ -174,6 +188,19 @@ __attribute__((always_inline)) INLINE static int cell_is_all_active_gravity(
   return (c->ti_gravity_end_max == e->ti_current);
 }
 
+/**
+ * @brief Does a cell contain any s-particle finishing their time-step now ?
+ *
+ * @param c The #cell.
+ * @param e The #engine containing information about the current time.
+ * @return 1 if the #cell contains at least an active particle, 0 otherwise.
+ */
+__attribute__((always_inline)) INLINE static int cell_is_active_star(
+    const struct cell *c, const struct engine *e) {
+
+  return 1;
+}
+
 /**
  * @brief Is this particle finishing its time-step now ?
  *
-- 
GitLab