]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify the implementation of a function. 2429/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 28 Mar 2016 16:08:19 +0000 (11:08 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 28 Mar 2016 16:08:19 +0000 (11:08 -0500)
Also improve the error message.

source/fe/mapping_q_generic.cc

index f8452f9d97c364640b37e2534785e450916220d3..0d109b098892a25a68cd53ebe4625411bccf62c0 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2000 - 2015 by the deal.II authors
+// Copyright (C) 2000 - 2016 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -2614,12 +2614,16 @@ fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
                   }
                 else
                   {
-                    const unsigned int codim = spacedim-dim;
-                    (void)codim;
-
                     if (update_flags & update_normal_vectors)
                       {
-                        Assert( codim==1 , ExcMessage("There is no cell normal in codim 2."));
+                        Assert(spacedim == dim+1,
+                               ExcMessage("There is no (unique) cell normal for "
+                                          + Utilities::int_to_string(dim) +
+                                          "-dimensional cells in "
+                                          + Utilities::int_to_string(spacedim) +
+                                          "-dimensional space. This only works if the "
+                                          "space dimension is one greater than the "
+                                          "dimensionality of the mesh cells."));
 
                         if (dim==1)
                           output_data.normal_vectors[point] =

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.