From: Timo Heister Date: Thu, 21 Jan 2021 20:44:07 +0000 (-0500) Subject: add is_simplex() X-Git-Tag: v9.3.0-rc1~584^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ddd38d654eb922dd607ae60719bfa4948bfc9fc;p=dealii.git add is_simplex() --- 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 {