]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Also deal with pyramids.
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 11 Dec 2021 00:02:43 +0000 (17:02 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 14 Dec 2021 14:43:02 +0000 (07:43 -0700)
source/grid/grid_out.cc

index 45e7cfd30807ded07bb87ded72b255336931de70..fc75c16a9caf5c8b55065fe396f26e7cab224d6d 100644 (file)
@@ -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());
             }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.