]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add a missing assertion.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 25 Nov 2008 22:07:09 +0000 (22:07 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 25 Nov 2008 22:07:09 +0000 (22:07 +0000)
git-svn-id: https://svn.dealii.org/trunk@17740 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 88e3bdb5396b085d7432b4303139df4ac71e486b..fa07a7e949ee83ed1dad4b8f8cd62a9dcb7e7c1d 100644 (file)
@@ -3257,6 +3257,8 @@ VectorTools::compute_mean_value (const Mapping<dim>    &mapping,
                                 const InVector        &v,
                                 const unsigned int     component)
 {
+  Assert (v.size() == dof.n_dofs(),
+         ExcDimensionMismatch (v.size(), dof.n_dofs()));
   Assert (component < dof.get_fe().n_components(),
          ExcIndexRange(component, 0, dof.get_fe().n_components()));
   

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.