From 4beebd29469bb45a428c8cb3dbdc5ec4cda29035 Mon Sep 17 00:00:00 2001
From: Max Kahnt <max.kahnt@fu-berlin.de>
Date: Fri, 12 May 2017 16:41:11 +0200
Subject: [PATCH] Remove BCRS workaround.

---
 dune/matrix-vector/axpy.hh | 50 --------------------------------------
 1 file changed, 50 deletions(-)

diff --git a/dune/matrix-vector/axpy.hh b/dune/matrix-vector/axpy.hh
index 3d189a7..12b54d3 100644
--- a/dune/matrix-vector/axpy.hh
+++ b/dune/matrix-vector/axpy.hh
@@ -365,56 +365,6 @@ namespace MatrixVector {
     }
   };
 
-  template <class ABlock, class ScalarB, class CBlock>
-  struct ProductHelper<Dune::BCRSMatrix<ABlock>, ScalarB,
-                       Dune::BCRSMatrix<CBlock>, false, true, false> {
-    typedef Dune::BCRSMatrix<ABlock> A;
-    typedef ScalarB B;
-    typedef Dune::BCRSMatrix<CBlock> C;
-
-    static void addProduct(A& a, const B& b, const C& c) {
-      // Workaround for the fact that Dune::BCRSMatrix assumes
-      // its blocks to have an axpy() implementation, yet
-      // Dune::DiagonalMatrix does not.
-
-      // a.axpy(b, c);
-
-      for (typename C::ConstIterator i = c.begin(); i != c.end(); ++i) {
-        const size_t iindex = i.index();
-        for (typename C::row_type::ConstIterator j = i->begin(); j != i->end();
-             ++j)
-          ProductHelper<typename A::block_type, B, typename C::block_type,
-                        false, true, false>::addProduct(a[iindex][j.index()], b,
-                                                        *j);
-      }
-    }
-  };
-
-  template <class ABlock, class Scalar, class ScalarB, class CBlock>
-  struct ScaledProductHelper<Dune::BCRSMatrix<ABlock>, Scalar, ScalarB,
-                             Dune::BCRSMatrix<CBlock>, false, true, false> {
-    typedef Dune::BCRSMatrix<ABlock> A;
-    typedef ScalarB B;
-    typedef Dune::BCRSMatrix<CBlock> C;
-
-    static void addProduct(A& a, const Scalar& scalar, const B& b, const C& c) {
-      // Workaround for the fact that Dune::BCRSMatrix assumes
-      // its blocks to have an axpy() implementation, yet
-      // Dune::DiagonalMatrix does not.
-
-      // a.axpy(scalar*b, c);
-
-      for (typename C::ConstIterator i = c.begin(); i != c.end(); ++i) {
-        const size_t iindex = i.index();
-        for (typename C::row_type::ConstIterator j = i->begin(); j != i->end();
-             ++j)
-          ProductHelper<typename A::block_type, B, typename C::block_type,
-                        false, true, false>::addProduct(a[iindex][j.index()],
-                                                        scalar * b, *j);
-      }
-    }
-  };
-
   template <class T, int n, class ScalarB>
   struct ProductHelper<Dune::ScaledIdentityMatrix<T, n>, ScalarB,
                        Dune::ScaledIdentityMatrix<T, n>, false, true, false> {
-- 
GitLab