From 66b39bdf41b23c960eccfa42d76e6297384ff384 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 24 Oct 2021 19:53:51 -0600 Subject: [PATCH] Make Patch<0,spacedim>::reference_cell const. --- include/deal.II/base/data_out_base.h | 6 ++++-- source/base/data_out_base.cc | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/deal.II/base/data_out_base.h b/include/deal.II/base/data_out_base.h index 4a049fdbae..6d8e17febd 100644 --- a/include/deal.II/base/data_out_base.h +++ b/include/deal.II/base/data_out_base.h @@ -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 diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 15ea5df1c6..c5460d360b 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -2066,11 +2066,14 @@ namespace DataOutBase template unsigned int Patch<0, spacedim>::n_subdivisions = 1; + template + const ReferenceCell Patch<0, spacedim>::reference_cell = + ReferenceCells::Vertex; + template Patch<0, spacedim>::Patch() : patch_index(no_neighbor) , points_are_available(false) - , reference_cell(ReferenceCells::get_hypercube<0>()) { Assert(spacedim <= 3, ExcNotImplemented()); } -- 2.39.5