From 636502aa47095a85b2b9638efa4ebc22b0e874ef Mon Sep 17 00:00:00 2001
From: Markus Blatt <mblatt@dune-project.org>
Date: Fri, 8 Oct 2010 11:49:37 +0000
Subject: [PATCH] Make multitypeblockmatrix/vector compile again. Thanks joe
 for the hint

[[Imported from SVN: r1304]]
---
 dune/istl/gsetc.hh                | 16 ++--------------
 dune/istl/multitypeblockmatrix.hh | 10 +---------
 dune/istl/preconditioners.hh      |  8 ++++----
 dune/istl/tutorial/example.cc     |  2 --
 4 files changed, 7 insertions(+), 29 deletions(-)

diff --git a/dune/istl/gsetc.hh b/dune/istl/gsetc.hh
index 4d9c6e277..4bd0fb04c 100644
--- a/dune/istl/gsetc.hh
+++ b/dune/istl/gsetc.hh
@@ -13,10 +13,6 @@
 
 #include "istlexception.hh"
 
-#ifdef HAVE_BOOST_FUSION
-#warning The code which is normally enabled by HAVE_BOOST_FUSION has been
-#warning disabled since it does not compile at the moment.
-#endif
 
 /*! \file
    \brief Simple iterative methods like Jacobi, Gauss-Seidel, SOR, SSOR, etc.
@@ -378,7 +374,6 @@ namespace Dune {
   struct algmeta_itsteps {
 
 #ifdef HAVE_BOOST_FUSION
-#if 0
 
     template<typename T11, typename T12, typename T13, typename T14,
         typename T15, typename T16, typename T17, typename T18,
@@ -394,7 +389,6 @@ namespace Dune {
         boost::mpl::size<MultiTypeBlockMatrix<T11,T12,T13,T14,T15,T16,T17,T18,T19> >::value;
       Dune::MultiTypeBlockMatrix_Solver<I,0,rowcount>::dbgs(A, x, b, w);
     }
-#endif // 0
 #endif
 
     template<class M, class X, class Y, class K>
@@ -426,7 +420,6 @@ namespace Dune {
     }
 
 #ifdef HAVE_BOOST_FUSION
-#if 0
     template<typename T11, typename T12, typename T13, typename T14,
         typename T15, typename T16, typename T17, typename T18,
         typename T19, typename T21, typename T22, typename T23,
@@ -441,7 +434,6 @@ namespace Dune {
         boost::mpl::size<MultiTypeBlockMatrix<T11,T12,T13,T14,T15,T16,T17,T18,T19> >::value;
       Dune::MultiTypeBlockMatrix_Solver<I,0,rowcount>::bsorf(A, x, b, w);
     }
-#endif // 0
 #endif
 
     template<class M, class X, class Y, class K>
@@ -475,7 +467,6 @@ namespace Dune {
     }
 
 #ifdef HAVE_BOOST_FUSION
-#if 0
 
     template<typename T11, typename T12, typename T13, typename T14,
         typename T15, typename T16, typename T17, typename T18,
@@ -491,7 +482,6 @@ namespace Dune {
         mpl::size<MultiTypeBlockMatrix<T11,T12,T13,T14,T15,T16,T17,T18,T19> >::value;
       Dune::MultiTypeBlockMatrix_Solver<I,rowcount-1,rowcount>::bsorb(A, x, b, w);
     }
-#endif // 0
 #endif
 
     template<class M, class X, class Y, class K>
@@ -525,7 +515,6 @@ namespace Dune {
     }
 
 #ifdef HAVE_BOOST_FUSION
-#if 0
     template<typename T11, typename T12, typename T13, typename T14,
         typename T15, typename T16, typename T17, typename T18,
         typename T19, typename T21, typename T22, typename T23,
@@ -537,10 +526,9 @@ namespace Dune {
                        const K& w)
     {
       const int rowcount =
-        boost::mpl::size<MultiTypeBlockMatrix<T11,T12,T13,T14,T15,T16,T17,T18,T19> >::value
-        Dune::MultiTypeBlockMatrix_Solver<I,0,rowcount >::dbjac(A, x, b, w);
+        boost::mpl::size<MultiTypeBlockMatrix<T11,T12,T13,T14,T15,T16,T17,T18,T19> >::value;
+      Dune::MultiTypeBlockMatrix_Solver<I,0,rowcount >::dbjac(A, x, b, w);
     }
-#endif // 0
 #endif
 
     template<class M, class X, class Y, class K>
diff --git a/dune/istl/multitypeblockmatrix.hh b/dune/istl/multitypeblockmatrix.hh
index d4db1068d..caa9a9411 100644
--- a/dune/istl/multitypeblockmatrix.hh
+++ b/dune/istl/multitypeblockmatrix.hh
@@ -3,11 +3,6 @@
 #ifndef DUNE_MultiTypeMATRIX_HH
 #define DUNE_MultiTypeMATRIX_HH
 
-#ifdef HAVE_BOOST_FUSION
-#warning The code which is normally enabled by HAVE_BOOST_FUSION has been
-#warning disabled since it does not compile at the moment.
-#if 0
-
 #include <cmath>
 #include <iostream>
 
@@ -22,7 +17,7 @@
 #include <boost/typeof/typeof.hpp>
 #include <boost/fusion/algorithm.hpp>
 
-#include "cvector.hh"
+#include "multitypeblockmatrix.hh"
 
 namespace mpl=boost::mpl;
 namespace fusion=boost::fusion;
@@ -453,7 +448,4 @@ namespace Dune {
 
 } // end namespace
 
-#endif // 0
-#endif
-
 #endif
diff --git a/dune/istl/preconditioners.hh b/dune/istl/preconditioners.hh
index a3e50f865..cd73c89ab 100644
--- a/dune/istl/preconditioners.hh
+++ b/dune/istl/preconditioners.hh
@@ -168,7 +168,7 @@ namespace Dune {
     SeqSSOR (const M& A, int n, field_type w)
       : _A_(A), _n(n), _w(w)
     {
-      CheckIfDiagonalPresent<l>::check(_A_);
+      CheckIfDiagonalPresent<M,l>::check(_A_);
     }
 
     /*!
@@ -248,7 +248,7 @@ namespace Dune {
     SeqSOR (const M& A, int n, field_type w)
       : _A_(A), _n(n), _w(w)
     {
-      CheckIfDiagonalPresent<l>::check(_A_);
+      CheckIfDiagonalPresent<M,l>::check(_A_);
     }
 
     /*!
@@ -344,7 +344,7 @@ namespace Dune {
     SeqGS (const M& A, int n, field_type w)
       : _A_(A), _n(n), _w(w)
     {
-      CheckIfDiagonalPresent<l>::check(_A_);
+      CheckIfDiagonalPresent<M,l>::check(_A_);
     }
 
     /*!
@@ -421,7 +421,7 @@ namespace Dune {
     SeqJac (const M& A, int n, field_type w)
       : _A_(A), _n(n), _w(w)
     {
-      CheckIfDiagonalPresent<l>::check(_A_);
+      CheckIfDiagonalPresent<M,l>::check(_A_);
     }
 
     /*!
diff --git a/dune/istl/tutorial/example.cc b/dune/istl/tutorial/example.cc
index 35ef3543b..f49f6cd6c 100644
--- a/dune/istl/tutorial/example.cc
+++ b/dune/istl/tutorial/example.cc
@@ -513,7 +513,6 @@ void test_Interface ()
 
 
 #ifdef HAVE_BOOST_FUSION
-#if 0
 
 void test_MultiTypeBlockVector_MultiTypeBlockMatrix() {                           //Jacobi Solver Test MultiTypeBlockMatrix_Solver::dbjac on MultiTypeBlockMatrix<BCRSMatrix>
 
@@ -603,7 +602,6 @@ void test_MultiTypeBlockVector_MultiTypeBlockMatrix() {
   printvector(std::cout,fusion::at_c<1>(x),"solution x2","entry",11,9,1);
 
 }
-#endif // 0
 #endif
 
 
-- 
GitLab