]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Work around the same instance of a gcc3.4 compiler bug in three places.
authordeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 26 Apr 2004 23:50:38 +0000 (23:50 +0000)
committerdeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 26 Apr 2004 23:50:38 +0000 (23:50 +0000)
git-svn-id: https://svn.dealii.org/trunk@9104 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/block_sparse_matrix.templates.h
deal.II/lac/include/lac/sparse_vanka.templates.h
deal.II/lac/source/block_sparsity_pattern.cc

index c9adb4785be7fe2ca2e8d1fd0b90640e68cfcf96..afc6426a8614c79a11e592e7787ffde6aed9a84f 100644 (file)
@@ -113,9 +113,10 @@ reinit (const BlockSparsityPattern &sparsity)
   for (unsigned int r=0; r<rows; ++r)
     for (unsigned int c=0; c<columns; ++c)
       {
-       sub_objects[r][c] = new SparseMatrix<number>();
-       block(r,c).reinit (sparsity.block(r,c));
-      };
+        SparseMatrix<number> *p = new SparseMatrix<number>();
+        p->reinit (sparsity.block(r,c));
+       sub_objects[r][c] = p;
+      }
 }
 
 
index 79f53b60d4021c949cd8d351a3315c06ad213f90..21da0ae04ddd6c4f38609cbd9c542c92c5f18e92 100644 (file)
@@ -155,8 +155,10 @@ SparseVanka<number>::compute_inverse (const unsigned int         row,
     = matrix->get_sparsity_pattern();
 
   const unsigned int row_length = structure.row_length(row);
-  inverses[row] = new FullMatrix<float> (row_length,
-                                        row_length); 
+
+  FullMatrix<float> &this_inverse = *new FullMatrix<float> (row_length,
+                                                           row_length);
+  inverses[row] = &this_inverse;
 
                                   // collect the dofs that couple
                                   // with @p row
@@ -178,11 +180,11 @@ SparseVanka<number>::compute_inverse (const unsigned int         row,
        const unsigned int global_entry =
          structure(local_indices[i], local_indices[j]);
        if (global_entry != SparsityPattern::invalid_entry)
-         (*inverses[row])(i,j) = matrix->global_entry(global_entry);
+         this_inverse(i,j) = matrix->global_entry(global_entry);
       };
   
                                   // Compute inverse
-  inverses[row]->gauss_jordan();
+  this_inverse.gauss_jordan();
 }
 
 
index a9035836d0cda092fcb499d882cf9a2989ac58ad..092d1ca3c58aa067819a229052527c2b211df609 100644 (file)
@@ -86,7 +86,10 @@ reinit (const unsigned int n_block_rows,
                                   // allocate new objects
   for (unsigned int i=0; i<rows; ++i)
     for (unsigned int j=0; j<columns; ++j)
-      sub_objects[i][j] = new SparsityPatternBase;
+      {
+        SparsityPatternBase *p = new SparsityPatternBase;
+        sub_objects[i][j] = p;
+      }
 }
 
 

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.