]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Remove some uses of a deprecated function.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 13 Jan 2013 19:59:59 +0000 (19:59 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 13 Jan 2013 19:59:59 +0000 (19:59 +0000)
git-svn-id: https://svn.dealii.org/trunk@28039 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/constraint_matrix.templates.h

index d1ad4d3565d5b8c4ef7b7c15469c03614fef9a96..1d21d55f8b6feb9766ce7b0731cf556cb4c5a9e1 100644 (file)
@@ -259,24 +259,26 @@ ConstraintMatrix::condense (const SparseMatrix<number> &uncondensed,
         // copy entries if column will not
         // be condensed away, distribute
         // otherwise
-        for (unsigned int j=uncondensed_struct.get_rowstart_indices()[row];
-             j<uncondensed_struct.get_rowstart_indices()[row+1]; ++j)
-          if (new_line[uncondensed_struct.get_column_numbers()[j]] != -1)
-            condensed.add (new_line[row], new_line[uncondensed_struct.get_column_numbers()[j]],
-                           uncondensed.global_entry(j));
+       for (typename SparseMatrix<number>::const_iterator
+              p = uncondensed.begin(row);
+            p != uncondensed.end(row); ++p)
+          if (new_line[p->column()] != -1)
+            condensed.add (new_line[row],
+                          new_line[p->column()],
+                           p->value());
           else
             {
               // let c point to the
               // constraint of this column
               std::vector<ConstraintLine>::const_iterator c = lines.begin();
-              while (c->line != uncondensed_struct.get_column_numbers()[j])
+              while (c->line != p->column())
                 ++c;
 
               for (unsigned int q=0; q!=c->entries.size(); ++q)
                 // distribute to rows with
                 // appropriate weight
                 condensed.add (new_line[row], new_line[c->entries[q].first],
-                               uncondensed.global_entry(j) * c->entries[q].second);
+                               p->value() * c->entries[q].second);
 
               // take care of inhomogeneity:
               // need to subtract this element from the
@@ -285,7 +287,7 @@ ConstraintMatrix::condense (const SparseMatrix<number> &uncondensed,
               // row of the inhomogeneous constraint in
               // the matrix with Gauss elimination
               if (use_vectors == true)
-                condensed_vector(new_line[row]) -= uncondensed.global_entry(j) *
+                condensed_vector(new_line[row]) -= p->value() *
                                                    c->inhomogeneity;
             }
 

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.