From 51af34ac4c6d8d947dddd8ebb083644117361f8f Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Sat, 28 Nov 2020 16:22:07 +0100 Subject: [PATCH] Enable TriaAccessor::diameter() for wedges --- include/deal.II/grid/tria_accessor.templates.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index aeb62ddc6f..1653dd49b0 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -1904,6 +1904,14 @@ TriaAccessor::diameter() const (this->vertex(3) - this->vertex(0)).norm())), std::max((this->vertex(3) - this->vertex(1)).norm(), (this->vertex(3) - this->vertex(2)).norm())); + case ReferenceCell::Type::Wedge: + return std::max( + std::max(std::max((this->vertex(4) - this->vertex(0)).norm(), + (this->vertex(3) - this->vertex(1)).norm()), + std::max((this->vertex(5) - this->vertex(1)).norm(), + (this->vertex(4) - this->vertex(2)).norm())), + std::max((this->vertex(5) - this->vertex(0)).norm(), + (this->vertex(3) - this->vertex(2)).norm())); case ReferenceCell::Type::Hex: return std::max(std::max((this->vertex(7) - this->vertex(0)).norm(), (this->vertex(6) - this->vertex(1)).norm()), -- 2.39.5