From c6a519b7e84e6cdd18d6a1abecf7ee0c19b5f089 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 28 Mar 2016 11:08:19 -0500 Subject: [PATCH] Simplify the implementation of a function. Also improve the error message. --- source/fe/mapping_q_generic.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/fe/mapping_q_generic.cc b/source/fe/mapping_q_generic.cc index f8452f9d97..0d109b0988 100644 --- a/source/fe/mapping_q_generic.cc +++ b/source/fe/mapping_q_generic.cc @@ -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::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] = -- 2.39.5