]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Initialize output fields.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 31 Oct 1999 14:21:17 +0000 (14:21 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 31 Oct 1999 14:21:17 +0000 (14:21 +0000)
git-svn-id: https://svn.dealii.org/trunk@1808 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 2e7fb466ccd60f846ba78893d395e6e752c9e1ed..f0248902415e3fb15b9e394db9b20ddd42edd530 100644 (file)
@@ -33,7 +33,7 @@ class DoFTools
                                      * from the DoFHandler #dof#. The
                                      * respective entries in #selected_dofs#
                                      * are then flagged #true#, while all
-                                     * others remain #false#.
+                                     * others are set to #false#.
                                      *
                                      * The size of #select# shall equal
                                      * the number of components in the
index 69f3a1099634531a657c87b5a640a7ff890fd989..dac0e080eb2e1d602e5ddbc0ae6dde4fc26eeef4 100644 (file)
@@ -24,6 +24,9 @@ DoFTools::extract_dofs(const DoFHandler<dim> &dof,
   Assert(selected_dofs.size() == dof.n_dofs(),
         ExcDimensionMismatch(selected_dofs.size(), dof.n_dofs()));
 
+                                  // preset all values by false
+  fill_n (selected_dofs.begin(), dof.n_dofs(), false);
+  
   vector<int> indices(fe.total_dofs);
   
   DoFHandler<dim>::active_cell_iterator c;
@@ -55,6 +58,9 @@ DoFTools::extract_level_dofs(const unsigned int       level,
   Assert(selected_dofs.size() == dof.n_dofs(level),
         ExcDimensionMismatch(selected_dofs.size(), dof.n_dofs(level)));
 
+                                  // preset all values by false
+  fill_n (selected_dofs.begin(), dof.n_dofs(level), false);
+
   vector<int> indices(fe.total_dofs);
   
   MGDoFHandler<dim>::cell_iterator c;

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.