From: Wolfgang Bangerth Date: Tue, 19 Oct 2021 15:59:52 +0000 (-0600) Subject: Systematize construction of vertices for wedges. X-Git-Tag: v9.4.0-rc1~923^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f3572581a2773ddb75e60dcca686460fa2779d7;p=dealii.git Systematize construction of vertices for wedges. --- diff --git a/include/deal.II/grid/reference_cell.h b/include/deal.II/grid/reference_cell.h index 9a8305908d..8d541274e4 100644 --- a/include/deal.II/grid/reference_cell.h +++ b/include/deal.II/grid/reference_cell.h @@ -903,12 +903,15 @@ ReferenceCell::vertex(const unsigned int v) const } else if ((dim == 3) && (*this == ReferenceCells::Wedge)) { - static const Point vertices[6] = {Point{0.0, 0.0, 0.0}, - Point{1.0, 0.0, 0.0}, - Point{0.0, 1.0, 0.0}, - Point{0.0, 0.0, 1.0}, - Point{1.0, 0.0, 1.0}, - Point{0.0, 1.0, 1.0}}; + static const Point vertices[6] = { + // First the three points on the triangular base of the wedge: + Point(), + Point::unit_vector(0), + Point::unit_vector(1), + // And now everything shifted in the z-direction again + Point() + Point::unit_vector(2), + Point::unit_vector(0) + Point::unit_vector(2), + Point::unit_vector(1) + Point::unit_vector(2)}; return vertices[v]; } else