From: wolf Date: Mon, 7 Jun 2004 20:30:03 +0000 (+0000) Subject: Get rid of a redundant field in the accessor classes. Also get rid of some X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a05fc79b63104229ffcd5f31408d8a2265df61de;p=dealii-svn.git Get rid of a redundant field in the accessor classes. Also get rid of some operations that were previously necessary in each operator++ call, at the expense of some more work when calling accessor::row(). git-svn-id: https://svn.dealii.org/trunk@9406 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/block_matrix_base.h b/deal.II/lac/include/lac/block_matrix_base.h index aa2b77c8a6..11b1ae175c 100644 --- a/deal.II/lac/include/lac/block_matrix_base.h +++ b/deal.II/lac/include/lac/block_matrix_base.h @@ -120,12 +120,6 @@ namespace internal */ unsigned int row_block; - /** - * The global number of the first row - * of the block we are presently in. - */ - unsigned int row_start; - /** * Number of block column where * column lies in. @@ -797,7 +791,6 @@ namespace internal matrix(matrix), base_iterator(matrix->block(0,0).begin()), row_block(0), - row_start(0), col_block(0), col_start(0), a_index(0) @@ -810,7 +803,6 @@ namespace internal = matrix->row_block_indices.global_to_local(r); row_block = indices.first; base_iterator = matrix->block(indices.first, 0).begin(indices.second); - row_start = matrix->row_block_indices.local_to_global(row_block, 0); } else { @@ -825,7 +817,11 @@ namespace internal unsigned int Accessor::row() const { - return row_start + base_iterator->row(); + if (row_block < matrix->n_block_rows()) + return (matrix->row_block_indices.local_to_global(row_block, 0) + + base_iterator->row()); + else + return 0; } @@ -936,12 +932,6 @@ namespace internal // block row local_row = 0; ++accessor.row_block; - if (accessor.row_block < accessor.matrix->n_block_rows()) - accessor.row_start = - accessor.matrix->row_block_indices - .local_to_global(accessor.row_block, 0); - else - accessor.row_start = 0; } } // Finally, set base_iterator