]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add an assertion for the right size of the component mask which apparently was forgotten.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 26 Jan 2008 04:46:51 +0000 (04:46 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 26 Jan 2008 04:46:51 +0000 (04:46 +0000)
git-svn-id: https://svn.dealii.org/trunk@15689 0785d39b-7218-0410-832d-ea1e28bc413d

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

index e944621fa770b5a4430c98b89db66f4e6645155e..0b90d4057fecb7f903d650bab4fd676c1492309f 100644 (file)
@@ -1197,7 +1197,12 @@ VectorTools::interpolate_boundary_values (const Mapping<dim>         &,
 {
   Assert (boundary_component != 255,
          ExcInvalidBoundaryIndicator());
-
+  Assert ((component_mask_.size() == 0) ||
+         (component_mask_.size() == dof.get_fe().n_components()),
+         ExcMessage ("The number of components in the mask has to be either "
+                     "zero or equal to the number of components in the finite "
+                     "element."));
+    
                                   // check whether boundary values at
                                   // the left or right boundary of
                                   // the line are
@@ -1296,6 +1301,13 @@ interpolate_boundary_values (const Mapping<dim>            &mapping,
                              std::map<unsigned int,double> &boundary_values,
                              const std::vector<bool>       &component_mask_)
 {
+  Assert ((component_mask_.size() == 0) ||
+         (component_mask_.size() == dof.get_fe().n_components()),
+         ExcMessage ("The number of components in the mask has to be either "
+                     "zero or equal to the number of components in the finite "
+                     "element."));
+
+
                                   // if for whatever reason we were
                                   // passed an empty map, return
                                   // immediately

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.