]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make Patch<0,spacedim>::reference_cell const. 12875/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 25 Oct 2021 01:53:51 +0000 (19:53 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 26 Oct 2021 03:00:04 +0000 (21:00 -0600)
include/deal.II/base/data_out_base.h
source/base/data_out_base.cc

index 4a049fdbaee7de228dcc1303f1932c951910dfa4..6d8e17febd86212db63fb09905afa3af1f465c57 100644 (file)
@@ -472,9 +472,11 @@ namespace DataOutBase
     bool points_are_available;
 
     /**
-     * Reference-cell type of the underlying cell of this patch.
+     * Reference-cell type of the underlying cell of this patch. Since for
+     * zero-dimensional objects, a patch can only refer to a vertex, this
+     * field is always equal to ReferenceCells::Vertex and can not be changed.
      */
-    ReferenceCell reference_cell;
+    static const ReferenceCell reference_cell;
 
     /**
      * Default constructor. Sets #points_are_available
index 15ea5df1c6c9ab9f81ddd4ce98ae2dcc96544649..c5460d360b9a4973b7b43eff62d84f6016122262 100644 (file)
@@ -2066,11 +2066,14 @@ namespace DataOutBase
   template <int spacedim>
   unsigned int Patch<0, spacedim>::n_subdivisions = 1;
 
+  template <int spacedim>
+  const ReferenceCell Patch<0, spacedim>::reference_cell =
+    ReferenceCells::Vertex;
+
   template <int spacedim>
   Patch<0, spacedim>::Patch()
     : patch_index(no_neighbor)
     , points_are_available(false)
-    , reference_cell(ReferenceCells::get_hypercube<0>())
   {
     Assert(spacedim <= 3, ExcNotImplemented());
   }

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.