From 304e0a7bfceca846d814d65d7aac70e915c71081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Mon, 6 Oct 2014 11:08:44 +0200 Subject: [PATCH] Remove unneeded template argument. --- opm/autodiff/DuneMatrix.hpp | 10 +++++----- opm/autodiff/NewtonIterationBlackoilCPR.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/opm/autodiff/DuneMatrix.hpp b/opm/autodiff/DuneMatrix.hpp index d603c1596..d0ba04006 100644 --- a/opm/autodiff/DuneMatrix.hpp +++ b/opm/autodiff/DuneMatrix.hpp @@ -39,8 +39,7 @@ namespace Opm { - template - class DuneMatrix : public Dune::BCRSMatrix + class DuneMatrix : public Dune::BCRSMatrix< Dune::FieldMatrix > { public: DuneMatrix(const int rows, const int cols, const int* ia, const int* ja, const double* sa) @@ -48,7 +47,8 @@ namespace Opm // allocationSize(nnz), r(0), a(0), // avg(0), overflowsize(-1.0) { - typedef Dune::BCRSMatrix Super; + typedef Dune::BCRSMatrix< Dune::FieldMatrix > Super; + typedef Super::block_type block_type; this->build_mode = Super::unknown; this->ready = Super::built; this->n = rows; @@ -61,8 +61,8 @@ namespace Opm this->overflowsize = -1.0; #endif - this->a = new B[this->nnz]; - static_assert(sizeof(B) == sizeof(double), "This constructor requires a block type that is the same as a double."); + this->a = new block_type[this->nnz]; + static_assert(sizeof(block_type) == sizeof(double), "This constructor requires a block type that is the same as a double."); std::copy(sa, sa + this->nnz, reinterpret_cast(this->a)); this->j.reset(new typename Super::size_type[this->nnz]); std::copy(ja, ja +this-> nnz, this->j.get()); diff --git a/opm/autodiff/NewtonIterationBlackoilCPR.cpp b/opm/autodiff/NewtonIterationBlackoilCPR.cpp index 03485a664..5659d3121 100644 --- a/opm/autodiff/NewtonIterationBlackoilCPR.cpp +++ b/opm/autodiff/NewtonIterationBlackoilCPR.cpp @@ -466,7 +466,7 @@ namespace Opm const int* ia = matrix.outerIndexPtr(); const int* ja = matrix.innerIndexPtr(); const double* sa = matrix.valuePtr(); - return Opm::DuneMatrix(size, size, ia, ja, sa); + return Opm::DuneMatrix(size, size, ia, ja, sa); }