]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Testsuite: Move matching tests: deal.II -> grid/
authorMatthias Maier <tamiko@43-1.org>
Fri, 28 Aug 2015 03:44:44 +0000 (22:44 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sat, 29 Aug 2015 03:45:04 +0000 (22:45 -0500)
161 files changed:
tests/deal.II/grid_in_msh_02.cc [deleted file]
tests/deal.II/grid_in_msh_02.output [deleted file]
tests/grid/grid_generator_09.cc [moved from tests/deal.II/grid_generator_01.cc with 100% similarity]
tests/grid/grid_generator_09.output [moved from tests/deal.II/grid_generator_01.output with 100% similarity]
tests/grid/grid_hyper_shell.cc [moved from tests/deal.II/grid_hyper_shell.cc with 100% similarity]
tests/grid/grid_hyper_shell.output [moved from tests/deal.II/grid_hyper_shell.output with 100% similarity]
tests/grid/grid_hyper_shell_02.cc [moved from tests/deal.II/grid_hyper_shell_02.cc with 100% similarity]
tests/grid/grid_hyper_shell_02.output [moved from tests/deal.II/grid_hyper_shell_02.output with 100% similarity]
tests/grid/grid_hyper_shell_03.cc [moved from tests/deal.II/grid_hyper_shell_03.cc with 100% similarity]
tests/grid/grid_hyper_shell_03.output [moved from tests/deal.II/grid_hyper_shell_03.output with 100% similarity]
tests/grid/grid_hyper_shell_04.cc [moved from tests/deal.II/grid_hyper_shell_04.cc with 100% similarity]
tests/grid/grid_hyper_shell_04.output [moved from tests/deal.II/grid_hyper_shell_04.output with 100% similarity]
tests/grid/grid_hyper_shell_05.cc [moved from tests/deal.II/grid_hyper_shell_05.cc with 100% similarity]
tests/grid/grid_hyper_shell_05.output [moved from tests/deal.II/grid_hyper_shell_05.output with 100% similarity]
tests/grid/grid_hyper_shell_06.cc [moved from tests/deal.II/grid_hyper_shell_06.cc with 100% similarity]
tests/grid/grid_hyper_shell_06.output [moved from tests/deal.II/grid_hyper_shell_06.output with 100% similarity]
tests/grid/grid_in.cc [moved from tests/deal.II/grid_in.cc with 100% similarity]
tests/grid/grid_in.output [moved from tests/deal.II/grid_in.output with 100% similarity]
tests/grid/grid_in/2d.inp [moved from tests/deal.II/grid_in/2d.inp with 100% similarity]
tests/grid/grid_in/2d.nc [moved from tests/deal.II/grid_in/2d.nc with 100% similarity]
tests/grid/grid_in/2d.xda [moved from tests/deal.II/grid_in/2d.xda with 100% similarity]
tests/grid/grid_in_02.cc [moved from tests/deal.II/grid_in_02.cc with 100% similarity]
tests/grid/grid_in_02.output [moved from tests/deal.II/grid_in_02.output with 100% similarity]
tests/grid/grid_in_02/2d.xda [moved from tests/deal.II/grid_in_02/2d.xda with 100% similarity]
tests/grid/grid_in_3d.cc [moved from tests/deal.II/grid_in_3d.cc with 100% similarity]
tests/grid/grid_in_3d.output [moved from tests/deal.II/grid_in_3d.output with 100% similarity]
tests/grid/grid_in_3d/1.in [moved from tests/deal.II/grid_in_3d/1.in with 100% similarity]
tests/grid/grid_in_3d/1.nc [moved from tests/deal.II/grid_in_3d/1.nc with 100% similarity]
tests/grid/grid_in_3d/2.in [moved from tests/deal.II/grid_in_3d/2.in with 100% similarity]
tests/grid/grid_in_3d/3.in [moved from tests/deal.II/grid_in_3d/3.in with 100% similarity]
tests/grid/grid_in_3d/4.in [moved from tests/deal.II/grid_in_3d/4.in with 100% similarity]
tests/grid/grid_in_3d/evil_0.in [moved from tests/deal.II/grid_in_3d/evil_0.in with 100% similarity]
tests/grid/grid_in_3d/evil_1.in [moved from tests/deal.II/grid_in_3d/evil_1.in with 100% similarity]
tests/grid/grid_in_3d/evil_2.in [moved from tests/deal.II/grid_in_3d/evil_2.in with 100% similarity]
tests/grid/grid_in_3d/evil_3.in [moved from tests/deal.II/grid_in_3d/evil_3.in with 100% similarity]
tests/grid/grid_in_3d/evil_4.in [moved from tests/deal.II/grid_in_3d/evil_4.in with 100% similarity]
tests/grid/grid_in_3d_02.cc [moved from tests/deal.II/grid_in_3d_02.cc with 100% similarity]
tests/grid/grid_in_3d_02.output [moved from tests/deal.II/grid_in_3d_02.output with 100% similarity]
tests/grid/grid_in_3d_02/747.ucd [moved from tests/deal.II/grid_in_3d_02/747.ucd with 100% similarity]
tests/grid/grid_in_gmsh_01.2d.msh [moved from tests/grid/grid_in_msh_01.2d.msh with 100% similarity]
tests/grid/grid_in_gmsh_01.2da.msh [moved from tests/grid/grid_in_msh_01.2da.msh with 100% similarity]
tests/grid/grid_in_gmsh_01.3d.msh [moved from tests/grid/grid_in_msh_01.3d.msh with 100% similarity]
tests/grid/grid_in_gmsh_01.3d_neg.msh [moved from tests/grid/grid_in_msh_01.3d_neg.msh with 100% similarity]
tests/grid/grid_in_gmsh_01.3da.msh [moved from tests/grid/grid_in_msh_01.3da.msh with 100% similarity]
tests/grid/grid_in_gmsh_01.cc [moved from tests/grid/grid_in_msh_01.cc with 100% similarity]
tests/grid/grid_in_gmsh_01.output [moved from tests/grid/grid_in_msh_01.output with 100% similarity]
tests/grid/grid_in_gmsh_02.cc [new file with mode: 0644]
tests/grid/grid_in_gmsh_02.output [new file with mode: 0644]
tests/grid/grid_in_msh.cc [moved from tests/deal.II/grid_in_msh.cc with 100% similarity]
tests/grid/grid_in_msh.output [moved from tests/deal.II/grid_in_msh.output with 100% similarity]
tests/grid/grid_in_msh/mesh.msh [moved from tests/deal.II/grid_in_msh/mesh.msh with 100% similarity]
tests/grid/grid_in_msh_02.cc
tests/grid/grid_in_msh_02.output
tests/grid/grid_in_msh_02/mesh.msh [moved from tests/deal.II/grid_in_msh_02/mesh.msh with 100% similarity]
tests/grid/grid_in_msh_02_13.cc [moved from tests/deal.II/grid_in_msh_02_13.cc with 100% similarity]
tests/grid/grid_in_msh_02_13.output [moved from tests/deal.II/grid_in_msh_02_13.output with 100% similarity]
tests/grid/grid_in_msh_03.cc [moved from tests/deal.II/grid_in_msh_03.cc with 100% similarity]
tests/grid/grid_in_msh_03.output [moved from tests/deal.II/grid_in_msh_03.output with 100% similarity]
tests/grid/grid_in_msh_03/mesh.msh [moved from tests/deal.II/grid_in_msh_03/mesh.msh with 100% similarity]
tests/grid/grid_in_msh_version_1.cc [moved from tests/deal.II/grid_in_msh_version_1.cc with 100% similarity]
tests/grid/grid_in_msh_version_1.output [moved from tests/deal.II/grid_in_msh_version_1.output with 100% similarity]
tests/grid/grid_in_msh_version_1/input_v1.msh [moved from tests/deal.II/grid_in_msh_version_1/input_v1.msh with 100% similarity]
tests/grid/grid_in_msh_version_1/input_v2.msh [moved from tests/deal.II/grid_in_msh_version_1/input_v2.msh with 100% similarity]
tests/grid/grid_in_msh_version_2.cc [moved from tests/deal.II/grid_in_msh_version_2.cc with 100% similarity]
tests/grid/grid_in_msh_version_2.output [moved from tests/deal.II/grid_in_msh_version_2.output with 100% similarity]
tests/grid/grid_in_msh_version_2/hole81.msh [moved from tests/deal.II/grid_in_msh_version_2/hole81.msh with 100% similarity]
tests/grid/grid_in_msh_version_2/hole8170.msh [moved from tests/deal.II/grid_in_msh_version_2/hole8170.msh with 100% similarity]
tests/grid/grid_in_tecplot.cc [moved from tests/deal.II/grid_in_tecplot.cc with 100% similarity]
tests/grid/grid_in_tecplot.output [moved from tests/deal.II/grid_in_tecplot.output with 100% similarity]
tests/grid/grid_in_tecplot/1.dat [moved from tests/deal.II/grid_in_tecplot/1.dat with 100% similarity]
tests/grid/grid_in_tecplot/2.dat [moved from tests/deal.II/grid_in_tecplot/2.dat with 100% similarity]
tests/grid/grid_in_tecplot/3.dat [moved from tests/deal.II/grid_in_tecplot/3.dat with 100% similarity]
tests/grid/grid_in_tecplot/4.dat [moved from tests/deal.II/grid_in_tecplot/4.dat with 100% similarity]
tests/grid/grid_in_unv_2d.cc [moved from tests/deal.II/grid_in_unv_2d.cc with 100% similarity]
tests/grid/grid_in_unv_2d.output [moved from tests/deal.II/grid_in_unv_2d.output with 100% similarity]
tests/grid/grid_in_unv_2d/mesh.msh [moved from tests/deal.II/grid_in_unv_2d/mesh.msh with 100% similarity]
tests/grid/grid_in_unv_2d/test1427.unv [moved from tests/deal.II/grid_in_unv_2d/test1427.unv with 100% similarity]
tests/grid/grid_in_unv_2d/test46.unv [moved from tests/deal.II/grid_in_unv_2d/test46.unv with 100% similarity]
tests/grid/grid_in_unv_3d.cc [moved from tests/deal.II/grid_in_unv_3d.cc with 100% similarity]
tests/grid/grid_in_unv_3d.output [moved from tests/deal.II/grid_in_unv_3d.output with 100% similarity]
tests/grid/grid_in_unv_3d/3D.unv [moved from tests/deal.II/grid_in_unv_3d/3D.unv with 100% similarity]
tests/grid/grid_in_unv_3d/mesh.msh [moved from tests/deal.II/grid_in_unv_3d/mesh.msh with 100% similarity]
tests/grid/grid_in_vtk_2d.cc [moved from tests/deal.II/grid_in_vtk_2d.cc with 100% similarity]
tests/grid/grid_in_vtk_2d.output [moved from tests/deal.II/grid_in_vtk_2d.output with 100% similarity]
tests/grid/grid_in_vtk_2d/mesh [moved from tests/deal.II/grid_in_vtk_2d/mesh with 100% similarity]
tests/grid/grid_in_vtk_2d/mesh.msh [moved from tests/deal.II/grid_in_vtk_2d/mesh.msh with 100% similarity]
tests/grid/grid_in_vtk_3d.cc [moved from tests/deal.II/grid_in_vtk_3d.cc with 100% similarity]
tests/grid/grid_in_vtk_3d.output [moved from tests/deal.II/grid_in_vtk_3d.output with 100% similarity]
tests/grid/grid_in_vtk_3d/mesh [moved from tests/deal.II/grid_in_vtk_3d/mesh with 100% similarity]
tests/grid/grid_in_vtk_3d/mesh.msh [moved from tests/deal.II/grid_in_vtk_3d/mesh.msh with 100% similarity]
tests/grid/grid_in_vtk_3d_02.cc [moved from tests/deal.II/grid_in_vtk_3d_02.cc with 100% similarity]
tests/grid/grid_in_vtk_3d_02.output [moved from tests/deal.II/grid_in_vtk_3d_02.output with 100% similarity]
tests/grid/grid_in_vtk_3d_02.vtk [moved from tests/deal.II/grid_in_vtk_3d_02.vtk with 100% similarity]
tests/grid/grid_in_vtk_3d_03.cc [moved from tests/deal.II/grid_in_vtk_3d_03.cc with 100% similarity]
tests/grid/grid_in_vtk_3d_03.output [moved from tests/deal.II/grid_in_vtk_3d_03.output with 100% similarity]
tests/grid/grid_in_vtk_3d_03.vtk [moved from tests/deal.II/grid_in_vtk_3d_03.vtk with 100% similarity]
tests/grid/grid_invert.cc [moved from tests/deal.II/grid_invert.cc with 100% similarity]
tests/grid/grid_invert.output [moved from tests/deal.II/grid_invert.output with 100% similarity]
tests/grid/grid_out.cc [moved from tests/deal.II/grid_out.cc with 100% similarity]
tests/grid/grid_out.output [moved from tests/deal.II/grid_out.output with 100% similarity]
tests/grid/grid_out_02.cc [moved from tests/deal.II/grid_out_02.cc with 100% similarity]
tests/grid/grid_out_02.output [moved from tests/deal.II/grid_out_02.output with 100% similarity]
tests/grid/grid_out_03.cc [moved from tests/deal.II/grid_out_03.cc with 100% similarity]
tests/grid/grid_out_03.output [moved from tests/deal.II/grid_out_03.output with 100% similarity]
tests/grid/grid_out_04.cc [moved from tests/deal.II/grid_out_04.cc with 100% similarity]
tests/grid/grid_out_04.output [moved from tests/deal.II/grid_out_04.output with 100% similarity]
tests/grid/grid_out_05.cc [moved from tests/deal.II/grid_out_05.cc with 100% similarity]
tests/grid/grid_out_05.output [moved from tests/deal.II/grid_out_05.output with 100% similarity]
tests/grid/grid_out_07.cc [moved from tests/deal.II/grid_out_07.cc with 100% similarity]
tests/grid/grid_out_07.with_zlib=on.output [moved from tests/deal.II/grid_out_07.with_zlib=on.output with 100% similarity]
tests/grid/grid_out_08.cc [moved from tests/deal.II/grid_out_08.cc with 100% similarity]
tests/grid/grid_out_08.with_zlib=on.output [moved from tests/deal.II/grid_out_08.with_zlib=on.output with 100% similarity]
tests/grid/grid_out_09.cc [moved from tests/deal.II/grid_out_09.cc with 100% similarity]
tests/grid/grid_out_09.output [moved from tests/deal.II/grid_out_09.output with 100% similarity]
tests/grid/grid_output_input.cc [moved from tests/deal.II/grid_output_input.cc with 100% similarity]
tests/grid/grid_output_input.output [moved from tests/deal.II/grid_output_input.output with 100% similarity]
tests/grid/grid_parallelepiped.cc [moved from tests/deal.II/grid_parallelepiped.cc with 100% similarity]
tests/grid/grid_parallelepiped.output [moved from tests/deal.II/grid_parallelepiped.output with 100% similarity]
tests/grid/grid_parallelepiped_01.cc [moved from tests/deal.II/grid_parallelepiped_01.cc with 100% similarity]
tests/grid/grid_parallelepiped_01.output [moved from tests/deal.II/grid_parallelepiped_01.output with 100% similarity]
tests/grid/grid_parallelepiped_02.cc [moved from tests/deal.II/grid_parallelepiped_02.cc with 100% similarity]
tests/grid/grid_parallelepiped_02.output [moved from tests/deal.II/grid_parallelepiped_02.output with 100% similarity]
tests/grid/grid_parallelepiped_03.cc [moved from tests/deal.II/grid_parallelepiped_03.cc with 100% similarity]
tests/grid/grid_parallelepiped_03.output [moved from tests/deal.II/grid_parallelepiped_03.output with 100% similarity]
tests/grid/grid_test.cc [moved from tests/deal.II/grid_test.cc with 100% similarity]
tests/grid/grid_test.output [moved from tests/deal.II/grid_test.output with 100% similarity]
tests/grid/grid_tools.cc [moved from tests/deal.II/grid_tools.cc with 100% similarity]
tests/grid/grid_tools.output [moved from tests/deal.II/grid_tools.output with 100% similarity]
tests/grid/grid_tools_02.cc [moved from tests/deal.II/grid_tools_02.cc with 100% similarity]
tests/grid/grid_tools_02.output [moved from tests/deal.II/grid_tools_02.output with 100% similarity]
tests/grid/grid_tools_03.cc [moved from tests/deal.II/grid_tools_03.cc with 100% similarity]
tests/grid/grid_tools_03.output [moved from tests/deal.II/grid_tools_03.output with 100% similarity]
tests/grid/grid_tools_04.cc [moved from tests/deal.II/grid_tools_04.cc with 100% similarity]
tests/grid/grid_tools_04.output [moved from tests/deal.II/grid_tools_04.output with 100% similarity]
tests/grid/grid_tools_05.cc [moved from tests/deal.II/grid_tools_05.cc with 100% similarity]
tests/grid/grid_tools_05.output [moved from tests/deal.II/grid_tools_05.output with 100% similarity]
tests/grid/grid_tools_06.cc [moved from tests/deal.II/grid_tools_06.cc with 100% similarity]
tests/grid/grid_tools_06.output [moved from tests/deal.II/grid_tools_06.output with 100% similarity]
tests/grid/grid_tools_halo_layer_01.cc [moved from tests/deal.II/grid_tools_halo_layer_01.cc with 100% similarity]
tests/grid/grid_tools_halo_layer_01.output [moved from tests/deal.II/grid_tools_halo_layer_01.output with 100% similarity]
tests/grid/grid_tools_halo_layer_02.cc [moved from tests/deal.II/grid_tools_halo_layer_02.cc with 100% similarity]
tests/grid/grid_tools_halo_layer_02.output [moved from tests/deal.II/grid_tools_halo_layer_02.output with 100% similarity]
tests/grid/grid_tools_halo_layer_03.cc [moved from tests/deal.II/grid_tools_halo_layer_03.cc with 100% similarity]
tests/grid/grid_tools_halo_layer_03.output [moved from tests/deal.II/grid_tools_halo_layer_03.output with 100% similarity]
tests/grid/grid_tools_halo_layer_04.cc [moved from tests/deal.II/grid_tools_halo_layer_04.cc with 100% similarity]
tests/grid/grid_tools_halo_layer_04.output [moved from tests/deal.II/grid_tools_halo_layer_04.output with 100% similarity]
tests/grid/grid_tools_halo_layer_05.cc [moved from tests/deal.II/grid_tools_halo_layer_05.cc with 100% similarity]
tests/grid/grid_tools_halo_layer_05.output [moved from tests/deal.II/grid_tools_halo_layer_05.output with 100% similarity]
tests/grid/grid_tools_halo_layer_ghost_cells.cc [moved from tests/deal.II/grid_tools_halo_layer_ghost_cells.cc with 100% similarity]
tests/grid/grid_tools_halo_layer_ghost_cells.mpirun=2.output [moved from tests/deal.II/grid_tools_halo_layer_ghost_cells.mpirun=2.output with 100% similarity]
tests/grid/grid_tools_halo_layer_ghost_cells.mpirun=3.output [moved from tests/deal.II/grid_tools_halo_layer_ghost_cells.mpirun=3.output with 100% similarity]
tests/grid/grid_tools_transform_01.cc [moved from tests/deal.II/grid_tools_transform_01.cc with 100% similarity]
tests/grid/grid_tools_transform_01.output [moved from tests/deal.II/grid_tools_transform_01.output with 100% similarity]
tests/grid/grid_transform.cc [moved from tests/deal.II/grid_transform.cc with 100% similarity]
tests/grid/grid_transform.output [moved from tests/deal.II/grid_transform.output with 100% similarity]
tests/grid/grid_transform_02.cc [moved from tests/deal.II/grid_transform_02.cc with 100% similarity]
tests/grid/grid_transform_02.output [moved from tests/deal.II/grid_transform_02.output with 100% similarity]
tests/grid/grid_transform_3d.cc [moved from tests/deal.II/grid_transform_3d.cc with 100% similarity]
tests/grid/grid_transform_3d.output [moved from tests/deal.II/grid_transform_3d.output with 100% similarity]
tests/grid/grid_transform_coefficient.cc [moved from tests/deal.II/grid_transform_coefficient.cc with 100% similarity]
tests/grid/grid_transform_coefficient.output [moved from tests/deal.II/grid_transform_coefficient.output with 100% similarity]

diff --git a/tests/deal.II/grid_in_msh_02.cc b/tests/deal.II/grid_in_msh_02.cc
deleted file mode 100644 (file)
index cfa014f..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2002 - 2014 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 at
-// the top level of the deal.II distribution.
-//
-// ---------------------------------------------------------------------
-
-
-// in 1d, we have to read vertex information to set boundary
-// indicators
-//
-// test case by Jan Strebel
-
-
-#include "../tests.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_in.h>
-#include <deal.II/grid/grid_generator.h>
-#include <deal.II/base/logstream.h>
-
-#include <fstream>
-#include <iomanip>
-#include <string>
-
-std::ofstream logfile("output");
-
-
-void check_file ()
-{
-  Triangulation<1> tria;
-  GridIn<1> gi;
-  gi.attach_triangulation (tria);
-  std::ifstream in (SOURCE_DIR "/../grid/grids/grid_in_msh_02.msh");
-  gi.read_msh(in);
-
-  for (Triangulation<1>::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell)
-    {
-      for (unsigned int face = 0; face < 2; ++face)
-      {
-        if (cell->at_boundary(face))
-          deallog << "vertex " << cell->face_index(face)
-                  << " has boundary indicator " << (int)cell->face(face)->boundary_indicator()
-                  << std::endl;
-      }
-    }
-}
-
-
-int main ()
-{
-  deallog << std::setprecision (2);
-  logfile << std::setprecision (2);
-  deallog.attach(logfile);
-  deallog.depth_console(0);
-  deallog.threshold_double(1.e-10);
-
-  check_file ();
-}
-
diff --git a/tests/deal.II/grid_in_msh_02.output b/tests/deal.II/grid_in_msh_02.output
deleted file mode 100644 (file)
index 2ebba38..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-
-DEAL::vertex 0 has boundary indicator 10
-DEAL::vertex 1 has boundary indicator 20
diff --git a/tests/grid/grid_in_gmsh_02.cc b/tests/grid/grid_in_gmsh_02.cc
new file mode 100644 (file)
index 0000000..b615e5c
--- /dev/null
@@ -0,0 +1,93 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2004 - 2014 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 at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+
+// check whether we can read in with the gmsh format
+
+#include "../tests.h"
+#include <deal.II/base/logstream.h>
+
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/tria_accessor.h>
+#include <deal.II/grid/tria_iterator.h>
+#include <deal.II/grid/grid_in.h>
+
+#include <fstream>
+#include <cmath>
+
+
+template <int dim>
+void gmsh_grid (const char *name)
+{
+  Triangulation<dim> tria;
+  GridIn<dim> grid_in;
+  grid_in.attach_triangulation (tria);
+  std::ifstream input_file(name);
+  grid_in.read_msh(input_file);
+
+  deallog << "  " << tria.n_active_cells() << " active cells" << std::endl;
+
+  int hash = 0;
+  int index = 0;
+  for (typename Triangulation<dim>::active_cell_iterator c=tria.begin_active();
+       c!=tria.end(); ++c, ++index)
+    for (unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i)
+      hash += (index * i * c->vertex_index(i)) % (tria.n_active_cells()+1);
+  deallog << "  hash=" << hash << std::endl;
+}
+
+
+int main ()
+{
+  std::ofstream logfile("output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  try
+    {
+      gmsh_grid<2> (SOURCE_DIR "/grids/grid_in_msh_01.2d.msh");
+      gmsh_grid<2> (SOURCE_DIR "/grids/grid_in_msh_01.2da.msh");
+      gmsh_grid<3> (SOURCE_DIR "/grids/grid_in_msh_01.3d.msh");
+      gmsh_grid<3> (SOURCE_DIR "/grids/grid_in_msh_01.3da.msh");
+      gmsh_grid<3> (SOURCE_DIR "/grids/grid_in_msh_01.3d_neg.msh");
+    }
+  catch (std::exception &exc)
+    {
+      deallog << std::endl << std::endl
+              << "----------------------------------------------------"
+              << std::endl;
+      deallog << "Exception on processing: " << std::endl
+              << exc.what() << std::endl
+              << "Aborting!" << std::endl
+              << "----------------------------------------------------"
+              << std::endl;
+      return 1;
+    }
+  catch (...)
+    {
+      deallog << std::endl << std::endl
+              << "----------------------------------------------------"
+              << std::endl;
+      deallog << "Unknown exception!" << std::endl
+              << "Aborting!" << std::endl
+              << "----------------------------------------------------"
+              << std::endl;
+      return 1;
+    };
+
+  return 0;
+}
diff --git a/tests/grid/grid_in_gmsh_02.output b/tests/grid/grid_in_gmsh_02.output
new file mode 100644 (file)
index 0000000..e69de29
index b615e5cba301c5887d2a152e8703955b449b1065..cfa014f4e34753a085fcafbdeefce12f9667aa1d 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2004 - 2014 by the deal.II authors
+// Copyright (C) 2002 - 2014 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
 // ---------------------------------------------------------------------
 
 
+// in 1d, we have to read vertex information to set boundary
+// indicators
+//
+// test case by Jan Strebel
 
-// check whether we can read in with the gmsh format
 
 #include "../tests.h"
-#include <deal.II/base/logstream.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_in.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/base/logstream.h>
 
 #include <fstream>
-#include <cmath>
+#include <iomanip>
+#include <string>
 
+std::ofstream logfile("output");
 
-template <int dim>
-void gmsh_grid (const char *name)
-{
-  Triangulation<dim> tria;
-  GridIn<dim> grid_in;
-  grid_in.attach_triangulation (tria);
-  std::ifstream input_file(name);
-  grid_in.read_msh(input_file);
 
-  deallog << "  " << tria.n_active_cells() << " active cells" << std::endl;
+void check_file ()
+{
+  Triangulation<1> tria;
+  GridIn<1> gi;
+  gi.attach_triangulation (tria);
+  std::ifstream in (SOURCE_DIR "/../grid/grids/grid_in_msh_02.msh");
+  gi.read_msh(in);
 
-  int hash = 0;
-  int index = 0;
-  for (typename Triangulation<dim>::active_cell_iterator c=tria.begin_active();
-       c!=tria.end(); ++c, ++index)
-    for (unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i)
-      hash += (index * i * c->vertex_index(i)) % (tria.n_active_cells()+1);
-  deallog << "  hash=" << hash << std::endl;
+  for (Triangulation<1>::active_cell_iterator cell = tria.begin_active(); cell != tria.end(); ++cell)
+    {
+      for (unsigned int face = 0; face < 2; ++face)
+      {
+        if (cell->at_boundary(face))
+          deallog << "vertex " << cell->face_index(face)
+                  << " has boundary indicator " << (int)cell->face(face)->boundary_indicator()
+                  << std::endl;
+      }
+    }
 }
 
 
 int main ()
 {
-  std::ofstream logfile("output");
+  deallog << std::setprecision (2);
+  logfile << std::setprecision (2);
   deallog.attach(logfile);
   deallog.depth_console(0);
   deallog.threshold_double(1.e-10);
 
-  try
-    {
-      gmsh_grid<2> (SOURCE_DIR "/grids/grid_in_msh_01.2d.msh");
-      gmsh_grid<2> (SOURCE_DIR "/grids/grid_in_msh_01.2da.msh");
-      gmsh_grid<3> (SOURCE_DIR "/grids/grid_in_msh_01.3d.msh");
-      gmsh_grid<3> (SOURCE_DIR "/grids/grid_in_msh_01.3da.msh");
-      gmsh_grid<3> (SOURCE_DIR "/grids/grid_in_msh_01.3d_neg.msh");
-    }
-  catch (std::exception &exc)
-    {
-      deallog << std::endl << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Exception on processing: " << std::endl
-              << exc.what() << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      return 1;
-    }
-  catch (...)
-    {
-      deallog << std::endl << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      deallog << "Unknown exception!" << std::endl
-              << "Aborting!" << std::endl
-              << "----------------------------------------------------"
-              << std::endl;
-      return 1;
-    };
-
-  return 0;
+  check_file ();
 }
+
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..2ebba38d85c8be09b42d3625ba12bf44f2c3f188 100644 (file)
@@ -0,0 +1,3 @@
+
+DEAL::vertex 0 has boundary indicator 10
+DEAL::vertex 1 has boundary indicator 20

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.