]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Also add specialization for quadrilaterals 13930/head
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Sat, 25 Jun 2022 14:16:03 +0000 (16:16 +0200)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Sat, 25 Jun 2022 14:16:03 +0000 (16:16 +0200)
source/grid/tria.cc

index f2d99de00120f0316182a942db58b48f21a1344a..5fc10e7bf5566be6df421a62ae07095c7d230295 100644 (file)
@@ -14591,6 +14591,18 @@ Triangulation<dim, spacedim>::reset_cell_vertex_indices_cache()
                 for (unsigned int i = 0; i < 4; ++i)
                   cache[index + i] = raw_vertex_indices[vertex_order[i]];
               }
+          else if (ref_cell == ReferenceCells::Quadrilateral)
+            {
+              const std::array<bool, 2> line_orientations{
+                {cell->line_orientation(0), cell->line_orientation(1)}};
+              std::array<unsigned int, 4> raw_vertex_indices{
+                {cell->line(0)->vertex_index(1 - line_orientations[0]),
+                 cell->line(1)->vertex_index(1 - line_orientations[1]),
+                 cell->line(0)->vertex_index(line_orientations[0]),
+                 cell->line(1)->vertex_index(line_orientations[1])}};
+              for (unsigned int i = 0; i < 4; ++i)
+                cache[my_index + i] = raw_vertex_indices[i];
+            }
           else
             for (const unsigned int i : cell->vertex_indices())
               cache[my_index + i] = internal::TriaAccessorImplementation::

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.