]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Store reference cell type in FiniteElementData 10717/head
authorPeter Munch <peterrmuench@gmail.com>
Sat, 18 Jul 2020 17:27:58 +0000 (19:27 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Sat, 18 Jul 2020 17:27:58 +0000 (19:27 +0200)
include/deal.II/fe/fe_base.h
source/fe/fe_data.cc

index 1b3c42f652f9a333646f2dd1e10780b013ab8439..3b69a65a82913717375454f3130a35f3c02ff435 100644 (file)
@@ -219,6 +219,13 @@ public:
    */
   static const unsigned int dimension = dim;
 
+private:
+  /**
+   * Reference cell type.
+   */
+  const ReferenceCell::Type cell_type;
+
+public:
   /**
    * Number of degrees of freedom on a vertex.
    */
@@ -364,6 +371,12 @@ public:
                     const Conformity                 conformity = unknown,
                     const BlockIndices &block_indices = BlockIndices());
 
+  /**
+   * Return type of reference cell.
+   */
+  ReferenceCell::Type
+  reference_cell_type() const;
+
   /**
    * Number of dofs per vertex.
    */
@@ -546,6 +559,14 @@ namespace FiniteElementDomination
 } // namespace FiniteElementDomination
 
 
+template <int dim>
+inline ReferenceCell::Type
+FiniteElementData<dim>::reference_cell_type() const
+{
+  return cell_type;
+}
+
+
 template <int dim>
 inline unsigned int
 FiniteElementData<dim>::n_dofs_per_vertex() const
index ad587ad12d319fd37db12c5629a79f9fb9379248..f9fff482ff17ff37efd55e5a4f244d07f196ff22 100644 (file)
@@ -46,7 +46,8 @@ FiniteElementData<dim>::FiniteElementData(
   const unsigned int               degree,
   const Conformity                 conformity,
   const BlockIndices &             block_indices)
-  : dofs_per_vertex(dofs_per_object[0])
+  : cell_type(cell_type)
+  , dofs_per_vertex(dofs_per_object[0])
   , dofs_per_line(dofs_per_object[1])
   , dofs_per_quad(dim > 1 ? dofs_per_object[2] : 0)
   , dofs_per_hex(dim > 2 ? dofs_per_object[3] : 0)

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.