]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add an assertion.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 5 May 2021 15:50:54 +0000 (09:50 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 5 May 2021 15:58:30 +0000 (09:58 -0600)
include/deal.II/numerics/vector_tools_boundary.templates.h

index 5f5278485308d795cf3a1c566e6303834d015016..b82c6f7fb2960bb175a38201407872586e491267 100644 (file)
@@ -1027,6 +1027,7 @@ namespace VectorTools
 
       // Get boundary function values
       // at quadrature points.
+      AssertDimension(boundary_function.n_components, fe.n_components());
       boundary_function.vector_value_list(quadrature_points, values);
 
       const std::vector<Point<dim>> &reference_quadrature_points =
@@ -1219,6 +1220,7 @@ namespace VectorTools
       // Get boundary function
       // values at quadrature
       // points.
+      AssertDimension(boundary_function.n_components, fe.n_components());
       boundary_function.vector_value_list(quadrature_points, values);
 
       switch (dim)
@@ -2133,6 +2135,7 @@ namespace VectorTools
 
       // Get boundary function values
       // at quadrature points.
+      AssertDimension(boundary_function.n_components, fe.n_components());
       boundary_function.vector_value_list(quadrature_points, values);
 
       // Find the group of vector components we want to project onto
@@ -2440,6 +2443,7 @@ namespace VectorTools
                                          Vector<number>(fe.n_components()));
 
       // Get boundary function values at quadrature points.
+      AssertDimension(boundary_function.n_components, fe.n_components());
       boundary_function.vector_value_list(quadrature_points, values);
 
       // Find where the group of vector components (dim of them,

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.