From 450b2b515e65b19fcd71107d904d8ded39eb8742 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Fri, 7 Mar 2008 13:08:06 +0000
Subject: [PATCH] give a meaningfull message if lapackpp is not available

[[Imported from SVN: r2040]]
---
 dirneucoupling.cc       | 3 +++
 src/averageinterface.hh | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/dirneucoupling.cc b/dirneucoupling.cc
index 1d96c978..2fa0690c 100644
--- a/dirneucoupling.cc
+++ b/dirneucoupling.cc
@@ -414,6 +414,9 @@ int main (int argc, char *argv[]) try
                                                         rhs3d);
 
 #else
+#ifndef HAVE_LAPACKPP
+#error You need LaPack++ for this!
+#endif
         // For the time being the Neumann data coming from the rod is a dg function (== not continuous)
         // Maybe that is not necessary
         DGIndexSet<GridType> dgIndexSet(grid,grid.maxLevel());
diff --git a/src/averageinterface.hh b/src/averageinterface.hh
index 714be196..1c80de6a 100644
--- a/src/averageinterface.hh
+++ b/src/averageinterface.hh
@@ -8,8 +8,11 @@
 #include <dune/ag-common/crossproduct.hh>
 #include <dune/ag-common/surfmassmatrix.hh>
 #include "svd.hh"
+
+#ifdef HAVE_LAPACKPP
 #include "lapackpp.h"
 #undef max
+#endif
 
 template <class GridType>
 class PressureAverager : public Ipopt::TNLP
@@ -651,6 +654,7 @@ void computeAveragePressureIPOpt(const Dune::FieldVector<double,GridType::dimens
 }
 
 
+#ifdef HAVE_LAPACKPP
 // Given a resultant force and torque (from a rod problem), this method computes the corresponding
 // Neumann data for a 3d elasticity problem.
 template <class GridType>
@@ -834,7 +838,7 @@ void computeAveragePressure(const Dune::FieldVector<double,GridType::dimension>&
 #endif
 
 }
-
+#endif
 
 
 template <class GridType>
-- 
GitLab