]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make extract_boundary_dofs work with non-primitive elements.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 1 Oct 2002 15:54:08 +0000 (15:54 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 1 Oct 2002 15:54:08 +0000 (15:54 +0000)
git-svn-id: https://svn.dealii.org/trunk@6572 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/dof_tools.cc

index cea40f5b4ac80880c0ba447878d03c3445a839fa..52ae19eae4ea38d7b2243b4a9c1d2c56a876aa8e 100644 (file)
@@ -1124,6 +1124,13 @@ DoFTools::extract_boundary_dofs (const DoFHandler<dim>         &dof_handler,
                                   // indicators or whether we can
                                   // accept all
   const bool check_boundary_indicator = (boundary_indicators.size() != 0);
+
+                                   // also see whether we have to
+                                   // check whether a certain vector
+                                   // component is selected, or all
+  const bool check_vector_component
+    = (component_select != std::vector<bool>(component_select.size(),
+                                             true));
   
                                   // clear and reset array by default
                                   // values
@@ -1154,9 +1161,13 @@ DoFTools::extract_boundary_dofs (const DoFHandler<dim>         &dof_handler,
             != boundary_indicators.end()))
          {
            cell->face(face)->get_dof_indices (face_dof_indices);
+
            for (unsigned int i=0; i<dof_handler.get_fe().dofs_per_face; ++i)
-             if (component_select[dof_handler.get_fe().
-                                 face_system_to_component_index(i).first] == true)
+             if (!check_vector_component
+                  ||
+                  (component_select[dof_handler.get_fe().
+                                    face_system_to_component_index(i).first]
+                   == true))
                selected_dofs[face_dof_indices[i]] = true;
          };
 };

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.