From: bangerth Date: Fri, 12 Oct 2012 03:12:30 +0000 (+0000) Subject: Another test. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c31004d32bc3542d206374afa5e6adf1477ba076;p=dealii-svn.git Another test. git-svn-id: https://svn.dealii.org/trunk@27069 0785d39b-7218-0410-832d-ea1e28bc413d --- 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