From b80fb3c3f0e3a7b9f29f44521737c3dfcedb8ccb Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Mon, 10 Jul 2017 15:09:41 +0200
Subject: [PATCH] Fixed a mangled merge in the Minimal-SPH hydro scheme.

---
 src/hydro/Minimal/hydro.h     | 21 ---------------------
 tests/benchmarkInteractions.c |  2 +-
 2 files changed, 1 insertion(+), 22 deletions(-)

diff --git a/src/hydro/Minimal/hydro.h b/src/hydro/Minimal/hydro.h
index c33d31fedd..4d8ca5b055 100644
--- a/src/hydro/Minimal/hydro.h
+++ b/src/hydro/Minimal/hydro.h
@@ -249,27 +249,6 @@ __attribute__((always_inline)) INLINE static void hydro_part_has_no_neighbours(
   p->density.wcount_dh = 0.f;
 }
 
-/**
- * @brief Sets all particle fields to sensible values when the #part has 0 ngbs.
- *
- * @param p The particle to act upon
- * @param xp The extended particle data to act upon
- */
-__attribute__((always_inline)) INLINE static void hydro_part_has_no_neighbours(
-    struct part *restrict p, struct xpart *restrict xp) {
-
-  /* Some smoothing length multiples. */
-  const float h = p->h;
-  const float h_inv = 1.0f / h;                 /* 1/h */
-  const float h_inv_dim = pow_dimension(h_inv); /* 1/h^d */
-
-  /* Re-set problematic values */
-  p->rho = p->mass * kernel_root * h_inv_dim;
-  p->density.wcount = kernel_root * kernel_norm * h_inv_dim;
-  p->density.rho_dh = 0.f;
-  p->density.wcount_dh = 0.f;
-}
-
 /**
  * @brief Prepare a particle for the force calculation.
  *
diff --git a/tests/benchmarkInteractions.c b/tests/benchmarkInteractions.c
index 0f5b3d2eb2..a11862ebaa 100644
--- a/tests/benchmarkInteractions.c
+++ b/tests/benchmarkInteractions.c
@@ -125,7 +125,7 @@ struct part *make_particles(size_t count, double *offset, double spacing,
  */
 void prepare_force(struct part *parts, size_t count) {
 
-#if !defined(GIZMO_SPH) && !defined(SHADOWFAX_SPH)
+#if !defined(GIZMO_SPH) && !defined(SHADOWFAX_SPH) && !defined(MINIMAL_SPH)
   struct part *p;
   for (size_t i = 0; i < count; ++i) {
     p = &parts[i];
-- 
GitLab