From bde9b911d8270be2e5df1929124f3d299672d111 Mon Sep 17 00:00:00 2001
From: Christian Godenschwager <christian.godenschwager@fau.de>
Date: Thu, 20 Apr 2017 09:25:29 +0200
Subject: [PATCH] Added error message if waLBerla's and METIS' real_t data
 types don't match.

---
 src/blockforest/MetisWrapper.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/blockforest/MetisWrapper.h b/src/blockforest/MetisWrapper.h
index 5321201c7..03cb3dfaa 100644
--- a/src/blockforest/MetisWrapper.h
+++ b/src/blockforest/MetisWrapper.h
@@ -49,6 +49,11 @@
 #ifdef WALBERLA_BUILD_WITH_METIS
 // external software includes
 #include "metis.h"
+
+#include <boost/type_traits/is_same.hpp>
+
+static_assert( boost::is_same< ::real_t, ::walberla::real_t >::value , "The width of waLBerla's real_t data type does not match the width of METIS' real_t data type. " \
+                                                                       "Please adapt either waLBerla's CMake option WALBERLA_DOUBLE_ACCURACY or change REALTYPEWIDTH in metis.h." );													  
 #endif
 
 #ifdef _MSC_VER
@@ -56,4 +61,4 @@
 #pragma pop_macro( "INT64_MIN" )
 #pragma pop_macro( "INT32_MAX" )
 #pragma pop_macro( "INT32_MIN" )
-#endif
+#endif
\ No newline at end of file
-- 
GitLab