From b9b29020f23085f60bf47ec38394aa6e5b87ddda Mon Sep 17 00:00:00 2001
From: Wolfgang Bangerth <bangerth@colostate.edu>
Date: Fri, 10 Dec 2021 18:43:02 -0700
Subject: [PATCH] Fix pyramid output in DataOutBase::write_gnuplot().

---
 source/base/data_out_base.cc                   | 8 ++++----
 tests/simplex/data_out_write_gnuplot_02.output | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc
index df32f54bb8..b1a7a278cf 100644
--- a/source/base/data_out_base.cc
+++ b/source/base/data_out_base.cc
@@ -3979,7 +3979,7 @@ namespace DataOutBase
                   {
                     Assert(n_subdivisions == 1, ExcNotImplemented());
 
-                    // Draw the tetrahedron as a two collections of lines.
+                    // Draw the tetrahedron as a collection of two lines.
                     for (const unsigned int v : {0, 1, 2, 0, 3, 2})
                       {
                         out << get_node_location(patch, v) << ' ';
@@ -4000,8 +4000,8 @@ namespace DataOutBase
                   {
                     Assert(n_subdivisions == 1, ExcNotImplemented());
 
-                    // Draw the pyramid as a two collections of lines.
-                    for (const unsigned int v : {0, 1, 2, 3, 0, 4, 1})
+                    // Draw the pyramid as a collection of two lines.
+                    for (const unsigned int v : {0, 1, 3, 2, 0, 4, 1})
                       {
                         out << get_node_location(patch, v) << ' ';
                         output_point_data(v);
@@ -4021,7 +4021,7 @@ namespace DataOutBase
                   {
                     Assert(n_subdivisions == 1, ExcNotImplemented());
 
-                    // 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
diff --git a/tests/simplex/data_out_write_gnuplot_02.output b/tests/simplex/data_out_write_gnuplot_02.output
index a627d9d89e..63e60ae0b2 100644
--- a/tests/simplex/data_out_write_gnuplot_02.output
+++ b/tests/simplex/data_out_write_gnuplot_02.output
@@ -8,8 +8,8 @@
 # <x> <y> <z> <solution> 
 -1.00000 -1.00000 0.00000 0.311111 
 1.00000 -1.00000 0.00000 0.311111 
-1.00000 1.00000 0.00000 0.311111 
 -1.00000 1.00000 0.00000 0.311111 
+1.00000 1.00000 0.00000 0.311111 
 -1.00000 -1.00000 0.00000 0.311111 
 0.00000 0.00000 1.00000 -0.133333 
 1.00000 -1.00000 0.00000 0.311111 
-- 
2.39.5