]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Update comments and output
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 19 Sep 2006 03:36:23 +0000 (03:36 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 19 Sep 2006 03:36:23 +0000 (03:36 +0000)
git-svn-id: https://svn.dealii.org/trunk@13929 0785d39b-7218-0410-832d-ea1e28bc413d

tests/hp/crash_09.cc

index 0fc2f56c96930a8b0438e064b2ed120946c1cb95..5bfd8fae618e3b2b051cca13ea240494b04e1822 100644 (file)
@@ -52,15 +52,14 @@ int main ()
   deallog.threshold_double(1.e-10);
 
 
-                                  // create a mesh like this:
+                                  // create a mesh like this (viewed
+                                  // from top):
                                   //
-                                  // *---*---*---*
-                                  // | 6 | 7 | 8 |
-                                  // *---*---*---*
-                                  // | 3 | 4 | 5 |
-                                  // *---*---*---*
-                                  // | 0 | 1 | 2 |
-                                  // *---*---*---*
+                                  // *---*---*
+                                  // | 2 | 3 |
+                                  // *---*---*
+                                  // | 0 | 1 |
+                                  // *---*---*
   Triangulation<3>     triangulation;
   std::vector<unsigned int> subdivisions (3, 2);
   subdivisions[2] = 1;
@@ -74,6 +73,29 @@ int main ()
 
   hp::DoFHandler<3>        dof_handler(triangulation);
 
+                                  // assign polynomial degrees like this:
+                                   //
+                                  // *---*---*
+                                  // | 1 | 3 |
+                                  // *---*---*
+                                  // | 1 | 2 |
+                                  // *---*---*
+                                   //
+                                   // what happens here is that we
+                                   // first constraint the common face
+                                   // between cells 0 and 1, then
+                                   // between cells 1 and 3. During
+                                   // the latter operation, the line
+                                   // dofs of the Q3 are constrained
+                                   // against those of the lines dofs
+                                   // of the Q2. Later, we come back
+                                   // and do the face between cells 2
+                                   // and 3, where we want to
+                                   // constrain the line dofs of the
+                                   // Q3 again, but this time against
+                                   // a Q1. this leads to conflicts
+                                   // with the constraints previously
+                                   // entered
   hp::DoFHandler<3>::active_cell_iterator
     cell = dof_handler.begin_active();
   cell->set_active_fe_index (0);
@@ -86,6 +108,27 @@ int main ()
 
   dof_handler.distribute_dofs (fe);
   
+                                   // for illustrative purposes, print
+                                   // out the numbers of the dofs that
+                                   // belong to the shared edge
+                                   // (that's the one that has three
+                                   // different fe indices associated
+                                   // with it)
+  for (hp::DoFHandler<3>::active_line_iterator line = dof_handler.begin_active_line();
+       line != dof_handler.end_line(); ++line)
+    if (line->n_active_fe_indices() == 3)
+      {
+       deallog << "Shared line: " << line << std::endl;
+       for (unsigned int i=0; i<3; ++i)
+         {
+           deallog << "DoF indices for fe_index=" << i << ": ";
+           std::vector<unsigned int> line_dofs (fe[i].dofs_per_line + 2*fe[i].dofs_per_vertex);
+           line->get_dof_indices (line_dofs, i);
+           for (unsigned int j=0; j<fe[i].dofs_per_line + 2*fe[i].dofs_per_vertex; ++j)
+             deallog << line_dofs[j] << ' ';
+           deallog << std::endl;
+         }
+      }
   ConstraintMatrix constraints;
   DoFTools::make_hanging_node_constraints (dof_handler,
                                           constraints);

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.