]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Get rid of more duplicated data.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 7 Jun 2004 20:35:28 +0000 (20:35 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 7 Jun 2004 20:35:28 +0000 (20:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@9407 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/block_matrix_base.h

index 11b1ae175c835c9b632fc03ed572c10b104a96c7..78965de50bf80f8b4358a34b71714b8471f4cb16 100644 (file)
@@ -126,11 +126,6 @@ namespace internal
                                          */
        unsigned int col_block;
        
-                                        /**
-                                         * First column of block.
-                                         */
-       unsigned int col_start;
-       
                                         /**
                                          * Index in whole row.
                                          */
@@ -792,7 +787,6 @@ namespace internal
                     base_iterator(matrix->block(0,0).begin()),
                     row_block(0),
                     col_block(0),
-                    col_start(0),
                     a_index(0)
     {
       Assert (i==0, ExcNotImplemented());
@@ -839,7 +833,14 @@ namespace internal
     unsigned int
     Accessor<BlockMatrix>::column() const
     {
-      return col_start + base_iterator->column();
+                                       // note: the block column should always
+                                       // be valid, in contrast to the block
+                                       // row, which may be past the end of
+                                       // the matrix. thus, unlike in the
+                                       // row() function, we do not have to
+                                       // if-else here
+      return (matrix->column_block_indices.local_to_global(col_block,0) +
+              base_iterator->column());
     }
 
 
@@ -912,16 +913,12 @@ namespace internal
                                                // row
 //TODO: what if this row in that block is empty?          
               ++accessor.col_block;
-              accessor.col_start =
-                accessor.matrix->column_block_indices
-                .local_to_global(accessor.col_block, 0);
             }
           else
             {
                                                // Advance to first block
                                                // in next row
               accessor.col_block = 0;
-              accessor.col_start = 0;
               accessor.a_index = 0;
               ++local_row;
               if (local_row >=

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.