From: Emma Cinatl Date: Wed, 18 Apr 2018 21:22:14 +0000 (-0400) Subject: Add missing assert in do_integrate_difference X-Git-Tag: v9.0.0-rc1~61^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2604b9194d3ccd3156125e0bda500e825eaf0cb7;p=dealii.git Add missing assert in do_integrate_difference Check number of components of exact_solution. --- diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index 6ac4f7d380..08954d19af 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -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) {