From 69599464bfbba976f93b3aeae9396e2f6b510495 Mon Sep 17 00:00:00 2001 From: bangerth Date: Tue, 15 Jan 2013 02:57:37 +0000 Subject: [PATCH] Replace one set of uses of a deprecated function. git-svn-id: https://svn.dealii.org/trunk@28057 0785d39b-7218-0410-832d-ea1e28bc413d --- .../lac/sparse_decomposition.templates.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/deal.II/include/deal.II/lac/sparse_decomposition.templates.h b/deal.II/include/deal.II/lac/sparse_decomposition.templates.h index 777aae6a24..b196265526 100644 --- a/deal.II/include/deal.II/lac/sparse_decomposition.templates.h +++ b/deal.II/include/deal.II/lac/sparse_decomposition.templates.h @@ -1,5 +1,5 @@ //--------------------------------------------------------------------------- -// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2011, 2012 by the deal.II authors +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2011, 2012, 2013 by the deal.II authors // by the deal.II authors and Stephen "Cheffo" Kolaroff // // This file is subject to QPL and may not be distributed @@ -251,17 +251,18 @@ SparseLUDecomposition::strengthen_diagonal_impl () // get the global index of the first // non-diagonal element in this row - const unsigned int rowstart - = this->get_sparsity_pattern().get_rowstart_indices()[row] + 1; - number *const diagonal_element = &this->global_entry(rowstart-1); + Assert (this->cols->optimize_diagonal(), ExcNotImplemented()); + typename SparseMatrix::iterator + diagonal_element = this->begin(row); number rowsum = 0; - for (unsigned int global_index=rowstart; - global_indexglobal_entry(global_index)); + for (typename SparseMatrix::iterator + p = diagonal_element + 1; + p != this->end(row); ++p) + rowsum += std::fabs(p->value()); - *diagonal_element += this->get_strengthen_diagonal (rowsum, row) * - rowsum; + diagonal_element->value() += this->get_strengthen_diagonal (rowsum, row) * + rowsum; } } -- 2.39.5