]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add size assert to VectorTools::interpolate 615/head
authorTimo Heister <timo.heister@gmail.com>
Fri, 27 Feb 2015 19:11:29 +0000 (14:11 -0500)
committerTimo Heister <timo.heister@gmail.com>
Fri, 27 Feb 2015 19:11:29 +0000 (14:11 -0500)
include/deal.II/numerics/vector_tools.templates.h

index 016c8345012137a6f563431c8e69941f269816a2..8619b896f3383e83772edee0633e97fac91272dc 100644 (file)
@@ -80,6 +80,8 @@ namespace VectorTools
                     const Function<spacedim>       &function,
                     VECTOR                         &vec)
   {
+    Assert (vec.size() == dof.n_dofs(),
+            ExcDimensionMismatch (vec.size(), dof.n_dofs()));
     Assert (dof.get_fe().n_components() == function.n_components,
             ExcDimensionMismatch(dof.get_fe().n_components(),
                                  function.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.