From 01e149b6213c276cbf440576096ad8dc4b252d70 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 12 Oct 2012 03:12:30 +0000 Subject: [PATCH] Another test. git-svn-id: https://svn.dealii.org/trunk@27069 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/deal.II/grid_out_04.cc | 63 +++++++++++++++++++++++++++ tests/deal.II/grid_out_04/cmp/generic | 31 +++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 tests/deal.II/grid_out_04.cc create mode 100644 tests/deal.II/grid_out_04/cmp/generic diff --git a/tests/deal.II/grid_out_04.cc b/tests/deal.II/grid_out_04.cc new file mode 100644 index 0000000000..79e9f7117b --- /dev/null +++ b/tests/deal.II/grid_out_04.cc @@ -0,0 +1,63 @@ +//---------------------------- grid_out_04.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2002, 2003, 2004, 2005, 2008, 2012 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- grid_out_04.cc --------------------------- + +// make sure that we write boundary lines marked with a non-zero boundary +// indicator correctly in MSH format + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + + +std::ofstream logfile("grid_out_04/output"); + + +template +void test () +{ + Triangulation tria; + GridGenerator::hyper_cube (tria); + tria.begin_active()->line(0)->set_boundary_indicator(1); + tria.begin_active()->face(2*dim-1)->set_boundary_indicator(2); + + GridOut grid_out; + GridOutFlags::Msh flags; + flags.write_lines = flags.write_faces = true; + grid_out.set_flags (flags); + grid_out.write_msh (tria, logfile); +} + + +int main () +{ + deallog << std::setprecision (2); + logfile << std::setprecision (2); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + test<2> (); + test<3> (); +} + diff --git a/tests/deal.II/grid_out_04/cmp/generic b/tests/deal.II/grid_out_04/cmp/generic new file mode 100644 index 0000000000..5403b23775 --- /dev/null +++ b/tests/deal.II/grid_out_04/cmp/generic @@ -0,0 +1,31 @@ + +$NOD +4 +1 0.0 0.0 0 +2 1.0 0.0 0 +3 0.0 1.0 0 +4 1.0 1.0 0 +$ENDNOD +$ELM +3 +1 3 0 0 4 1 2 4 3 +2 1 1 1 2 1 3 +3 1 2 2 2 3 4 +$ENDELM +$NOD +8 +1 0.0 0.0 0.0 +2 1.0 0.0 0.0 +3 0.0 1.0 0.0 +4 1.0 1.0 0.0 +5 0.0 0.0 1.0 +6 1.0 0.0 1.0 +7 0.0 1.0 1.0 +8 1.0 1.0 1.0 +$ENDNOD +$ELM +3 +1 5 0 0 8 1 2 6 5 3 4 8 7 +2 3 2 2 4 5 6 8 7 +2 1 1 1 2 1 3 +$ENDELM -- 2.39.5