From d40a7b91bb24f750997fc7bc20b4dd024ae61d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20Gr=C3=A4ser?= <graeser@dune-project.org> Date: Wed, 2 May 2012 14:24:16 +0000 Subject: [PATCH] Check construction of DiagonalMatrix from FieldVector<T,1> Since FieldVector<T,1> should be usable like T this should work. Currently this fails due to an ambigous overload (see fs#1024). [[Imported from SVN: r1572]] --- dune/istl/test/matrixtest.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/dune/istl/test/matrixtest.cc b/dune/istl/test/matrixtest.cc index f9105a180..e71743cf7 100644 --- a/dune/istl/test/matrixtest.cc +++ b/dune/istl/test/matrixtest.cc @@ -433,10 +433,18 @@ int main() // Test the DiagonalMatrix class // //////////////////////////////////////////////////////////////////////// - DiagonalMatrix<double,4> dMatrix; - dMatrix = 3.1459; + FieldVector<double,1> dMatrixConstructFrom; + dMatrixConstructFrom = 3.1459; - testMatrix(dMatrix, fvX, fvY); + DiagonalMatrix<double,4> dMatrix1; + dMatrix1 = 3.1459; + testMatrix(dMatrix1, fvX, fvY); + + DiagonalMatrix<double,4> dMatrix2(3.1459); + testMatrix(dMatrix2, fvX, fvY); + + DiagonalMatrix<double,4> dMatrix3(dMatrixConstructFrom); + testMatrix(dMatrix3, fvX, fvY); // //////////////////////////////////////////////////////////////////////// // Test the ScaledIdentityMatrix class -- GitLab