Skip to content

Commit

Permalink
Merge pull request #12843 from bangerth/refcell
Browse files Browse the repository at this point in the history
Systematize vertex construction.
  • Loading branch information
peterrum committed Oct 19, 2021
2 parents 84e3ecb + 16decae commit 6e182af
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions include/deal.II/grid/reference_cell.h
Original file line number Diff line number Diff line change
Expand Up @@ -884,10 +884,12 @@ ReferenceCell::vertex(const unsigned int v) const
}
else if ((dim == 3) && (*this == ReferenceCells::Tetrahedron))
{
static const Point<dim> vertices[4] = {Point<dim>{0.0, 0.0, 0.0},
Point<dim>{1.0, 0.0, 0.0},
Point<dim>{0.0, 1.0, 0.0},
Point<dim>{0.0, 0.0, 1.0}};
static const Point<dim> vertices[4] = {
Point<dim>(), // the origin
Point<dim>::unit_vector(0), // unit point along x-axis
Point<dim>::unit_vector(1), // unit point along y-axis
Point<dim>::unit_vector(2) // unit point along z-axis
};
return vertices[v];
}
else if ((dim == 3) && (*this == ReferenceCells::Pyramid))
Expand Down

0 comments on commit 6e182af

Please sign in to comment.