From d9758296d10f37d9773f8f778f80b80db16e2c7d Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 1 Nov 2021 18:03:39 -0600 Subject: [PATCH] Implement gnuplot output for pyramids. --- source/base/data_out_base.cc | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 92b530f1a2..4c3ff24914 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -4014,6 +4014,53 @@ namespace DataOutBase out << '\n'; out << '\n'; // end of second line } + else if (patch.reference_cell == ReferenceCells::Pyramid) + { + Assert(n_subdivisions == 1, ExcNotImplemented()); + + // Draw the pyramid as a two collections of lines. + out << get_node_location(patch, 0) << ' '; + output_point_data(0); + out << '\n'; + + out << get_node_location(patch, 1) << ' '; + output_point_data(1); + out << '\n'; + + out << get_node_location(patch, 2) << ' '; + output_point_data(2); + out << '\n'; + + out << get_node_location(patch, 3) << ' '; + output_point_data(3); + out << '\n'; + + out << get_node_location(patch, 0) << ' '; + output_point_data(0); + out << '\n'; + + out << get_node_location(patch, 4) << ' '; + output_point_data(4); + out << '\n'; + + out << get_node_location(patch, 1) << ' '; + output_point_data(1); + out << '\n'; + out << '\n'; // end of first line + + out << get_node_location(patch, 2) << ' '; + output_point_data(2); + out << '\n'; + + out << get_node_location(patch, 4) << ' '; + output_point_data(4); + out << '\n'; + + out << get_node_location(patch, 3) << ' '; + output_point_data(2); + out << '\n'; + out << '\n'; // end of second line + } else // No other reference cells are currently implemented Assert(false, ExcNotImplemented()); -- 2.39.5