]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add ReferenceCell::Type::is_hyper_cube
authorTimo Heister <timo.heister@gmail.com>
Thu, 21 Jan 2021 17:38:26 +0000 (12:38 -0500)
committerTimo Heister <timo.heister@gmail.com>
Thu, 21 Jan 2021 17:40:09 +0000 (12:40 -0500)
include/deal.II/grid/reference_cell.h

index 8d6eb834630e4d9aa0fe9960d890a2effb19f1ff..3473f9636743d3fa4d288e6336fb4902a77252ce 100644 (file)
@@ -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
   {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.