From: Peter Munch Date: Wed, 8 Jul 2020 19:25:21 +0000 (+0200) Subject: Use ReferenceCell::Type to get Info X-Git-Tag: v9.3.0-rc1~1277^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=775360564d37ea9bc8a2f16231d386517b250e9f;p=dealii.git Use ReferenceCell::Type to get Info --- diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index 0f9408e7ab..1ee1438377 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -2163,26 +2163,12 @@ template inline const ReferenceCell::internal::Info::Base & TriaAccessor::reference_cell_info() const { - static ReferenceCell::internal::Info::Base gei_invalid; - static ReferenceCell::internal::Info::Vertex gei_vertex; - static ReferenceCell::internal::Info::Line gei_line; - static ReferenceCell::internal::Info::Quad gei_quad; - static ReferenceCell::internal::Info::Hex gei_hex; - - switch (structdim) // TODO: use ReferenceCell::Type - { - case 0: - return gei_vertex; - case 1: - return gei_line; - case 2: - return gei_quad; - case 3: - return gei_hex; - default: - Assert(false, StandardExceptions::ExcNotImplemented()); - return gei_invalid; - } + if (structdim == 0) + return ReferenceCell::internal::Info::get_cell(ReferenceCell::Type::Vertex); + else if (structdim == 1) + return ReferenceCell::internal::Info::get_cell(ReferenceCell::Type::Line); + else + return ReferenceCell::internal::Info::get_cell(this->reference_cell_type()); }