From 4f5df5808f7921119f856b003e1354fb1b386840 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Thu, 21 Jan 2021 12:38:26 -0500 Subject: [PATCH] add ReferenceCell::Type::is_hyper_cube --- include/deal.II/grid/reference_cell.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 { -- 2.39.5