From: Wolfgang Bangerth Date: Wed, 17 Nov 2021 04:38:17 +0000 (-0700) Subject: Also output wedges in GridOut::write_gnuplot(). X-Git-Tag: v9.4.0-rc1~742^2~5 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ec5a9eb8fbb95433735b17a1a9eebd16f065d87;p=dealii.git Also output wedges in GridOut::write_gnuplot(). --- 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()) {