]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Cosmetic updates.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 15 Jul 1999 12:09:30 +0000 (12:09 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 15 Jul 1999 12:09:30 +0000 (12:09 +0000)
git-svn-id: https://svn.dealii.org/trunk@1579 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 08460bdbfa40df3c907dac9927bd42e6a6f36baa..2e7fb466ccd60f846ba78893d395e6e752c9e1ed 100644 (file)
@@ -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<int dim>
     static void extract_dofs(const DoFHandler<dim> &dof,
-                            const vector<bool>     &select,
+                            const vector<bool>    &select,
                             vector<bool>          &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<int dim>
     static void extract_level_dofs(const unsigned int       level,
index 4c53fa4b6946bbcb3a127c1db7e13d40dc658ec0..bbcfc4d2d9241fdc691a9dbaf60a284e4daf16f8 100644 (file)
@@ -32,9 +32,11 @@ DoFTools::extract_dofs(const DoFHandler<dim> &dof,
       c->get_dof_indices(indices);
       for (unsigned int i=0;i<fe.total_dofs;++i)
        {
-         pair<unsigned int, unsigned int> comp
-           = fe.system_to_component_index(i);
-         selected_dofs[indices[i]] = local_select[comp.first];
+         const pair<unsigned int, unsigned int> 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<fe.total_dofs;++i)
        {
-         pair<unsigned int, unsigned int> comp
-           = fe.system_to_component_index(i);
-         selected_dofs[indices[i]] = local_select[comp.first];
+         const pair<unsigned int, unsigned int> component
+           = fe.system_to_component_index(i).first;
+         if (local_select[component]  == true)
+           selected_dofs[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.