From: Wolfgang Bangerth Date: Tue, 19 Oct 2021 01:56:00 +0000 (-0600) Subject: Systematize vertex construction. X-Git-Tag: v9.4.0-rc1~927^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12843%2Fhead;p=dealii.git Systematize vertex construction. --- 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))