]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add missing assert in do_integrate_difference
authorEmma Cinatl <mathgirl1024@gmail.com>
Wed, 18 Apr 2018 21:22:14 +0000 (17:22 -0400)
committerEmma Cinatl <mathgirl1024@gmail.com>
Wed, 18 Apr 2018 21:29:09 +0000 (17:29 -0400)
Check number of components of exact_solution.

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

index 6ac4f7d380a3b42e2761b636047c6bfb23e79d74..08954d19af2d64cb8d26bc6672cb0e5449fb7ad7 100644 (file)
@@ -7245,7 +7245,10 @@ namespace VectorTools
       // on, if necessary, so have a read-write version of it:
       double exponent = exponent_1;
 
-      const unsigned int        n_components = dof.get_fe(0).n_components();
+      const unsigned int n_components = dof.get_fe(0).n_components();
+
+      Assert (exact_solution.n_components==n_components,
+              ExcDimensionMismatch(exact_solution.n_components, n_components));
 
       if (weight!=nullptr)
         {

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.