From: wolf Date: Thu, 15 Jul 1999 12:09:30 +0000 (+0000) Subject: Cosmetic updates. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=807d70065923a087e0f566172f5c02665d483ed3;p=dealii-svn.git Cosmetic updates. git-svn-id: https://svn.dealii.org/trunk@1579 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/dofs/dof_tools.h b/deal.II/deal.II/include/dofs/dof_tools.h index 08460bdbfa..2e7fb466cc 100644 --- a/deal.II/deal.II/include/dofs/dof_tools.h +++ b/deal.II/deal.II/include/dofs/dof_tools.h @@ -25,25 +25,29 @@ class DoFTools { public: /** - * Extract DoFs of components. - * The bit vector #select# + * Extract the indices of the degrees + * of freedom belonging to certain + * components. The bit vector #select# * defines, which components of an * #FESystem# are to be extracted * from the DoFHandler #dof#. The - * numbers of these dofs are then - * entered consecutively into - * #selected_dofs#. + * respective entries in #selected_dofs# + * are then flagged #true#, while all + * others remain #false#. * - * A prior ordering of dof-values - * is not destroyed by this process. + * The size of #select# shall equal + * the number of components in the + * finite element used by #dof#. */ template static void extract_dofs(const DoFHandler &dof, - const vector &select, + const vector &select, vector &selected_dofs); /** - * Same as #extract_dofs# for multi-level. + * Do the same thing as #extract_dofs# + * for one level of a multi-grid DoF + * numbering. */ template static void extract_level_dofs(const unsigned int level, diff --git a/deal.II/deal.II/source/dofs/dof_tools.cc b/deal.II/deal.II/source/dofs/dof_tools.cc index 4c53fa4b69..bbcfc4d2d9 100644 --- a/deal.II/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/deal.II/source/dofs/dof_tools.cc @@ -32,9 +32,11 @@ DoFTools::extract_dofs(const DoFHandler &dof, c->get_dof_indices(indices); for (unsigned int i=0;i comp - = fe.system_to_component_index(i); - selected_dofs[indices[i]] = local_select[comp.first]; + const pair component + = fe.system_to_component_index(i).first; + + if (local_select[component] == true) + selected_dofs[indices[i]] = true; } } } @@ -62,9 +64,10 @@ DoFTools::extract_level_dofs(const unsigned int level, c->get_mg_dof_indices(indices); for (unsigned int i=0;i comp - = fe.system_to_component_index(i); - selected_dofs[indices[i]] = local_select[comp.first]; + const pair component + = fe.system_to_component_index(i).first; + if (local_select[component] == true) + selected_dofs[indices[i]] = true; } } }