From: Wolfgang Bangerth Date: Mon, 25 Oct 2021 01:53:51 +0000 (-0600) Subject: Make Patch<0,spacedim>::reference_cell const. X-Git-Tag: v9.4.0-rc1~890^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66b39bdf41b23c960eccfa42d76e6297384ff384;p=dealii.git Make Patch<0,spacedim>::reference_cell const. --- 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()); }