From: bangerth Date: Sat, 9 Feb 2013 05:33:25 +0000 (+0000) Subject: Merge from mainline. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99c356af963a882f3d36d7b4a7a9c978d000f525;p=dealii-svn.git Merge from mainline. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@28295 0785d39b-7218-0410-832d-ea1e28bc413d --- 99c356af963a882f3d36d7b4a7a9c978d000f525 diff --cc deal.II/include/deal.II/lac/chunk_sparse_matrix.h index cacc1a5aba,1179da45fa..aac418b41e --- a/deal.II/include/deal.II/lac/chunk_sparse_matrix.h +++ b/deal.II/include/deal.II/lac/chunk_sparse_matrix.h @@@ -1428,10 -1427,10 +1427,10 @@@ number ChunkSparseMatrix::el (c template inline -number ChunkSparseMatrix::diag_element (const unsigned int i) const +number ChunkSparseMatrix::diag_element (const types::global_dof_index i) const { Assert (cols != 0, ExcNotInitialized()); - Assert (cols->optimize_diagonal(), ExcNotQuadratic()); + Assert (m() == n(), ExcNotQuadratic()); Assert (i inline -number &ChunkSparseMatrix::diag_element (const unsigned int i) +number &ChunkSparseMatrix::diag_element (const types::global_dof_index i) { Assert (cols != 0, ExcNotInitialized()); - Assert (cols->optimize_diagonal(), ExcNotQuadratic()); + Assert (m() == n(), ExcNotQuadratic()); Assert (i &row_lengths, + const unsigned int chunk_size); + + /** + * @deprecated This constructor is deprecated. Use the version + * without the last argument + */ + ChunkSparsityPattern (const unsigned int m, + const unsigned int n, + const std::vector &row_lengths, const unsigned int chunk_size, - const bool optimize_diagonal = true); + const bool optimize_diagonal) DEAL_II_DEPRECATED; /** * Initialize a quadratic matrix @@@ -189,15 -195,19 +195,19 @@@ * number of nonzero entries for * each row. This vector must * have one entry for each row. - * - * @arg optimize_diagonal store - * diagonal entries first in row; - * see optimize_diagonal(). */ - ChunkSparsityPattern (const unsigned int m, + ChunkSparsityPattern (const types::global_dof_index m, + const std::vector &row_lengths, + const unsigned int chunk_size); + + /** + * @deprecated This constructor is deprecated. Use the version + * without the last argument + */ + ChunkSparsityPattern (const unsigned int m, const std::vector &row_lengths, const unsigned int chunk_size, - const bool optimize_diagonal = true); + const bool optimize_diagonal) DEAL_II_DEPRECATED; /** * Destructor. @@@ -225,11 -235,20 +235,20 @@@ * operations to the other * reinit function. */ - void reinit (const unsigned int m, - const unsigned int n, + void reinit (const types::global_dof_index m, + const types::global_dof_index n, const unsigned int max_per_row, + const unsigned int chunk_size); + + /** + * @deprecated This function is deprecated. Use the function + * without the last argument + */ + void reinit (const unsigned int m, + const unsigned int n, + const unsigned int max_per_row, const unsigned int chunk_size, - const bool optimize_diagonal = true); + const bool optimize_diagonal) DEAL_II_DEPRECATED; /** * Reallocate memory for a matrix @@@ -256,21 -274,39 +274,39 @@@ * optimized access in relaxation * methods of SparseMatrix. */ - void reinit (const unsigned int m, - const unsigned int n, + void reinit (const types::global_dof_index m, + const types::global_dof_index n, const std::vector &row_lengths, + const unsigned int chunk_size); + + /** + * @deprecated This function is deprecated. Use the function + * without the last argument + */ + void reinit (const unsigned int m, + const unsigned int n, + const std::vector &row_lengths, const unsigned int chunk_size, - const bool optimize_diagonal = true); + const bool optimize_diagonal) DEAL_II_DEPRECATED; /** * Same as above, but with a * VectorSlice argument instead. */ - void reinit (const unsigned int m, - const unsigned int n, + void reinit (const types::global_dof_index m, + const types::global_dof_index n, const VectorSlice > &row_lengths, + const unsigned int chunk_size); + + /** + * @deprecated This function is deprecated. Use the function + * without the last argument + */ + void reinit (const unsigned int m, + const unsigned int n, + const VectorSlice > &row_lengths, const unsigned int chunk_size, - const bool optimize_diagonal = true); + const bool optimize_diagonal) DEAL_II_DEPRECATED; /** * This function compresses the sparsity @@@ -433,12 -469,23 +469,23 @@@ * pairs. */ template - void copy_from (const unsigned int n_rows, - const unsigned int n_cols, + void copy_from (const types::global_dof_index n_rows, + const types::global_dof_index n_cols, const ForwardIterator begin, const ForwardIterator end, + const unsigned int chunk_size); + + /** + * @deprecated This function is deprecated. Use the function + * without the last argument + */ + template + void copy_from (const unsigned int n_rows, + const unsigned int n_cols, + const ForwardIterator begin, + const ForwardIterator end, const unsigned int chunk_size, - const bool optimize_diagonal = true); + const bool optimize_diagonal) DEAL_II_DEPRECATED; /** * Copy data from an object of type diff --cc deal.II/source/lac/chunk_sparsity_pattern.cc index b7d1484d3e,2983d2b747..f81514b49b --- a/deal.II/source/lac/chunk_sparsity_pattern.cc +++ b/deal.II/source/lac/chunk_sparsity_pattern.cc @@@ -2,7 -2,7 +2,7 @@@ // $Id$ // Version: $Name$ // --// Copyright (C) 2008, 2011, 2012 by the deal.II authors ++// Copyright (C) 2008, 2011, 2012, 2013 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@@ -42,11 -42,11 +42,11 @@@ ChunkSparsityPattern::ChunkSparsityPatt -ChunkSparsityPattern::ChunkSparsityPattern (const unsigned int m, - const unsigned int n, +ChunkSparsityPattern::ChunkSparsityPattern (const types::global_dof_index m, + const types::global_dof_index n, const unsigned int max_per_row, const unsigned int chunk_size, - const bool optimize_diag) + const bool) { Assert (chunk_size > 0, ExcInvalidNumber (chunk_size)); @@@ -112,11 -148,21 +148,21 @@@ ChunkSparsityPattern::operator = (cons void -ChunkSparsityPattern::reinit (const unsigned int m, - const unsigned int n, +ChunkSparsityPattern::reinit (const types::global_dof_index m, + const types::global_dof_index n, const unsigned int max_per_row, const unsigned int chunk_size, - const bool optimize_diag) + const bool) + { + reinit (m, n, max_per_row, chunk_size); + } + + + void + ChunkSparsityPattern::reinit (const unsigned int m, + const unsigned int n, + const unsigned int max_per_row, + const unsigned int chunk_size) { Assert (chunk_size > 0, ExcInvalidNumber (chunk_size)); @@@ -130,11 -176,22 +176,22 @@@ void ChunkSparsityPattern::reinit ( - const unsigned int m, - const unsigned int n, + const types::global_dof_index m, + const types::global_dof_index n, const VectorSlice > &row_lengths, const unsigned int chunk_size, - const bool optimize_diag) + const bool) + { + reinit (m, n, row_lengths, chunk_size); + } + + + void + ChunkSparsityPattern::reinit ( + const unsigned int m, + const unsigned int n, + const VectorSlice > &row_lengths, + const unsigned int chunk_size) { Assert (row_lengths.size() == m, ExcInvalidNumber (m)); Assert (chunk_size > 0, ExcInvalidNumber (chunk_size)); @@@ -253,11 -326,22 +326,22 @@@ void ChunkSparsityPattern::copy_from (c void ChunkSparsityPattern::reinit ( - const unsigned int m, - const unsigned int n, + const types::global_dof_index m, + const types::global_dof_index n, const std::vector &row_lengths, const unsigned int chunk_size, - const bool optimize_diag) + const bool) + { + reinit (m, n, row_lengths, chunk_size); + } + + + void + ChunkSparsityPattern::reinit ( + const unsigned int m, + const unsigned int n, + const std::vector &row_lengths, + const unsigned int chunk_size) { Assert (chunk_size > 0, ExcInvalidNumber (chunk_size));