From: Wolfgang Bangerth Date: Sat, 11 Dec 2021 00:02:43 +0000 (-0700) Subject: Also deal with pyramids. X-Git-Tag: v9.4.0-rc1~742^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b806b593f4118d80af1d2e5ad02a6c9eb36752f4;p=dealii.git Also deal with pyramids. --- 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()); }