From 8ff87bd7ea6ffd98835f87b4e44bc9a7bf76be1b Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 30 Aug 2015 10:56:19 -0500 Subject: [PATCH] Bugfix: Replace 'size_t' with 'unsigned int' where appropriate A this places 'unsigned int' is more appropriate than 'size_t' because it matches the signature of the underlying methods it deals with. 'size_t' is only used to match std::array. --- include/deal.II/lac/block_linear_operator.h | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/include/deal.II/lac/block_linear_operator.h b/include/deal.II/lac/block_linear_operator.h index acfbdfba93..fea013f4ca 100644 --- a/include/deal.II/lac/block_linear_operator.h +++ b/include/deal.II/lac/block_linear_operator.h @@ -290,7 +290,7 @@ namespace internal v.reinit(m); // And reinitialize every individual block with reinit_range_vectors: - for (size_t i = 0; i < m; ++i) + for (unsigned int i = 0; i < m; ++i) op.block(i, 0).reinit_range_vector(v.block(i), fast); v.collect_sizes(); @@ -304,7 +304,7 @@ namespace internal v.reinit(n); // And reinitialize every individual block with reinit_domain_vectors: - for (size_t i = 0; i < n; ++i) + for (unsigned int i = 0; i < n; ++i) op.block(0, i).reinit_domain_vector(v.block(i), fast); v.collect_sizes(); @@ -317,10 +317,10 @@ namespace internal Assert(v.n_blocks() == m, ExcDimensionMismatch(v.n_blocks(), m)); Assert(u.n_blocks() == n, ExcDimensionMismatch(u.n_blocks(), n)); - for (size_t i = 0; i < m; ++i) + for (unsigned int i = 0; i < m; ++i) { op.block(i, 0).vmult(v.block(i), u.block(0)); - for (size_t j = 1; j < n; ++j) + for (unsigned int j = 1; j < n; ++j) op.block(i, j).vmult_add(v.block(i), u.block(j)); } }; @@ -332,8 +332,8 @@ namespace internal Assert(v.n_blocks() == m, ExcDimensionMismatch(v.n_blocks(), m)); Assert(u.n_blocks() == n, ExcDimensionMismatch(u.n_blocks(), n)); - for (size_t i = 0; i < m; ++i) - for (size_t j = 0; j < n; ++j) + for (unsigned int i = 0; i < m; ++i) + for (unsigned int j = 0; j < n; ++j) op.block(i, j).vmult_add(v.block(i), u.block(j)); }; @@ -344,10 +344,10 @@ namespace internal Assert(v.n_blocks() == n, ExcDimensionMismatch(v.n_blocks(), n)); Assert(u.n_blocks() == m, ExcDimensionMismatch(u.n_blocks(), m)); - for (size_t i = 0; i < n; ++i) + for (unsigned int i = 0; i < n; ++i) { op.block(0, i).Tvmult(v.block(i), u.block(0)); - for (size_t j = 1; j < m; ++j) + for (unsigned int j = 1; j < m; ++j) op.block(j, i).Tvmult_add(v.block(i), u.block(j)); } }; @@ -359,8 +359,8 @@ namespace internal Assert(v.n_blocks() == n, ExcDimensionMismatch(v.n_blocks(), n)); Assert(u.n_blocks() == m, ExcDimensionMismatch(u.n_blocks(), m)); - for (size_t i = 0; i < n; ++i) - for (size_t j = 0; j < m; ++j) + for (unsigned int i = 0; i < n; ++i) + for (unsigned int j = 0; j < m; ++j) op.block(j, i).Tvmult_add(v.block(i), u.block(j)); }; } @@ -573,8 +573,8 @@ block_diagonal_operator(const std::array