From d8e6de66b30e8a1968d7cbb0c1cee1ec9a4b8aff Mon Sep 17 00:00:00 2001
From: Max Kahnt <max.kahnt@fu-berlin.de>
Date: Mon, 25 Sep 2017 14:01:55 +0200
Subject: [PATCH] Forward writeBinary to dune-matrix-vector module.

---
 dune/solvers/common/genericvectortools.hh | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/dune/solvers/common/genericvectortools.hh b/dune/solvers/common/genericvectortools.hh
index b609be86..3357fbfd 100644
--- a/dune/solvers/common/genericvectortools.hh
+++ b/dune/solvers/common/genericvectortools.hh
@@ -34,19 +34,7 @@ struct GenericVector
     template <class VectorType>
     static void writeBinary(std::ostream& s, const VectorType& v)
     {
-        Dune::Hybrid::forEach(v, [&](auto&& vi) {
-            GenericVector::writeBinary(s, vi);
-        });
-    }
-
-    template <class field_type, int n>
-    static void writeBinary(std::ostream& s, const Dune::FieldVector<field_type,n>& v)
-    {
-        typedef typename Dune::FieldVector<field_type,n> VectorType;
-        typename VectorType::const_iterator it = v.begin();
-        typename VectorType::const_iterator end = v.end();
-        for(; it!=end; ++it)
-            s.write(reinterpret_cast<const char*>(&(*it)), sizeof(field_type));
+      Dune::MatrixVector::Generic::writeBinary(s, v);
     }
 
     //! Read vector from a given stream
-- 
GitLab