--- /dev/null
+//---------------------------- grid_out_03.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_03.cc ---------------------------
+
+// make sure that we write boundary lines marked with a non-zero boundary
+// indicator correctly in UCD format
+
+#include "../tests.h"
+#include <deal.II/base/geometry_info.h>
+#include <deal.II/dofs/dof_handler.h>
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/tria_boundary.h>
+#include <deal.II/grid/tria_boundary_lib.h>
+#include <deal.II/grid/tria_accessor.h>
+#include <deal.II/grid/tria_iterator.h>
+#include <deal.II/grid/grid_out.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/base/logstream.h>
+
+#include <fstream>
+#include <iomanip>
+
+
+std::ofstream logfile("grid_out_03/output");
+
+
+template <int dim>
+void test ()
+{
+ Triangulation<dim> 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::Ucd flags;
+ flags.write_lines = flags.write_faces = true;
+ grid_out.set_flags (flags);
+ grid_out.write_ucd (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> ();
+}
+