]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Bug fixed in make_flux_sparsity_pattern_edge
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Wed, 13 Dec 2000 17:17:49 +0000 (17:17 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Wed, 13 Dec 2000 17:17:49 +0000 (17:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@3531 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/multigrid/mg_dof_tools.cc

index 6da824e9b2477961dc68833516205fbde7fddec5..0c1e34ccef9264827335c59e8f89cc0e541fef7d 100644 (file)
@@ -117,6 +117,8 @@ MGDoFTools::make_flux_sparsity_pattern_edge (const MGDoFHandler<dim> &dof,
   const unsigned int fine_dofs = dof.n_dofs(level);
   const unsigned int coarse_dofs = dof.n_dofs(level-1);
   
+  // Matrix maps from fine level to coarse level
+
   Assert (sparsity.n_rows() == coarse_dofs,
          ExcDimensionMismatch (sparsity.n_rows(), coarse_dofs));
   Assert (sparsity.n_cols() == fine_dofs,
@@ -135,6 +137,8 @@ MGDoFTools::make_flux_sparsity_pattern_edge (const MGDoFHandler<dim> &dof,
           face < GeometryInfo<dim>::faces_per_cell;
           ++face)
        {
+         // Neighbor is coarser
+
          if ( (! cell->at_boundary(face)) &&
               (static_cast<unsigned int>(cell->neighbor_level(face)) != level) )
            {
@@ -145,10 +149,10 @@ MGDoFTools::make_flux_sparsity_pattern_edge (const MGDoFHandler<dim> &dof,
                {
                  for (unsigned int j=0; j<dofs_per_cell; ++j)
                    {
-                     sparsity.add (dofs_on_this_cell[i],
-                                   dofs_on_other_cell[j]);
-                     sparsity.add (dofs_on_this_cell[j],
-                                   dofs_on_other_cell[i]);
+                     sparsity.add (dofs_on_other_cell[i],
+                                   dofs_on_this_cell[j]);
+                     sparsity.add (dofs_on_other_cell[j],
+                                   dofs_on_this_cell[i]);
                    }
                }
            }

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.