From 11c0e58ddc80c3842db4da0f9d7801f4c74dd653 Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Thu, 7 Dec 2017 15:15:48 +0100
Subject: [PATCH] Do nothing and give warning if scotch wasn't found

---
 dumux/linear/scotchbackend.hh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dumux/linear/scotchbackend.hh b/dumux/linear/scotchbackend.hh
index 86fceed819..0d248641a2 100644
--- a/dumux/linear/scotchbackend.hh
+++ b/dumux/linear/scotchbackend.hh
@@ -35,6 +35,8 @@ extern "C"
 #include <stdint.h>
 #include <ptscotch.h>
 }
+#else
+#warning "PTSCOTCH was not found on your system. Dumux::ScotchBackend won't do anything."
 #endif
 
 namespace Dumux
@@ -73,6 +75,7 @@ public:
                                    std::vector<int>& inversePermutation,
                                    std::string scotchStrategy = "")
     {
+#if HAVE_PTSCOTCH
         // Number of local graph vertices (cells)
         const SCOTCH_Num vertnbr = graph.size();
 
@@ -163,9 +166,10 @@ public:
                   permutation.begin());
         std::copy(inversePermutationIndices.begin(), inversePermutationIndices.end(),
                   inversePermutation.begin());
+#endif // HAVE_PTSCOTCH
     }
 };
 
 } // end namespace Dumux
 
-#endif
+#endif // DUMUX_SCOTCH_BACKEND_HH
-- 
GitLab