From 1463dd5fc1e596efcc57947e448cb79066d7bd61 Mon Sep 17 00:00:00 2001 From: deal Date: Mon, 26 Apr 2004 23:50:38 +0000 Subject: [PATCH] Work around the same instance of a gcc3.4 compiler bug in three places. git-svn-id: https://svn.dealii.org/trunk@9104 0785d39b-7218-0410-832d-ea1e28bc413d --- .../lac/include/lac/block_sparse_matrix.templates.h | 7 ++++--- deal.II/lac/include/lac/sparse_vanka.templates.h | 10 ++++++---- deal.II/lac/source/block_sparsity_pattern.cc | 5 ++++- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/deal.II/lac/include/lac/block_sparse_matrix.templates.h b/deal.II/lac/include/lac/block_sparse_matrix.templates.h index c9adb4785b..afc6426a86 100644 --- a/deal.II/lac/include/lac/block_sparse_matrix.templates.h +++ b/deal.II/lac/include/lac/block_sparse_matrix.templates.h @@ -113,9 +113,10 @@ reinit (const BlockSparsityPattern &sparsity) for (unsigned int r=0; r(); - block(r,c).reinit (sparsity.block(r,c)); - }; + SparseMatrix *p = new SparseMatrix(); + p->reinit (sparsity.block(r,c)); + sub_objects[r][c] = p; + } } diff --git a/deal.II/lac/include/lac/sparse_vanka.templates.h b/deal.II/lac/include/lac/sparse_vanka.templates.h index 79f53b60d4..21da0ae04d 100644 --- a/deal.II/lac/include/lac/sparse_vanka.templates.h +++ b/deal.II/lac/include/lac/sparse_vanka.templates.h @@ -155,8 +155,10 @@ SparseVanka::compute_inverse (const unsigned int row, = matrix->get_sparsity_pattern(); const unsigned int row_length = structure.row_length(row); - inverses[row] = new FullMatrix (row_length, - row_length); + + FullMatrix &this_inverse = *new FullMatrix (row_length, + row_length); + inverses[row] = &this_inverse; // collect the dofs that couple // with @p row @@ -178,11 +180,11 @@ SparseVanka::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(); } diff --git a/deal.II/lac/source/block_sparsity_pattern.cc b/deal.II/lac/source/block_sparsity_pattern.cc index a9035836d0..092d1ca3c5 100644 --- a/deal.II/lac/source/block_sparsity_pattern.cc +++ b/deal.II/lac/source/block_sparsity_pattern.cc @@ -86,7 +86,10 @@ reinit (const unsigned int n_block_rows, // allocate new objects for (unsigned int i=0; i