From: Wolfgang Bangerth Date: Mon, 28 Mar 2016 14:20:55 +0000 (-0500) Subject: Guard code for cases of other dimensions. X-Git-Tag: v8.5.0-rc1~1159^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bf4ffcd7d8d9b48e563361398877fc2873439bd;p=dealii.git 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. --- 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