]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Also output wedges in GridOut::write_gnuplot().
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 17 Nov 2021 04:38:17 +0000 (21:38 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 14 Dec 2021 14:43:02 +0000 (07:43 -0700)
source/grid/grid_out.cc

index f199c85561e5bca221d589ce89ff52e0464ca05a..45e7cfd30807ded07bb87ded72b255336931de70 100644 (file)
@@ -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<dim>::face_indices())
                 {

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.