From 1ec5a9eb8fbb95433735b17a1a9eebd16f065d87 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 16 Nov 2021 21:38:17 -0700 Subject: [PATCH] Also output wedges in GridOut::write_gnuplot(). --- source/grid/grid_out.cc | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/source/grid/grid_out.cc b/source/grid/grid_out.cc index f199c85561..45e7cfd308 100644 --- a/source/grid/grid_out.cc +++ b/source/grid/grid_out.cc @@ -4436,14 +4436,41 @@ namespace internal } out << '\n'; // end of second line } + else if (cell->reference_cell() == ReferenceCells::Wedge) + { + // Draw the wedge as three collections of + // 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 + // going from base to top. + for (const unsigned int v : {0, 1, 2, 0, 3, 4, 5, 3}) + { + out << cell->vertex(v) << ' ' << cell->level() << ' ' + << cell->material_id() << '\n'; + } + out << '\n'; // end of first line + + for (const unsigned int v : {1, 4}) + { + out << cell->vertex(v) << ' ' << cell->level() << ' ' + << cell->material_id() << '\n'; + } + out << '\n'; // end of second line + + for (const unsigned int v : {2, 5}) + { + out << cell->vertex(v) << ' ' << cell->level() << ' ' + << cell->material_id() << '\n'; + } + out << '\n'; // end of third line + } else Assert(false, ExcNotImplemented()); } - else + else // need to handle curved boundaries { Assert(cell->reference_cell() == ReferenceCells::Hexahedron, ExcNotImplemented()); - for (const unsigned int face_no : GeometryInfo::face_indices()) { -- 2.39.5