From 16decae90f1f5eb798a5ef22c6609ce22e75842c Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 18 Oct 2021 19:56:00 -0600 Subject: [PATCH] Systematize vertex construction. --- include/deal.II/grid/reference_cell.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/deal.II/grid/reference_cell.h b/include/deal.II/grid/reference_cell.h index 025abf9e67..9b4e89efef 100644 --- a/include/deal.II/grid/reference_cell.h +++ b/include/deal.II/grid/reference_cell.h @@ -884,10 +884,12 @@ ReferenceCell::vertex(const unsigned int v) const } else if ((dim == 3) && (*this == ReferenceCells::Tetrahedron)) { - static const Point vertices[4] = {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}}; + static const Point vertices[4] = { + Point(), // the origin + Point::unit_vector(0), // unit point along x-axis + Point::unit_vector(1), // unit point along y-axis + Point::unit_vector(2) // unit point along z-axis + }; return vertices[v]; } else if ((dim == 3) && (*this == ReferenceCells::Pyramid)) -- 2.39.5