]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a number of issues to make the tests in hp/ run again.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 2 May 2006 14:43:26 +0000 (14:43 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 2 May 2006 14:43:26 +0000 (14:43 +0000)
git-svn-id: https://svn.dealii.org/trunk@12962 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/hp_dof_handler.cc

index d087b17f61e6864905d275754223b842d578e7c7..a1a07a7d56a688b47cffefe06b765d664eebb5cd 100644 (file)
@@ -1575,6 +1575,7 @@ namespace hp
   DoFHandler<1>::distribute_dofs_on_cell (active_cell_iterator &cell,
                                          unsigned int          next_free_dof)
   {
+//TODO[WB]: this may be completely bogus -- look through it    
                                      // get the fe for this cell
     const FiniteElement<1> &fe = cell->get_fe();
 
@@ -1597,11 +1598,13 @@ namespace hp
                 if (v==0) 
                   for (unsigned int d=0; d<fe.dofs_per_vertex; ++d)
                     cell->set_vertex_dof_index (0, d,
-                                                neighbor->vertex_dof_index (1, d));
+                                                neighbor->vertex_dof_index (1, d),
+                                               cell->active_fe_index());
                 else
                   for (unsigned int d=0; d<fe.dofs_per_vertex; ++d)
                     cell->set_vertex_dof_index (1, d,
-                                                neighbor->vertex_dof_index (0, d));
+                                                neighbor->vertex_dof_index (0, d),
+                                               cell->active_fe_index());
 
                                                  // next neighbor
                 continue;
@@ -1610,12 +1613,14 @@ namespace hp
             
                                          // otherwise: create dofs newly
         for (unsigned int d=0; d<fe.dofs_per_vertex; ++d)
-          cell->set_vertex_dof_index (v, d, next_free_dof++);
+          cell->set_vertex_dof_index (v, d, next_free_dof++,
+                                     cell->active_fe_index());
       };
   
                                      // dofs of line
     for (unsigned int d=0; d<fe.dofs_per_line; ++d)
-      cell->set_dof_index (d, next_free_dof++);
+      cell->set_dof_index (d, next_free_dof++,
+                          cell->active_fe_index());
 
                                      // note that this cell has been processed
     cell->set_user_flag ();
@@ -1633,6 +1638,7 @@ namespace hp
   DoFHandler<2>::distribute_dofs_on_cell (active_cell_iterator &cell,
                                          unsigned int          next_free_dof)
   {
+//TODO[WB]: Check for correctness    
                                      // get the fe for this cell
     const FiniteElement<2> &fe = cell->get_fe();
 
@@ -1642,9 +1648,11 @@ namespace hp
                                          // check whether dofs for this
                                          // vertex have been distributed
                                          // (only check the first dof)
-        if (cell->vertex_dof_index(vertex, 0) == invalid_dof_index)
+        if (cell->vertex_dof_index(vertex, 0, cell->active_fe_index())
+           == invalid_dof_index)
           for (unsigned int d=0; d<fe.dofs_per_vertex; ++d)
-            cell->set_vertex_dof_index (vertex, d, next_free_dof++);
+            cell->set_vertex_dof_index (vertex, d, next_free_dof++,
+                                       cell->active_fe_index());
     
                                      // for the four sides
 //TODO[?] Does not work for continuous FEs
@@ -1656,17 +1664,19 @@ namespace hp
                                            // distribute dofs if necessary:
                                            // check whether line dof is already
                                            // numbered (check only first dof)
-          if (line->dof_index(0) == invalid_dof_index)
+          if (line->dof_index(0,cell->active_fe_index()) == invalid_dof_index)
                                              // if not: distribute dofs
             for (unsigned int d=0; d<fe.dofs_per_line; ++d)
-              line->set_dof_index (d, next_free_dof++);
+              line->set_dof_index (d, next_free_dof++,
+                                  cell->active_fe_index());
         };
 
 
                                      // dofs of quad
     if (fe.dofs_per_quad > 0)
       for (unsigned int d=0; d<fe.dofs_per_quad; ++d)
-        cell->set_dof_index (d, next_free_dof++);
+        cell->set_dof_index (d, next_free_dof++,
+                            cell->active_fe_index());
 
 
                                      // note that this cell has been processed
@@ -1685,6 +1695,7 @@ namespace hp
   DoFHandler<3>::distribute_dofs_on_cell (active_cell_iterator &cell,
                                          unsigned int          next_free_dof)
   {
+//TODO[WB]: check for correctness    
                                      // get the fe for this cell
     const FiniteElement<3> &fe = cell->get_fe();
 
@@ -1694,9 +1705,11 @@ namespace hp
                                          // check whether dofs for this
                                          // vertex have been distributed
                                          // (only check the first dof)
-        if (cell->vertex_dof_index(vertex, 0) == invalid_dof_index)
+        if (cell->vertex_dof_index(vertex, 0,cell->active_fe_index())
+           == invalid_dof_index)
           for (unsigned int d=0; d<fe.dofs_per_vertex; ++d)
-            cell->set_vertex_dof_index (vertex, d, next_free_dof++);
+            cell->set_vertex_dof_index (vertex, d, next_free_dof++,
+                                       cell->active_fe_index());
     
                                      // for the lines
     if (fe.dofs_per_line > 0)
@@ -1707,10 +1720,11 @@ namespace hp
                                            // distribute dofs if necessary:
                                            // check whether line dof is already
                                            // numbered (check only first dof)
-          if (line->dof_index(0) == invalid_dof_index)
+          if (line->dof_index(0, cell->active_fe_index()) == invalid_dof_index)
                                              // if not: distribute dofs
             for (unsigned int d=0; d<fe.dofs_per_line; ++d)
-              line->set_dof_index (d, next_free_dof++);            
+              line->set_dof_index (d, next_free_dof++,
+                                  cell->active_fe_index());
         };
 
                                      // for the quads
@@ -1722,17 +1736,19 @@ namespace hp
                                            // distribute dofs if necessary:
                                            // check whether quad dof is already
                                            // numbered (check only first dof)
-          if (quad->dof_index(0) == invalid_dof_index)
+          if (quad->dof_index(0, cell->active_fe_index()) == invalid_dof_index)
                                              // if not: distribute dofs
             for (unsigned int d=0; d<fe.dofs_per_quad; ++d)
-              quad->set_dof_index (d, next_free_dof++);            
+              quad->set_dof_index (d, next_free_dof++,
+                                  cell->active_fe_index());
         };
 
 
                                      // dofs of hex
     if (fe.dofs_per_hex > 0)
       for (unsigned int d=0; d<fe.dofs_per_hex; ++d)
-        cell->set_dof_index (d, next_free_dof++);
+        cell->set_dof_index (d, next_free_dof++,
+                            cell->active_fe_index());
 
 
                                      // note that this cell has been processed

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.