From 69af1098f6839ab26ec32ed72aaf6a7380725628 Mon Sep 17 00:00:00 2001
From: Robert Izzard <r.izzard@surrey.ac.uk>
Date: Wed, 13 Nov 2019 10:28:11 +0000
Subject: [PATCH] wrap nucsyn_remove_mass_from_surface with #ifdef
 NUCSYN...#endif so we can build without NUCSYN defined

---
 novae.sh                                     | 13 -------------
 src/binary_c_structures.h                    |  3 ++-
 src/nucsyn/nucsyn_remove_mass_from_surface.c |  3 +++
 3 files changed, 5 insertions(+), 14 deletions(-)
 delete mode 100755 novae.sh

diff --git a/novae.sh b/novae.sh
deleted file mode 100755
index 80b09d750..000000000
--- a/novae.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-
-echo "Running systems..."
-( tbse --individual_novae 0 | filter NOVAE > /tmp/novae0.dat; )  &
-( tbse --individual_novae 1 | filter NOVAE > /tmp/novae1.dat; ) &
-wait
-echo "Done"
-
-gnuplot novae.plt
-
-echo "See novae.pdf"
-
diff --git a/src/binary_c_structures.h b/src/binary_c_structures.h
index 98dbe6201..ea0e6377f 100644
--- a/src/binary_c_structures.h
+++ b/src/binary_c_structures.h
@@ -1361,6 +1361,7 @@ struct star_t {
     
     double spiky_luminosity; // L modulated by pulse rise/fall
     double prev_tagb;
+    double dmacc; /* mass of accreted layer, used in NUCSYN and novae */
 #ifdef NUCSYN
     /* Nucleosynthesis stuff */
     /* stuff you might want to log */
@@ -1382,7 +1383,7 @@ struct star_t {
     double mixdepth,mixtime;
     double dmmix; /* mass of mixed region at the stellar surface */
     double conv_base; /* mass coord of surface convection zone (on MS) */
-    double dmacc; /* mass of accreted layer */
+    
     double dm_companion_SN; /* mass change caused by companion supernova */
 
     double max_mix_depth;
diff --git a/src/nucsyn/nucsyn_remove_mass_from_surface.c b/src/nucsyn/nucsyn_remove_mass_from_surface.c
index 1d61c9312..8a5a0e8e0 100644
--- a/src/nucsyn/nucsyn_remove_mass_from_surface.c
+++ b/src/nucsyn/nucsyn_remove_mass_from_surface.c
@@ -1,5 +1,7 @@
 #include "../binary_c.h"
 
+#ifdef NUCSYN
+
 void nucsyn_remove_mass_from_surface(
 #if defined DEBUG && DEBUG > 0
     struct stardata_t * stardata,
@@ -35,3 +37,4 @@ void nucsyn_remove_mass_from_surface(
         *allocated = FALSE;
     }
 }
+#endif // NUCSYN
-- 
GitLab