From 3b27fe58fea4594fc429406e34bc80f9c6319a94 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Sat, 25 Jun 2022 16:16:03 +0200 Subject: [PATCH] Also add specialization for quadrilaterals --- source/grid/tria.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/grid/tria.cc b/source/grid/tria.cc index f2d99de001..5fc10e7bf5 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -14591,6 +14591,18 @@ Triangulation::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 line_orientations{ + {cell->line_orientation(0), cell->line_orientation(1)}}; + std::array 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:: -- 2.39.5