]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Mostly small bugfixes.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 18 Mar 1998 15:42:31 +0000 (15:42 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 18 Mar 1998 15:42:31 +0000 (15:42 +0000)
git-svn-id: https://svn.dealii.org/trunk@79 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/dof_constraints.cc
deal.II/deal.II/source/dofs/dof_handler.cc

index ba588a6a1434a56163471f099c5555a2ef58a68b..66251c0e9a535f28719e0262c2fea9baf970b53c 100644 (file)
@@ -358,7 +358,9 @@ void ConstraintMatrix::condense (dSMatrix &uncondensed) const {
     distribute[lines[c].line] = c;
 
   int n_rows = sparsity.n_rows();
-  for (int row=0; row<n_rows; ++row)
+  for (int row=0; row<n_rows; ++row) 
+    {
+      
     if (distribute[row] == -1)
                                       // regular line. loop over cols
       for (int j=sparsity.rowstart[row]; j<sparsity.rowstart[row+1]; ++j)
@@ -402,6 +404,7 @@ void ConstraintMatrix::condense (dSMatrix &uncondensed) const {
                                   sparsity.colnums[j],
                                   uncondensed.val[j] *
                                   lines[distribute[row]].entries[q].second);
+               
                uncondensed.val[j] = 0.;
              }
            else
@@ -419,10 +422,12 @@ void ConstraintMatrix::condense (dSMatrix &uncondensed) const {
                                     uncondensed.val[j] *
                                     lines[distribute[row]].entries[p].second *
                                     lines[distribute[sparsity.colnums[j]]].entries[q].second);
+               
                uncondensed.val[j] = (row == sparsity.colnums[j] ?
                                      1. : 0. );
              };
          };
+    };
 };
 
 
index e88aa3bdd7d4772efd81f4b67dccf12a5eb72d69..1eface5a241374d857daa2a1d3abc5532d41313d 100644 (file)
@@ -1237,31 +1237,38 @@ unsigned int DoFHandler<1>::max_couplings_between_dofs () const {
 
 unsigned int DoFHandler<2>::max_couplings_between_dofs () const {
   Assert (selected_fe != 0, ExcNoFESelected());
-  unsigned int max_adjacent_cells = tria->max_adjacent_cells();
+  const unsigned int max_adjacent_cells = tria->max_adjacent_cells();
 
                                   // get these numbers by drawing pictures
                                   // and counting...
+                                  // example:
+                                  // x-----x--x--o
+                                  // |     |  |  |
+                                  // |     x--x--x
+                                  // |     |  |  |
+                                  // x--x--*--x--x
+                                  // |  |  |     |
+                                  // x--x--x     |
+                                  // |  |  |     |
+                                  // o--x--x-----x
+                                  // x = vertices connected with center vertex *;
+                                  //   = total of 17
+                                  // count lines -> 28 (don't forget to count
+                                  // mother and children separately!)
   if (max_adjacent_cells == 4)
-    return (13*selected_fe->dofs_per_vertex +
-           20*selected_fe->dofs_per_line +
+    return (17*selected_fe->dofs_per_vertex +
+           28*selected_fe->dofs_per_line +
            8*selected_fe->dofs_per_quad);
   else
     if (max_adjacent_cells == 5)
-      return (15*selected_fe->dofs_per_vertex +
-             23*selected_fe->dofs_per_line +
+      return (19*selected_fe->dofs_per_vertex +
+             27*selected_fe->dofs_per_line +
              9*selected_fe->dofs_per_quad);
     else
-      if (max_adjacent_cells == 6)
-                                        // are you really sure you
-                                        // want to use such grids??
-       return (19*selected_fe->dofs_per_vertex +
-               30*selected_fe->dofs_per_line +
-               16*selected_fe->dofs_per_quad);
-      else 
-       {
-         Assert (false, ExcNotImplemented());
-         return 0;
-       };
+      {
+       Assert (false, ExcNotImplemented());
+       return 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.