]> https://gitweb.dealii.org/ - dealii.git/commitdiff
assert that we have a enough fe components in compute_no_normal_flux_constraints
authorTimo Heister <timo.heister@gmail.com>
Fri, 15 Nov 2013 21:10:02 +0000 (21:10 +0000)
committerTimo Heister <timo.heister@gmail.com>
Fri, 15 Nov 2013 21:10:02 +0000 (21:10 +0000)
git-svn-id: https://svn.dealii.org/trunk@31675 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 92670d6ac538eff66dd03c26faa2f95f1318122f..258f83a2c97bc3cbcecd5ebd925ba0bac5e1c4ea 100644 (file)
@@ -4294,6 +4294,10 @@ namespace VectorTools
                     internal::VectorDoFTuple<dim> vector_dofs;
                     vector_dofs.dof_indices[0] = face_dofs[i];
 
+                    Assert(first_vector_component+dim<=fe.n_components(),
+                        ExcMessage("Error: the finite element has not enough components "
+                            "to define a normal direction."));
+
                     for (unsigned int k=0; k<fe.dofs_per_face; ++k)
                       if ((k != i)
                           &&

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.