From: Peter Munch Date: Sat, 28 Nov 2020 15:22:07 +0000 (+0100) Subject: Enable TriaAccessor::diameter() for wedges X-Git-Tag: v9.3.0-rc1~832^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11271%2Fhead;p=dealii.git Enable TriaAccessor::diameter() for wedges --- 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()),