From 11448dd3ad706df28e77a492809a8e175f2919d8 Mon Sep 17 00:00:00 2001
From: Christian Engwer <christi@dune-project.org>
Date: Fri, 7 Apr 2017 20:17:02 +0200
Subject: [PATCH] [bugfix] laplacian.hh test case didn't handle allocators
 properly

---
 dune/istl/test/laplacian.hh | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/dune/istl/test/laplacian.hh b/dune/istl/test/laplacian.hh
index fc2ff218e..a02ca932d 100644
--- a/dune/istl/test/laplacian.hh
+++ b/dune/istl/test/laplacian.hh
@@ -5,14 +5,14 @@
 #include <dune/istl/bcrsmatrix.hh>
 #include <dune/common/fvector.hh>
 
-template<class B>
-void setupSparsityPattern(Dune::BCRSMatrix<B>& A, int N)
+template<class B, class Alloc>
+void setupSparsityPattern(Dune::BCRSMatrix<B,Alloc>& A, int N)
 {
-  typedef typename Dune::BCRSMatrix<B> Matrix;
+  typedef typename Dune::BCRSMatrix<B,Alloc> Matrix;
   A.setSize(N*N, N*N, N*N*5);
   A.setBuildMode(Matrix::row_wise);
 
-  for (typename Dune::BCRSMatrix<B>::CreateIterator i = A.createbegin(); i != A.createend(); ++i) {
+  for (typename Dune::BCRSMatrix<B,Alloc>::CreateIterator i = A.createbegin(); i != A.createend(); ++i) {
     int x = i.index()%N; // x coordinate in the 2d field
     int y = i.index()/N;  // y coordinate in the 2d field
 
@@ -36,10 +36,10 @@ void setupSparsityPattern(Dune::BCRSMatrix<B>& A, int N)
 }
 
 
-template<class B>
-void setupLaplacian(Dune::BCRSMatrix<B>& A, int N)
+template<class B, class Alloc>
+void setupLaplacian(Dune::BCRSMatrix<B,Alloc>& A, int N)
 {
-  typedef typename Dune::BCRSMatrix<B>::field_type FieldType;
+  typedef typename Dune::BCRSMatrix<B,Alloc>::field_type FieldType;
 
   setupSparsityPattern(A,N);
 
@@ -53,7 +53,7 @@ void setupLaplacian(Dune::BCRSMatrix<B>& A, int N)
     b->operator[](b.index())=-1.0;
 
 
-  for (typename Dune::BCRSMatrix<B>::RowIterator i = A.begin(); i != A.end(); ++i) {
+  for (typename Dune::BCRSMatrix<B,Alloc>::RowIterator i = A.begin(); i != A.end(); ++i) {
     int x = i.index()%N; // x coordinate in the 2d field
     int y = i.index()/N;  // y coordinate in the 2d field
 
@@ -92,9 +92,9 @@ void setupLaplacian(Dune::BCRSMatrix<B>& A, int N)
     }
   }
 }
-template<int BS>
-void setBoundary(Dune::BlockVector<Dune::FieldVector<double,BS> >& lhs,
-                 Dune::BlockVector<Dune::FieldVector<double,BS> >& rhs,
+template<int BS, class Alloc>
+void setBoundary(Dune::BlockVector<Dune::FieldVector<double,BS>, Alloc>& lhs,
+                 Dune::BlockVector<Dune::FieldVector<double,BS>, Alloc>& rhs,
                  int N)
 {
   for(int i=0; i < lhs.size(); ++i) {
-- 
GitLab