]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Same for the 1d function.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 1 Oct 2002 15:55:48 +0000 (15:55 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 1 Oct 2002 15:55:48 +0000 (15:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@6573 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 52ae19eae4ea38d7b2243b4a9c1d2c56a876aa8e..03594a90803bd92589a569cccb388dfbde576316 100644 (file)
@@ -1204,6 +1204,13 @@ DoFTools::extract_boundary_dofs (const DoFHandler<1>      &dof_handler,
   const bool check_right_vertex = ((boundary_indicators.size() == 0) ||
                                   (boundary_indicators.find(1) !=
                                    boundary_indicators.end()));
+
+                                   // 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));
   
                                   // loop over coarse grid cells
   for (DoFHandler<1>::cell_iterator cell=dof_handler.begin(0);
@@ -1213,15 +1220,19 @@ DoFTools::extract_boundary_dofs (const DoFHandler<1>      &dof_handler,
       if (check_left_vertex)
        if (cell->neighbor(0) == dof_handler.end())
          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[cell->vertex_dof_index(0,i)] = true;
                                       // check right-most vertex
       if (check_right_vertex)
        if (cell->neighbor(1) == dof_handler.end())
          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[cell->vertex_dof_index(1,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.