From 1fa7304f3d89d5a73a44dbb66f8ebcbcae535b5f Mon Sep 17 00:00:00 2001 From: Max Kahnt <max.kahnt@fu-berlin.de> Date: Mon, 25 Sep 2017 14:02:25 +0200 Subject: [PATCH] Foward readBinary to dune-matrix-vector module. --- dune/solvers/common/genericvectortools.hh | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/dune/solvers/common/genericvectortools.hh b/dune/solvers/common/genericvectortools.hh index 3357fbfd..269b8ff4 100644 --- a/dune/solvers/common/genericvectortools.hh +++ b/dune/solvers/common/genericvectortools.hh @@ -41,23 +41,9 @@ struct GenericVector template <class VectorType> static void readBinary(std::istream& s, VectorType& v) { - Dune::Hybrid::forEach(v, [&](auto&& vi) { - GenericVector::readBinary(s, vi); - }); + Dune::MatrixVector::Generic::readBinary(s, v); } - template <class field_type, int n> - static void readBinary(std::istream& s, Dune::FieldVector<field_type,n>& v) - { - typedef typename Dune::FieldVector<field_type,n> VectorType; - typename VectorType::iterator it = v.begin(); - typename VectorType::iterator end = v.end(); - for(; it!=end; ++it) - s.read(reinterpret_cast<char*>(&(*it)), sizeof(field_type)); - } - - - //! Resize vector recursivly to size of given vector/matrix template <class VectorTypeA, class VectorTypeB> static void resize(VectorTypeA& a, const VectorTypeB& b) -- GitLab