From 43e9069de439539f4c864ec74c88b20cc13d11d1 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 10 Dec 2021 17:03:01 -0700 Subject: [PATCH] Add a test. --- tests/simplex/grid_out_gnuplot_pyramid.cc | 49 +++++++++++++++++++ tests/simplex/grid_out_gnuplot_pyramid.output | 14 ++++++ 2 files changed, 63 insertions(+) create mode 100644 tests/simplex/grid_out_gnuplot_pyramid.cc create mode 100644 tests/simplex/grid_out_gnuplot_pyramid.output diff --git a/tests/simplex/grid_out_gnuplot_pyramid.cc b/tests/simplex/grid_out_gnuplot_pyramid.cc new file mode 100644 index 0000000000..82e56efe93 --- /dev/null +++ b/tests/simplex/grid_out_gnuplot_pyramid.cc @@ -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 +#include +#include + +#include + +#include "../tests.h" + +template +void +check() +{ + Triangulation 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 index 0000000000..5defed756f --- /dev/null +++ b/tests/simplex/grid_out_gnuplot_pyramid.output @@ -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! -- 2.39.5