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

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

index 1d21d55f8b6feb9766ce7b0731cf556cb4c5a9e1..587e4fc30b31d2c4eb7b57a6beb18803ceffe734 100644 (file)
@@ -297,15 +297,16 @@ ConstraintMatrix::condense (const SparseMatrix<number> &uncondensed,
     else
       // line must be distributed
       {
-        for (unsigned int j=uncondensed_struct.get_rowstart_indices()[row];
-             j<uncondensed_struct.get_rowstart_indices()[row+1]; ++j)
+       for (typename SparseMatrix<number>::const_iterator
+              p = uncondensed.begin(row);
+            p != uncondensed.end(row); ++p)
           // for each column: distribute
-          if (new_line[uncondensed_struct.get_column_numbers()[j]] != -1)
+          if (new_line[p->column()] != -1)
             // column is not constrained
             for (unsigned int q=0; q!=next_constraint->entries.size(); ++q)
               condensed.add (new_line[next_constraint->entries[q].first],
-                             new_line[uncondensed_struct.get_column_numbers()[j]],
-                             uncondensed.global_entry(j) *
+                             new_line[p->column()],
+                             p->value() *
                              next_constraint->entries[q].second);
 
           else
@@ -315,24 +316,24 @@ ConstraintMatrix::condense (const SparseMatrix<number> &uncondensed,
               // 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 p=0; p!=c->entries.size(); ++p)
+              for (unsigned int r=0; r!=c->entries.size(); ++r)
                 for (unsigned int q=0; q!=next_constraint->entries.size(); ++q)
                   condensed.add (new_line[next_constraint->entries[q].first],
-                                 new_line[c->entries[p].first],
-                                 uncondensed.global_entry(j) *
-                                 next_constraint->entries[q].second *
-                                 c->entries[p].second);
+                                 new_line[c->entries[r].first],
+                                 p->value() *
+                                 next_constraint->entries[r].second *
+                                 c->entries[r].second);
 
               if (use_vectors == true)
                 for (unsigned int q=0; q!=next_constraint->entries.size(); ++q)
                   condensed_vector (new_line[next_constraint->entries[q].first])
-                  -= uncondensed.global_entry(j) *
+                   -= p->value() *
                      next_constraint->entries[q].second *
                      c->inhomogeneity;
-            };
+            }
 
         // condense the vector
         if (use_vectors == true)

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.