]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Enable TriaAccessor::diameter() for wedges 11271/head
authorPeter Munch <peterrmuench@gmail.com>
Sat, 28 Nov 2020 15:22:07 +0000 (16:22 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sat, 28 Nov 2020 15:22:26 +0000 (16:22 +0100)
include/deal.II/grid/tria_accessor.templates.h

index aeb62ddc6f20ffb39b78d65ce3c6ade4fce2360f..1653dd49b010bf280637f4f98ea47f40a1fccb93 100644 (file)
@@ -1904,6 +1904,14 @@ TriaAccessor<structdim, dim, spacedim>::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()),

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.