]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix thinko: extract_subdomain_dofs may register the same dof for several subdomains...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 18 Oct 2008 03:41:44 +0000 (03:41 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 18 Oct 2008 03:41:44 +0000 (03:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@17272 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 559c480adc9baa4bbd579060093b9e5678216989..980f15b1c9a58bbdf63bfec95e1e93ddbc69b105 100644 (file)
@@ -3800,8 +3800,8 @@ DoFTools::count_dofs_with_subdomain_association (const DH           &dof_handler
   } 
 #endif
 
-  std::vector<bool> subdomain_association (dof_handler.n_dofs());
-  extract_subdomain_dofs (dof_handler, subdomain, subdomain_association);
+  std::vector<unsigned int> subdomain_association (dof_handler.n_dofs());
+  get_subdomain_association (dof_handler, subdomain_association);
 
   std::vector<bool> component_association (dof_handler.n_dofs());
   for (unsigned int c=0; c<dof_handler.get_fe().n_components(); ++c)
@@ -3811,7 +3811,7 @@ DoFTools::count_dofs_with_subdomain_association (const DH           &dof_handler
       extract_dofs (dof_handler, component_mask, component_association);
 
       for (unsigned int i=0; i<dof_handler.n_dofs(); ++i)
-       if ((subdomain_association[i] == true) &&
+       if ((subdomain_association[i] == subdomain) &&
            (component_association[i] == true))
          ++n_dofs_on_subdomain[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.