From: Timo Heister Date: Thu, 21 Jan 2021 17:38:26 +0000 (-0500) Subject: add ReferenceCell::Type::is_hyper_cube X-Git-Tag: v9.3.0-rc1~584^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f5df5808f7921119f856b003e1354fb1b386840;p=dealii.git add ReferenceCell::Type::is_hyper_cube --- diff --git a/include/deal.II/grid/reference_cell.h b/include/deal.II/grid/reference_cell.h index 8d6eb83463..3473f96367 100644 --- a/include/deal.II/grid/reference_cell.h +++ b/include/deal.II/grid/reference_cell.h @@ -71,6 +71,13 @@ namespace ReferenceCell */ Type(const std::uint8_t kind); + + /** + * Return true if the object is a Vertex, Line, Quad, or Hex. + */ + bool + is_hyper_cube() const; + /** * Return the dimension of the reference cell represented by the current * object. @@ -312,6 +319,14 @@ namespace ReferenceCell + inline bool + Type::is_hyper_cube() const + { + return (*this == Vertex || *this == Line || *this == Quad || *this == Hex); + } + + + inline unsigned int Type::get_dimension() const {