]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid filling a map with numeric_limit<types::boundary_id>::max() elements -- too...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 22 Jul 2013 12:56:52 +0000 (12:56 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 22 Jul 2013 12:56:52 +0000 (12:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@30093 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/numerics/vector_tools.templates.h

index abb0372b0b9da544df00aad70f8371a7554c7d2d..ace4f136ab8962e33fbca7d0603485bc8c95e951 100644 (file)
@@ -535,9 +535,12 @@ namespace VectorTools
             // parts. We want the
             // function to hold on
             // all parts of the boundary
+            const std::vector<types::boundary_id>
+            used_boundary_indicators = dof.get_tria().get_boundary_indicators();
+
             typename FunctionMap<spacedim>::type boundary_functions;
-            for (types::boundary_id c=0; c<numbers::internal_face_boundary_id; ++c)
-              boundary_functions[c] = &function;
+            for (unsigned int i=0; i<used_boundary_indicators.size(); ++i)
+              boundary_functions[used_boundary_indicators[i]] = &function;
             project_boundary_values (mapping, dof, boundary_functions, q_boundary,
                                      boundary_values);
           }

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.