From 5bf4ffcd7d8d9b48e563361398877fc2873439bd Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 28 Mar 2016 09:20:55 -0500 Subject: [PATCH] Guard code for cases of other dimensions. The current code only tests for dim=2 and dim=3. Make sure we have an else-branch. --- source/fe/mapping_q_generic.cc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/source/fe/mapping_q_generic.cc b/source/fe/mapping_q_generic.cc index f8452f9d97..3e29849b87 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. // @@ -769,7 +769,9 @@ initialize_face (const UpdateFlags update_flags, const unsigned int nfaces = GeometryInfo::faces_per_cell; unit_tangentials.resize (nfaces*(dim-1), std::vector > (n_original_q_points)); - if (dim==2) + switch (dim) + { + case 2: { // ensure a counterclockwise // orientation of tangentials @@ -781,8 +783,11 @@ initialize_face (const UpdateFlags update_flags, std::fill (unit_tangentials[i].begin(), unit_tangentials[i].end(), tang); } + + break; } - else if (dim==3) + + case 3: { for (unsigned int i=0; i