From 39bcb5af178de45da4bd1c25b489d83801e38076 Mon Sep 17 00:00:00 2001 From: wolf Date: Mon, 12 Sep 2005 01:23:10 +0000 Subject: [PATCH] Work around a bug in gcc 3.4.5pre. // // the explicit use of operator() // works around a bug in some gcc // versions (see PR 18803) git-svn-id: https://svn.dealii.org/trunk@11403 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/sparse_ilu.templates.h | 13 +++++++++++-- deal.II/lac/include/lac/sparse_vanka.templates.h | 6 +++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/deal.II/lac/include/lac/sparse_ilu.templates.h b/deal.II/lac/include/lac/sparse_ilu.templates.h index 256804576c..27b5731cdd 100644 --- a/deal.II/lac/include/lac/sparse_ilu.templates.h +++ b/deal.II/lac/include/lac/sparse_ilu.templates.h @@ -123,7 +123,11 @@ void SparseILU::decompose (const SparseMatrix &matrix, // columns are sorted within each // row correctly, but excluding // the main diagonal entry - const int global_index_ki = sparsity(*col_ptr,row); + // + // the explicit use of operator() + // works around a bug in some gcc + // versions (see PR 18803) + const int global_index_ki = sparsity.operator()(*col_ptr,row); if (global_index_ki != -1) this->diag_element(row) -= this->global_entry(global_index_ik) * @@ -144,8 +148,13 @@ void SparseILU::decompose (const SparseMatrix &matrix, // row linearly. I just didn't // have the time to figure out // the details. + // + // the explicit use of + // operator() works around a + // bug in some gcc versions + // (see PR 18803) const int global_index_ij = j - &column_numbers[0], - global_index_kj = sparsity(*col_ptr,*j); + global_index_kj = sparsity.operator()(*col_ptr,*j); if ((global_index_ij != -1) && (global_index_kj != -1)) this->global_entry(global_index_ij) -= this->global_entry(global_index_ik) * diff --git a/deal.II/lac/include/lac/sparse_vanka.templates.h b/deal.II/lac/include/lac/sparse_vanka.templates.h index 92a85e6897..6aa6320d8b 100644 --- a/deal.II/lac/include/lac/sparse_vanka.templates.h +++ b/deal.II/lac/include/lac/sparse_vanka.templates.h @@ -177,8 +177,12 @@ SparseVanka::compute_inverse (const unsigned int row, // matrix. if not, then leave // the value in the small // matrix at zero + // + // the explicit use of operator() + // works around a bug in some gcc + // versions (see PR 18803) const unsigned int global_entry = - structure(local_indices[i], local_indices[j]); + structure.operator()(local_indices[i], local_indices[j]); if (global_entry != SparsityPattern::invalid_entry) this_inverse(i,j) = matrix->global_entry(global_entry); }; -- 2.39.5