]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a test.
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 11 Dec 2021 00:03:01 +0000 (17:03 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 14 Dec 2021 14:43:02 +0000 (07:43 -0700)
tests/simplex/grid_out_gnuplot_pyramid.cc [new file with mode: 0644]
tests/simplex/grid_out_gnuplot_pyramid.output [new file with mode: 0644]

diff --git a/tests/simplex/grid_out_gnuplot_pyramid.cc b/tests/simplex/grid_out_gnuplot_pyramid.cc
new file mode 100644 (file)
index 0000000..82e56ef
--- /dev/null
@@ -0,0 +1,49 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2021 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+
+// Create a triangulation with a pyramid and output it in gmsh format
+
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/grid_out.h>
+#include <deal.II/grid/tria.h>
+
+#include <fstream>
+
+#include "../tests.h"
+
+template <int dim>
+void
+check()
+{
+  Triangulation<dim> triangulation;
+  GridGenerator::reference_cell(triangulation, ReferenceCells::Pyramid);
+  {
+    GridOut go;
+    go.set_flags(GridOutFlags::Msh(true));
+
+    go.write_gnuplot(triangulation, deallog.get_file_stream());
+  }
+
+  deallog << "OK!" << std::endl;
+}
+
+
+int
+main()
+{
+  initlog();
+  check<3>();
+}
diff --git a/tests/simplex/grid_out_gnuplot_pyramid.output b/tests/simplex/grid_out_gnuplot_pyramid.output
new file mode 100644 (file)
index 0000000..5defed7
--- /dev/null
@@ -0,0 +1,14 @@
+
+-1.00000 -1.00000 0.00000 0 0
+1.00000 -1.00000 0.00000 0 0
+1.00000 1.00000 0.00000 0 0
+-1.00000 1.00000 0.00000 0 0
+-1.00000 -1.00000 0.00000 0 0
+0.00000 0.00000 1.00000 0 0
+1.00000 -1.00000 0.00000 0 0
+
+-1.00000 1.00000 0.00000 0 0
+0.00000 0.00000 1.00000 0 0
+1.00000 1.00000 0.00000 0 0
+
+DEAL::OK!

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.