From 4f3572581a2773ddb75e60dcca686460fa2779d7 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 19 Oct 2021 09:59:52 -0600 Subject: [PATCH] Systematize construction of vertices for wedges. --- include/deal.II/grid/reference_cell.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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 -- 2.39.5