]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Work around a bug in gcc 3.4.5pre.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 12 Sep 2005 01:23:10 +0000 (01:23 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 12 Sep 2005 01:23:10 +0000 (01:23 +0000)
                                         //
                                         // 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
deal.II/lac/include/lac/sparse_vanka.templates.h

index 256804576c95bea3ac5cad42f519526ad973dd2c..27b5731cdd3be648cedc49e016b2452cf078e298 100644 (file)
@@ -123,7 +123,11 @@ void SparseILU<number>::decompose (const SparseMatrix<somenumber> &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<number>::decompose (const SparseMatrix<somenumber> &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) *
index 92a85e68974f83fdd5b0fddc77b72fa77a7d5490..6aa6320d8b49b73e4283bcda5f5ca91ea8bb7fd5 100644 (file)
@@ -177,8 +177,12 @@ SparseVanka<number>::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);
       };

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.