From b806b593f4118d80af1d2e5ad02a6c9eb36752f4 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 10 Dec 2021 17:02:43 -0700 Subject: [PATCH] Also deal with pyramids. --- source/grid/grid_out.cc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/source/grid/grid_out.cc b/source/grid/grid_out.cc index 45e7cfd308..fc75c16a9c 100644 --- a/source/grid/grid_out.cc +++ b/source/grid/grid_out.cc @@ -4438,7 +4438,7 @@ namespace internal } else if (cell->reference_cell() == ReferenceCells::Wedge) { - // Draw the wedge as three collections of + // Draw the wedge as a collection of three // lines. The first one wraps around the base, // goes up to the top, and wraps around that. The // second and third are just individual lines @@ -4464,6 +4464,23 @@ namespace internal } out << '\n'; // end of third line } + else if (cell->reference_cell() == ReferenceCells::Pyramid) + { + // Draw the pyramid as a collections of two lines. + for (const unsigned int v : {0, 1, 3, 2, 0, 4, 1}) + { + out << cell->vertex(v) << ' ' << cell->level() << ' ' + << cell->material_id() << '\n'; + } + out << '\n'; // end of first line + + for (const unsigned int v : {2, 4, 3}) + { + out << cell->vertex(v) << ' ' << cell->level() << ' ' + << cell->material_id() << '\n'; + } + out << '\n'; // end of second line + } else Assert(false, ExcNotImplemented()); } -- 2.39.5