From a09a65f69f7c7927461651ebcce721d68c420772 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 4 Feb 2015 06:57:07 -0600 Subject: [PATCH] Remove deprecated function SparseMatrix::global_entry(). --- doc/news/changes.h | 2 +- include/deal.II/lac/sparse_matrix.h | 50 +--------------------- tests/deal.II/create_laplace_matrix_01.cc | 7 +-- tests/deal.II/create_laplace_matrix_01b.cc | 7 +-- tests/deal.II/create_laplace_matrix_02.cc | 5 ++- tests/deal.II/create_laplace_matrix_02b.cc | 5 ++- tests/deal.II/create_laplace_matrix_03.cc | 7 +-- tests/deal.II/create_laplace_matrix_03b.cc | 7 +-- tests/deal.II/create_laplace_matrix_04.cc | 5 ++- tests/deal.II/create_laplace_matrix_04b.cc | 5 ++- tests/deal.II/create_mass_matrix_01.cc | 7 +-- tests/deal.II/create_mass_matrix_01b.cc | 7 +-- tests/deal.II/create_mass_matrix_02.cc | 5 ++- tests/deal.II/create_mass_matrix_02b.cc | 5 ++- tests/deal.II/create_mass_matrix_03.cc | 7 +-- tests/deal.II/create_mass_matrix_03b.cc | 7 +-- tests/deal.II/create_mass_matrix_04.cc | 5 ++- tests/deal.II/create_mass_matrix_04b.cc | 5 ++- tests/deal.II/create_mass_matrix_05.cc | 5 ++- tests/deal.II/matrices.cc | 10 ++--- tests/fe/non_primitive_1.cc | 11 +++-- tests/fe/non_primitive_2.cc | 10 +++-- tests/hp/create_laplace_matrix_01.cc | 7 +-- tests/hp/create_laplace_matrix_01b.cc | 7 +-- tests/hp/create_laplace_matrix_02.cc | 5 ++- tests/hp/create_laplace_matrix_02b.cc | 5 ++- tests/hp/create_laplace_matrix_03.cc | 7 +-- tests/hp/create_laplace_matrix_03b.cc | 7 +-- tests/hp/create_laplace_matrix_04.cc | 5 ++- tests/hp/create_laplace_matrix_04b.cc | 5 ++- tests/hp/create_mass_matrix_01.cc | 7 +-- tests/hp/create_mass_matrix_01b.cc | 7 +-- tests/hp/create_mass_matrix_02.cc | 5 ++- tests/hp/create_mass_matrix_02b.cc | 5 ++- tests/hp/create_mass_matrix_03.cc | 7 +-- tests/hp/create_mass_matrix_03b.cc | 7 +-- tests/hp/create_mass_matrix_04.cc | 5 ++- tests/hp/create_mass_matrix_04b.cc | 5 ++- tests/hp/create_mass_matrix_05.cc | 5 ++- tests/hp/matrices.cc | 10 ++--- tests/hp/matrices_hp.cc | 10 ++--- tests/lac/sparse_matrices.cc | 12 +++--- 42 files changed, 155 insertions(+), 162 deletions(-) diff --git a/doc/news/changes.h b/doc/news/changes.h index 66902ba442..fa4556fab4 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -175,7 +175,7 @@ inconvenience this causes. - PETScWrappers::MPI::Vector constructors and reinit variants. - SparseMatrixIterators::Accessor and SparseMatrixIterators::Iterator constructors. - - SparseMatrix::raw_entry. + - SparseMatrix::raw_entry and SparseMatrix::global_entry.
With headers in deal.II/deal.II/: diff --git a/include/deal.II/lac/sparse_matrix.h b/include/deal.II/lac/sparse_matrix.h index 38156d2efc..3966ad640c 100644 --- a/include/deal.II/lac/sparse_matrix.h +++ b/include/deal.II/lac/sparse_matrix.h @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1999 - 2014 by the deal.II authors +// Copyright (C) 1999 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -997,28 +997,6 @@ public: */ number &diag_element (const size_type i); - /** - * This is for hackers. Get access to the ith element of this matrix. - * The elements are stored in a consecutive way, refer to the - * SparsityPattern class for more details. - * - * You should use this interface very carefully and only if you are - * absolutely sure to know what you do. You should also note that the - * structure of these arrays may change over time. If you change the layout - * yourself, you should also rename this function to avoid programs relying - * on outdated information! - * - * @deprecated Use iterator or const_iterator instead! - */ - number global_entry (const size_type i) const DEAL_II_DEPRECATED; - - /** - * Same as above, but with write access. You certainly know what you do? - * - * @deprecated Use iterator or const_iterator instead! - */ - number &global_entry (const size_type i) DEAL_II_DEPRECATED; - //@} /** * @name Multiplications @@ -1932,32 +1910,6 @@ number &SparseMatrix::diag_element (const size_type i) -template -inline -number SparseMatrix::global_entry (const size_type j) const -{ - Assert (cols != 0, ExcNotInitialized()); - Assert (j < cols->n_nonzero_elements(), - ExcIndexRange (j, 0, cols->n_nonzero_elements())); - - return val[j]; -} - - - -template -inline -number &SparseMatrix::global_entry (const size_type j) -{ - Assert (cols != 0, ExcNotInitialized()); - Assert (j < cols->n_nonzero_elements(), - ExcIndexRange (j, 0, cols->n_nonzero_elements())); - - return val[j]; -} - - - template template void diff --git a/tests/deal.II/create_laplace_matrix_01.cc b/tests/deal.II/create_laplace_matrix_01.cc index 25eb0d0122..2448982471 100644 --- a/tests/deal.II/create_laplace_matrix_01.cc +++ b/tests/deal.II/create_laplace_matrix_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -110,8 +110,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/deal.II/create_laplace_matrix_01b.cc b/tests/deal.II/create_laplace_matrix_01b.cc index 7113cacb77..59b106b892 100644 --- a/tests/deal.II/create_laplace_matrix_01b.cc +++ b/tests/deal.II/create_laplace_matrix_01b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -106,8 +106,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/deal.II/create_laplace_matrix_02.cc b/tests/deal.II/create_laplace_matrix_02.cc index b57c8de9b9..28bbf450b0 100644 --- a/tests/deal.II/create_laplace_matrix_02.cc +++ b/tests/deal.II/create_laplace_matrix_02.cc @@ -113,8 +113,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/deal.II/create_laplace_matrix_02b.cc b/tests/deal.II/create_laplace_matrix_02b.cc index 9fec82c7c2..81fdc6ccfb 100644 --- a/tests/deal.II/create_laplace_matrix_02b.cc +++ b/tests/deal.II/create_laplace_matrix_02b.cc @@ -109,8 +109,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/deal.II/create_laplace_matrix_03.cc b/tests/deal.II/create_laplace_matrix_03.cc index 2240fe5318..dbb752bf96 100644 --- a/tests/deal.II/create_laplace_matrix_03.cc +++ b/tests/deal.II/create_laplace_matrix_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -110,8 +110,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/deal.II/create_laplace_matrix_03b.cc b/tests/deal.II/create_laplace_matrix_03b.cc index 7e21b35bf9..71f75b01af 100644 --- a/tests/deal.II/create_laplace_matrix_03b.cc +++ b/tests/deal.II/create_laplace_matrix_03b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -108,8 +108,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/deal.II/create_laplace_matrix_04.cc b/tests/deal.II/create_laplace_matrix_04.cc index 7e0daaa00e..17516cca49 100644 --- a/tests/deal.II/create_laplace_matrix_04.cc +++ b/tests/deal.II/create_laplace_matrix_04.cc @@ -113,8 +113,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/deal.II/create_laplace_matrix_04b.cc b/tests/deal.II/create_laplace_matrix_04b.cc index c100dd47aa..e57a6e7cbf 100644 --- a/tests/deal.II/create_laplace_matrix_04b.cc +++ b/tests/deal.II/create_laplace_matrix_04b.cc @@ -111,8 +111,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/deal.II/create_mass_matrix_01.cc b/tests/deal.II/create_mass_matrix_01.cc index bb75e4ce1f..c82fdd7026 100644 --- a/tests/deal.II/create_mass_matrix_01.cc +++ b/tests/deal.II/create_mass_matrix_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -110,8 +110,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/deal.II/create_mass_matrix_01b.cc b/tests/deal.II/create_mass_matrix_01b.cc index 55307c100f..b192d55a12 100644 --- a/tests/deal.II/create_mass_matrix_01b.cc +++ b/tests/deal.II/create_mass_matrix_01b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -106,8 +106,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/deal.II/create_mass_matrix_02.cc b/tests/deal.II/create_mass_matrix_02.cc index 47d703f738..efefd345b7 100644 --- a/tests/deal.II/create_mass_matrix_02.cc +++ b/tests/deal.II/create_mass_matrix_02.cc @@ -113,8 +113,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/deal.II/create_mass_matrix_02b.cc b/tests/deal.II/create_mass_matrix_02b.cc index d96db02531..af26e7ad83 100644 --- a/tests/deal.II/create_mass_matrix_02b.cc +++ b/tests/deal.II/create_mass_matrix_02b.cc @@ -109,8 +109,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/deal.II/create_mass_matrix_03.cc b/tests/deal.II/create_mass_matrix_03.cc index 504f135b41..0da851c92d 100644 --- a/tests/deal.II/create_mass_matrix_03.cc +++ b/tests/deal.II/create_mass_matrix_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -110,8 +110,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/deal.II/create_mass_matrix_03b.cc b/tests/deal.II/create_mass_matrix_03b.cc index a3037cbca8..6d85f7ecb5 100644 --- a/tests/deal.II/create_mass_matrix_03b.cc +++ b/tests/deal.II/create_mass_matrix_03b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -108,8 +108,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/deal.II/create_mass_matrix_04.cc b/tests/deal.II/create_mass_matrix_04.cc index fb67861c64..2e5ff5a1a2 100644 --- a/tests/deal.II/create_mass_matrix_04.cc +++ b/tests/deal.II/create_mass_matrix_04.cc @@ -113,8 +113,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/deal.II/create_mass_matrix_04b.cc b/tests/deal.II/create_mass_matrix_04b.cc index 843f42b6ad..e89bec0bdb 100644 --- a/tests/deal.II/create_mass_matrix_04b.cc +++ b/tests/deal.II/create_mass_matrix_04b.cc @@ -111,8 +111,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/deal.II/create_mass_matrix_05.cc b/tests/deal.II/create_mass_matrix_05.cc index 95f5879d13..d8be9589f6 100644 --- a/tests/deal.II/create_mass_matrix_05.cc +++ b/tests/deal.II/create_mass_matrix_05.cc @@ -107,8 +107,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/deal.II/matrices.cc b/tests/deal.II/matrices.cc index 1839a1d5df..02f2c8c4ff 100644 --- a/tests/deal.II/matrices.cc +++ b/tests/deal.II/matrices.cc @@ -104,8 +104,7 @@ check_boundary (const DoFHandler &dof, // range of 1 or below, // multiply matrix by 100 to // make test more sensitive - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog.get_file_stream() << p->value() * 100 + << std::endl; }; if (dim > 1) diff --git a/tests/fe/non_primitive_1.cc b/tests/fe/non_primitive_1.cc index c35c1aabd3..93e8764ef5 100644 --- a/tests/fe/non_primitive_1.cc +++ b/tests/fe/non_primitive_1.cc @@ -318,13 +318,16 @@ test () // reduce the amount of data // written out a little bit, only // write every so-many-th element - for (unsigned int i=0; i::const_iterator p1 = A1.begin(), + p2 = A2.begin(), + p3 = A3.begin(); + for (unsigned int i=0; ivalue() << std::endl; + Assert (p1->value() == p2->value(), ExcInternalError()); - Assert (A1.global_entry(i) == A3.global_entry(i), + Assert (p1->value() == p3->value(), ExcInternalError()); }; } diff --git a/tests/fe/non_primitive_2.cc b/tests/fe/non_primitive_2.cc index 6fce78e0aa..529611ec0a 100644 --- a/tests/fe/non_primitive_2.cc +++ b/tests/fe/non_primitive_2.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2001 - 2014 by the deal.II authors +// Copyright (C) 2001 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -243,11 +243,13 @@ test (const unsigned int p) // reduce the amount of data // written out a little bit, only // write every so-many-th element - for (unsigned int i=0; i::const_iterator p2 = A2.begin(), + p3 = A3.begin(); + for (unsigned int i=0; ivalue() << std::endl; + Assert (p3->value() == p2->value(), ExcInternalError()); }; } diff --git a/tests/hp/create_laplace_matrix_01.cc b/tests/hp/create_laplace_matrix_01.cc index 52b77536a8..9928b24a67 100644 --- a/tests/hp/create_laplace_matrix_01.cc +++ b/tests/hp/create_laplace_matrix_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -121,8 +121,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/hp/create_laplace_matrix_01b.cc b/tests/hp/create_laplace_matrix_01b.cc index 4ef771843c..5af25ce6eb 100644 --- a/tests/hp/create_laplace_matrix_01b.cc +++ b/tests/hp/create_laplace_matrix_01b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -117,8 +117,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/hp/create_laplace_matrix_02.cc b/tests/hp/create_laplace_matrix_02.cc index f81d11f54f..dfdd758f31 100644 --- a/tests/hp/create_laplace_matrix_02.cc +++ b/tests/hp/create_laplace_matrix_02.cc @@ -126,8 +126,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/hp/create_laplace_matrix_02b.cc b/tests/hp/create_laplace_matrix_02b.cc index 332b0310a4..c485c5383a 100644 --- a/tests/hp/create_laplace_matrix_02b.cc +++ b/tests/hp/create_laplace_matrix_02b.cc @@ -122,8 +122,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/hp/create_laplace_matrix_03.cc b/tests/hp/create_laplace_matrix_03.cc index abf207715f..625ae6781e 100644 --- a/tests/hp/create_laplace_matrix_03.cc +++ b/tests/hp/create_laplace_matrix_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -121,8 +121,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/hp/create_laplace_matrix_03b.cc b/tests/hp/create_laplace_matrix_03b.cc index 218791ea8c..192d19d5d1 100644 --- a/tests/hp/create_laplace_matrix_03b.cc +++ b/tests/hp/create_laplace_matrix_03b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -119,8 +119,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/hp/create_laplace_matrix_04.cc b/tests/hp/create_laplace_matrix_04.cc index dbbda15615..a0b8e6107e 100644 --- a/tests/hp/create_laplace_matrix_04.cc +++ b/tests/hp/create_laplace_matrix_04.cc @@ -126,8 +126,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/hp/create_laplace_matrix_04b.cc b/tests/hp/create_laplace_matrix_04b.cc index e72d79da1a..ea70f64a43 100644 --- a/tests/hp/create_laplace_matrix_04b.cc +++ b/tests/hp/create_laplace_matrix_04b.cc @@ -124,8 +124,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/hp/create_mass_matrix_01.cc b/tests/hp/create_mass_matrix_01.cc index 6161f19849..4802a8fb57 100644 --- a/tests/hp/create_mass_matrix_01.cc +++ b/tests/hp/create_mass_matrix_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -121,8 +121,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/hp/create_mass_matrix_01b.cc b/tests/hp/create_mass_matrix_01b.cc index 61071b5d23..80ffaac79b 100644 --- a/tests/hp/create_mass_matrix_01b.cc +++ b/tests/hp/create_mass_matrix_01b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -117,8 +117,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/hp/create_mass_matrix_02.cc b/tests/hp/create_mass_matrix_02.cc index d19d488314..6347736d75 100644 --- a/tests/hp/create_mass_matrix_02.cc +++ b/tests/hp/create_mass_matrix_02.cc @@ -126,8 +126,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/hp/create_mass_matrix_02b.cc b/tests/hp/create_mass_matrix_02b.cc index e76b3fc1af..9579bded0f 100644 --- a/tests/hp/create_mass_matrix_02b.cc +++ b/tests/hp/create_mass_matrix_02b.cc @@ -122,8 +122,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/hp/create_mass_matrix_03.cc b/tests/hp/create_mass_matrix_03.cc index 54a42425b8..0e44d65216 100644 --- a/tests/hp/create_mass_matrix_03.cc +++ b/tests/hp/create_mass_matrix_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -121,8 +121,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/hp/create_mass_matrix_03b.cc b/tests/hp/create_mass_matrix_03b.cc index a2349e15c1..bc2f5abac8 100644 --- a/tests/hp/create_mass_matrix_03b.cc +++ b/tests/hp/create_mass_matrix_03b.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -121,8 +121,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/hp/create_mass_matrix_04.cc b/tests/hp/create_mass_matrix_04.cc index 71c61ba8f0..e298e05983 100644 --- a/tests/hp/create_mass_matrix_04.cc +++ b/tests/hp/create_mass_matrix_04.cc @@ -126,8 +126,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; deallog << "RHS vector: " << std::endl; diff --git a/tests/hp/create_mass_matrix_04b.cc b/tests/hp/create_mass_matrix_04b.cc index d303ef1589..7ba2b3e57c 100644 --- a/tests/hp/create_mass_matrix_04b.cc +++ b/tests/hp/create_mass_matrix_04b.cc @@ -124,8 +124,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/hp/create_mass_matrix_05.cc b/tests/hp/create_mass_matrix_05.cc index 280711c056..d6ea2a5011 100644 --- a/tests/hp/create_mass_matrix_05.cc +++ b/tests/hp/create_mass_matrix_05.cc @@ -122,8 +122,9 @@ check () // multiply matrix by 100 to // make test more sensitive deallog << "Matrix: " << std::endl; - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog << p->value() * 100 << std::endl; } diff --git a/tests/hp/matrices.cc b/tests/hp/matrices.cc index fb9ca157d0..1401daa177 100644 --- a/tests/hp/matrices.cc +++ b/tests/hp/matrices.cc @@ -109,8 +109,7 @@ check_boundary (const hp::DoFHandler &dof, // range of 1 or below, // multiply matrix by 100 to // make test more sensitive - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog.get_file_stream() << p->value() * 100 + << std::endl; }; if (dim > 1) diff --git a/tests/hp/matrices_hp.cc b/tests/hp/matrices_hp.cc index f5cb7d1336..b9611a9cb3 100644 --- a/tests/hp/matrices_hp.cc +++ b/tests/hp/matrices_hp.cc @@ -108,8 +108,7 @@ check_boundary (const hp::DoFHandler &dof, // range of 1 or below, // multiply matrix by 100 to // make test more sensitive - for (unsigned int i=0; i::const_iterator p=matrix.begin(); + p!=matrix.end(); ++p) + deallog.get_file_stream() << p->value() * 100 + << std::endl; }; if (dim > 1) diff --git a/tests/lac/sparse_matrices.cc b/tests/lac/sparse_matrices.cc index 98df20b6e1..b67f93911d 100644 --- a/tests/lac/sparse_matrices.cc +++ b/tests/lac/sparse_matrices.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1998 - 2014 by the deal.II authors +// Copyright (C) 1998 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -394,9 +394,11 @@ int main() std::remove ("sparse_matrices.tmp"); - for (unsigned int i=0; i::const_iterator p =A.begin(), + p_tmp=A_tmp.begin(); + for (; p!=A.end(); ++p, ++p_tmp) + if (std::fabs(p->value() - p_tmp->value()) <= + std::fabs(1e-14*p->value())) deallog << "write/read-error at global position " - << i << std::endl; + << (p-A.begin()) << std::endl; } -- 2.39.5