From 6ddd38d654eb922dd607ae60719bfa4948bfc9fc Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Thu, 21 Jan 2021 15:44:07 -0500 Subject: [PATCH] add is_simplex() --- include/deal.II/grid/reference_cell.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/deal.II/grid/reference_cell.h b/include/deal.II/grid/reference_cell.h index 3473f96367..858e359788 100644 --- a/include/deal.II/grid/reference_cell.h +++ b/include/deal.II/grid/reference_cell.h @@ -78,6 +78,12 @@ namespace ReferenceCell bool is_hyper_cube() const; + /** + * Return true if the object is a Vertex, Line, Tri, or Tet. + */ + bool + is_simplex() const; + /** * Return the dimension of the reference cell represented by the current * object. @@ -327,6 +333,14 @@ namespace ReferenceCell + inline bool + Type::is_simplex() const + { + return (*this == Vertex || *this == Line || *this == Tri || *this == Tet); + } + + + inline unsigned int Type::get_dimension() const { -- 2.39.5