From: Reza Rastak Date: Wed, 4 Sep 2019 19:41:49 +0000 (-0700) Subject: Used GeometryInfo::unit_normal_vector in mapping_cartesian.cc X-Git-Tag: v9.2.0-rc1~1139^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48cc018fbf6585d0998b9a07c87ca7a70578e371;p=dealii.git Used GeometryInfo::unit_normal_vector in mapping_cartesian.cc --- diff --git a/source/fe/mapping_cartesian.cc b/source/fe/mapping_cartesian.cc index d809a20c67..f9f87a5de6 100644 --- a/source/fe/mapping_cartesian.cc +++ b/source/fe/mapping_cartesian.cc @@ -289,50 +289,9 @@ MappingCartesian::compute_fill( if (update_flags & update_normal_vectors) { Assert(face_no < GeometryInfo::faces_per_cell, ExcInternalError()); - - switch (dim) - { - case 1: - { - static const Point normals[GeometryInfo<1>::faces_per_cell] = - {Point(-1.), Point(1.)}; - std::fill(normal_vectors.begin(), - normal_vectors.end(), - normals[face_no]); - break; - } - - case 2: - { - static const Point normals[GeometryInfo<2>::faces_per_cell] = - {Point(-1, 0), - Point(1, 0), - Point(0, -1), - Point(0, 1)}; - std::fill(normal_vectors.begin(), - normal_vectors.end(), - normals[face_no]); - break; - } - - case 3: - { - static const Point normals[GeometryInfo<3>::faces_per_cell] = - {Point(-1, 0, 0), - Point(1, 0, 0), - Point(0, -1, 0), - Point(0, 1, 0), - Point(0, 0, -1), - Point(0, 0, 1)}; - std::fill(normal_vectors.begin(), - normal_vectors.end(), - normals[face_no]); - break; - } - - default: - Assert(false, ExcNotImplemented()); - } + std::fill(normal_vectors.begin(), + normal_vectors.end(), + Point{GeometryInfo::unit_normal_vector[face_no]}); } }