]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fixed some more issues with inhomogeneous constraints.
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 24 Feb 2009 13:59:41 +0000 (13:59 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 24 Feb 2009 13:59:41 +0000 (13:59 +0000)
git-svn-id: https://svn.dealii.org/trunk@18421 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_constraints.templates.h

index a8913a81f7a3080b6d4b69c2f5b7377a6d5688ae..a1ffb952c56801fad70c647b08e6b5da5b8aa9f2 100644 (file)
@@ -311,6 +311,13 @@ ConstraintMatrix::condense (const SparseMatrix<number> &uncondensed,
                                 uncondensed.global_entry(j) *
                                 next_constraint->entries[q].second *
                                 c->entries[p].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) * 
+                      next_constraint->entries[q].second *
+                      c->inhomogeneity;
            };
 
                                   // condense the vector
@@ -406,8 +413,8 @@ ConstraintMatrix::condense (SparseMatrix<number> &uncondensed,
                                   // row of the inhomogeneous constraint in
                                   // the matrix with Gauss elimination
                  if (use_vectors == true)
-                   vec(column) -= entry->value() * 
-                                  lines[distribute[column]].inhomogeneity;
+                   vec(row) -= 
+                     entry->value() * lines[distribute[column]].inhomogeneity;
 
                                                    // set old value to zero
                   entry->value() = 0.;
@@ -470,7 +477,7 @@ ConstraintMatrix::condense (SparseMatrix<number> &uncondensed,
                      if (use_vectors == true)
                        vec(lines[distribute[row]].entries[p].first) -= 
                          entry->value() * lines[distribute[row]].entries[p].second *
-                         lines[distribute[row]].inhomogeneity;
+                         lines[distribute[column]].inhomogeneity;
                    }
 
                                                    // set old entry to correct
@@ -604,8 +611,8 @@ ConstraintMatrix::condense (BlockSparseMatrix<number> &uncondensed,
                                   // row of the inhomogeneous constraint in
                                   // the matrix with Gauss elimination
                      if (use_vectors == true)
-                       vec(global_col) -= entry->value() * 
-                                          lines[distribute[global_col]].inhomogeneity;
+                       vec(row) -= entry->value() * 
+                                   lines[distribute[global_col]].inhomogeneity;
 
                       entry->value() = 0.;
                     }

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.