]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add is_simplex() 11598/head
authorTimo Heister <timo.heister@gmail.com>
Thu, 21 Jan 2021 20:44:07 +0000 (15:44 -0500)
committerTimo Heister <timo.heister@gmail.com>
Thu, 21 Jan 2021 20:44:07 +0000 (15:44 -0500)
include/deal.II/grid/reference_cell.h

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

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.