From 1f5318c4f1e5e7820268763a0f4f30c861c884e9 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 30 Nov 2015 17:21:33 -0600 Subject: [PATCH] Add test. --- tests/codim_one/extract_boundary_mesh_12.cc | 68 +++ .../codim_one/extract_boundary_mesh_12.output | 507 ++++++++++++++++++ 2 files changed, 575 insertions(+) create mode 100644 tests/codim_one/extract_boundary_mesh_12.cc create mode 100644 tests/codim_one/extract_boundary_mesh_12.output diff --git a/tests/codim_one/extract_boundary_mesh_12.cc b/tests/codim_one/extract_boundary_mesh_12.cc new file mode 100644 index 0000000000..7a6f2ea5e1 --- /dev/null +++ b/tests/codim_one/extract_boundary_mesh_12.cc @@ -0,0 +1,68 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2010 - 2015 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. +// +// --------------------------------------------------------------------- + + +// like _11, but using a different way of copying manifold ids + +#include "../tests.h" + +#include +#include +#include +#include +#include + + + +void test() +{ + const int dim=3; + + Triangulation triangulation; + GridGenerator::cylinder(triangulation, 100, 200); + + // copy boundary indicators to manifold indicators for boundary + // faces + GridTools::copy_boundary_to_manifold_id (triangulation); + + static const CylinderBoundary outer_cylinder (100,0); + triangulation.set_manifold(0,outer_cylinder); + + // now extract the surface mesh + Triangulation triangulation_surface; + + static const CylinderBoundary surface_cyl(100,0); + triangulation_surface.set_manifold(0,surface_cyl); + + GridGenerator::extract_boundary_mesh(triangulation,triangulation_surface); + + // refine the surface mesh to see the effect of boundary/manifold + // indicators + triangulation_surface.refine_global (1); + GridOut().write_gnuplot(triangulation_surface, deallog.get_file_stream()); + + deallog << triangulation_surface.n_used_vertices() << std::endl; + deallog << triangulation_surface.n_active_cells() << std::endl; +} + + +int main () +{ + std::ofstream logfile("output"); + deallog.attach(logfile); + deallog.depth_console(0); + + test(); +} diff --git a/tests/codim_one/extract_boundary_mesh_12.output b/tests/codim_one/extract_boundary_mesh_12.output new file mode 100644 index 0000000000..cfab62ea4d --- /dev/null +++ b/tests/codim_one/extract_boundary_mesh_12.output @@ -0,0 +1,507 @@ + +-200.000 70.7107 -70.7107 1 1 +-200.000 50.0000 -50.0000 1 1 +-200.000 0.00000 -53.6612 1 1 +-200.000 0.00000 -100.000 1 1 +-200.000 70.7107 -70.7107 1 1 + + +-200.000 50.0000 -50.0000 1 1 +-200.000 29.2893 -29.2893 1 1 +-200.000 0.00000 -29.2893 1 1 +-200.000 0.00000 -53.6612 1 1 +-200.000 50.0000 -50.0000 1 1 + + +-200.000 0.00000 -100.000 1 1 +-200.000 0.00000 -53.6612 1 1 +-200.000 -50.0000 -50.0000 1 1 +-200.000 -70.7107 -70.7107 1 1 +-200.000 0.00000 -100.000 1 1 + + +-200.000 0.00000 -53.6612 1 1 +-200.000 0.00000 -29.2893 1 1 +-200.000 -29.2893 -29.2893 1 1 +-200.000 -50.0000 -50.0000 1 1 +-200.000 0.00000 -53.6612 1 1 + + +-200.000 70.7107 -70.7107 1 0 +-200.000 0.00000 -100.000 1 0 +-100.000 0.00000 -100.000 1 0 +-100.000 70.7107 -70.7107 1 0 +-200.000 70.7107 -70.7107 1 0 + + +-200.000 0.00000 -100.000 1 0 +-200.000 -70.7107 -70.7107 1 0 +-100.000 -70.7107 -70.7107 1 0 +-100.000 0.00000 -100.000 1 0 +-200.000 0.00000 -100.000 1 0 + + +-100.000 70.7107 -70.7107 1 0 +-100.000 0.00000 -100.000 1 0 +0.00000 0.00000 -100.000 1 0 +0.00000 70.7107 -70.7107 1 0 +-100.000 70.7107 -70.7107 1 0 + + +-100.000 0.00000 -100.000 1 0 +-100.000 -70.7107 -70.7107 1 0 +0.00000 -70.7107 -70.7107 1 0 +0.00000 0.00000 -100.000 1 0 +-100.000 0.00000 -100.000 1 0 + + +-200.000 70.7107 -70.7107 1 0 +-100.000 70.7107 -70.7107 1 0 +-100.000 100.000 0.00000 1 0 +-200.000 100.000 0.00000 1 0 +-200.000 70.7107 -70.7107 1 0 + + +-100.000 70.7107 -70.7107 1 0 +0.00000 70.7107 -70.7107 1 0 +0.00000 100.000 0.00000 1 0 +-100.000 100.000 0.00000 1 0 +-100.000 70.7107 -70.7107 1 0 + + +-200.000 100.000 0.00000 1 0 +-100.000 100.000 0.00000 1 0 +-100.000 70.7107 70.7107 1 0 +-200.000 70.7107 70.7107 1 0 +-200.000 100.000 0.00000 1 0 + + +-100.000 100.000 0.00000 1 0 +0.00000 100.000 0.00000 1 0 +0.00000 70.7107 70.7107 1 0 +-100.000 70.7107 70.7107 1 0 +-100.000 100.000 0.00000 1 0 + + +-200.000 70.7107 -70.7107 1 1 +-200.000 100.000 0.00000 1 1 +-200.000 53.6612 0.00000 1 1 +-200.000 50.0000 -50.0000 1 1 +-200.000 70.7107 -70.7107 1 1 + + +-200.000 100.000 0.00000 1 1 +-200.000 70.7107 70.7107 1 1 +-200.000 50.0000 50.0000 1 1 +-200.000 53.6612 0.00000 1 1 +-200.000 100.000 0.00000 1 1 + + +-200.000 50.0000 -50.0000 1 1 +-200.000 53.6612 0.00000 1 1 +-200.000 29.2893 0.00000 1 1 +-200.000 29.2893 -29.2893 1 1 +-200.000 50.0000 -50.0000 1 1 + + +-200.000 53.6612 0.00000 1 1 +-200.000 50.0000 50.0000 1 1 +-200.000 29.2893 29.2893 1 1 +-200.000 29.2893 0.00000 1 1 +-200.000 53.6612 0.00000 1 1 + + +-200.000 29.2893 -29.2893 1 1 +-200.000 29.2893 0.00000 1 1 +-200.000 0.00000 0.00000 1 1 +-200.000 0.00000 -29.2893 1 1 +-200.000 29.2893 -29.2893 1 1 + + +-200.000 29.2893 0.00000 1 1 +-200.000 29.2893 29.2893 1 1 +-200.000 0.00000 29.2893 1 1 +-200.000 0.00000 0.00000 1 1 +-200.000 29.2893 0.00000 1 1 + + +-200.000 0.00000 -29.2893 1 1 +-200.000 0.00000 0.00000 1 1 +-200.000 -29.2893 0.00000 1 1 +-200.000 -29.2893 -29.2893 1 1 +-200.000 0.00000 -29.2893 1 1 + + +-200.000 0.00000 0.00000 1 1 +-200.000 0.00000 29.2893 1 1 +-200.000 -29.2893 29.2893 1 1 +-200.000 -29.2893 0.00000 1 1 +-200.000 0.00000 0.00000 1 1 + + +-200.000 -70.7107 -70.7107 1 1 +-200.000 -50.0000 -50.0000 1 1 +-200.000 -53.6612 0.00000 1 1 +-200.000 -100.000 0.00000 1 1 +-200.000 -70.7107 -70.7107 1 1 + + +-200.000 -50.0000 -50.0000 1 1 +-200.000 -29.2893 -29.2893 1 1 +-200.000 -29.2893 0.00000 1 1 +-200.000 -53.6612 0.00000 1 1 +-200.000 -50.0000 -50.0000 1 1 + + +-200.000 -100.000 0.00000 1 1 +-200.000 -53.6612 0.00000 1 1 +-200.000 -50.0000 50.0000 1 1 +-200.000 -70.7107 70.7107 1 1 +-200.000 -100.000 0.00000 1 1 + + +-200.000 -53.6612 0.00000 1 1 +-200.000 -29.2893 0.00000 1 1 +-200.000 -29.2893 29.2893 1 1 +-200.000 -50.0000 50.0000 1 1 +-200.000 -53.6612 0.00000 1 1 + + +-200.000 -70.7107 -70.7107 1 0 +-200.000 -100.000 0.00000 1 0 +-100.000 -100.000 0.00000 1 0 +-100.000 -70.7107 -70.7107 1 0 +-200.000 -70.7107 -70.7107 1 0 + + +-200.000 -100.000 0.00000 1 0 +-200.000 -70.7107 70.7107 1 0 +-100.000 -70.7107 70.7107 1 0 +-100.000 -100.000 0.00000 1 0 +-200.000 -100.000 0.00000 1 0 + + +-100.000 -70.7107 -70.7107 1 0 +-100.000 -100.000 0.00000 1 0 +0.00000 -100.000 0.00000 1 0 +0.00000 -70.7107 -70.7107 1 0 +-100.000 -70.7107 -70.7107 1 0 + + +-100.000 -100.000 0.00000 1 0 +-100.000 -70.7107 70.7107 1 0 +0.00000 -70.7107 70.7107 1 0 +0.00000 -100.000 0.00000 1 0 +-100.000 -100.000 0.00000 1 0 + + +-200.000 70.7107 70.7107 1 0 +-100.000 70.7107 70.7107 1 0 +-100.000 0.00000 100.000 1 0 +-200.000 0.00000 100.000 1 0 +-200.000 70.7107 70.7107 1 0 + + +-100.000 70.7107 70.7107 1 0 +0.00000 70.7107 70.7107 1 0 +0.00000 0.00000 100.000 1 0 +-100.000 0.00000 100.000 1 0 +-100.000 70.7107 70.7107 1 0 + + +-200.000 0.00000 100.000 1 0 +-100.000 0.00000 100.000 1 0 +-100.000 -70.7107 70.7107 1 0 +-200.000 -70.7107 70.7107 1 0 +-200.000 0.00000 100.000 1 0 + + +-100.000 0.00000 100.000 1 0 +0.00000 0.00000 100.000 1 0 +0.00000 -70.7107 70.7107 1 0 +-100.000 -70.7107 70.7107 1 0 +-100.000 0.00000 100.000 1 0 + + +-200.000 70.7107 70.7107 1 1 +-200.000 0.00000 100.000 1 1 +-200.000 0.00000 53.6612 1 1 +-200.000 50.0000 50.0000 1 1 +-200.000 70.7107 70.7107 1 1 + + +-200.000 0.00000 100.000 1 1 +-200.000 -70.7107 70.7107 1 1 +-200.000 -50.0000 50.0000 1 1 +-200.000 0.00000 53.6612 1 1 +-200.000 0.00000 100.000 1 1 + + +-200.000 50.0000 50.0000 1 1 +-200.000 0.00000 53.6612 1 1 +-200.000 0.00000 29.2893 1 1 +-200.000 29.2893 29.2893 1 1 +-200.000 50.0000 50.0000 1 1 + + +-200.000 0.00000 53.6612 1 1 +-200.000 -50.0000 50.0000 1 1 +-200.000 -29.2893 29.2893 1 1 +-200.000 0.00000 29.2893 1 1 +-200.000 0.00000 53.6612 1 1 + + +200.000 70.7107 -70.7107 1 2 +200.000 0.00000 -100.000 1 2 +200.000 0.00000 -53.6612 1 2 +200.000 50.0000 -50.0000 1 2 +200.000 70.7107 -70.7107 1 2 + + +200.000 0.00000 -100.000 1 2 +200.000 -70.7107 -70.7107 1 2 +200.000 -50.0000 -50.0000 1 2 +200.000 0.00000 -53.6612 1 2 +200.000 0.00000 -100.000 1 2 + + +200.000 50.0000 -50.0000 1 2 +200.000 0.00000 -53.6612 1 2 +200.000 0.00000 -29.2893 1 2 +200.000 29.2893 -29.2893 1 2 +200.000 50.0000 -50.0000 1 2 + + +200.000 0.00000 -53.6612 1 2 +200.000 -50.0000 -50.0000 1 2 +200.000 -29.2893 -29.2893 1 2 +200.000 0.00000 -29.2893 1 2 +200.000 0.00000 -53.6612 1 2 + + +0.00000 70.7107 -70.7107 1 0 +0.00000 0.00000 -100.000 1 0 +100.000 0.00000 -100.000 1 0 +100.000 70.7107 -70.7107 1 0 +0.00000 70.7107 -70.7107 1 0 + + +0.00000 0.00000 -100.000 1 0 +0.00000 -70.7107 -70.7107 1 0 +100.000 -70.7107 -70.7107 1 0 +100.000 0.00000 -100.000 1 0 +0.00000 0.00000 -100.000 1 0 + + +100.000 70.7107 -70.7107 1 0 +100.000 0.00000 -100.000 1 0 +200.000 0.00000 -100.000 1 0 +200.000 70.7107 -70.7107 1 0 +100.000 70.7107 -70.7107 1 0 + + +100.000 0.00000 -100.000 1 0 +100.000 -70.7107 -70.7107 1 0 +200.000 -70.7107 -70.7107 1 0 +200.000 0.00000 -100.000 1 0 +100.000 0.00000 -100.000 1 0 + + +0.00000 70.7107 -70.7107 1 0 +100.000 70.7107 -70.7107 1 0 +100.000 100.000 0.00000 1 0 +0.00000 100.000 0.00000 1 0 +0.00000 70.7107 -70.7107 1 0 + + +100.000 70.7107 -70.7107 1 0 +200.000 70.7107 -70.7107 1 0 +200.000 100.000 0.00000 1 0 +100.000 100.000 0.00000 1 0 +100.000 70.7107 -70.7107 1 0 + + +0.00000 100.000 0.00000 1 0 +100.000 100.000 0.00000 1 0 +100.000 70.7107 70.7107 1 0 +0.00000 70.7107 70.7107 1 0 +0.00000 100.000 0.00000 1 0 + + +100.000 100.000 0.00000 1 0 +200.000 100.000 0.00000 1 0 +200.000 70.7107 70.7107 1 0 +100.000 70.7107 70.7107 1 0 +100.000 100.000 0.00000 1 0 + + +200.000 70.7107 -70.7107 1 2 +200.000 50.0000 -50.0000 1 2 +200.000 53.6612 0.00000 1 2 +200.000 100.000 0.00000 1 2 +200.000 70.7107 -70.7107 1 2 + + +200.000 50.0000 -50.0000 1 2 +200.000 29.2893 -29.2893 1 2 +200.000 29.2893 0.00000 1 2 +200.000 53.6612 0.00000 1 2 +200.000 50.0000 -50.0000 1 2 + + +200.000 100.000 0.00000 1 2 +200.000 53.6612 0.00000 1 2 +200.000 50.0000 50.0000 1 2 +200.000 70.7107 70.7107 1 2 +200.000 100.000 0.00000 1 2 + + +200.000 53.6612 0.00000 1 2 +200.000 29.2893 0.00000 1 2 +200.000 29.2893 29.2893 1 2 +200.000 50.0000 50.0000 1 2 +200.000 53.6612 0.00000 1 2 + + +200.000 29.2893 -29.2893 1 2 +200.000 0.00000 -29.2893 1 2 +200.000 0.00000 0.00000 1 2 +200.000 29.2893 0.00000 1 2 +200.000 29.2893 -29.2893 1 2 + + +200.000 0.00000 -29.2893 1 2 +200.000 -29.2893 -29.2893 1 2 +200.000 -29.2893 0.00000 1 2 +200.000 0.00000 0.00000 1 2 +200.000 0.00000 -29.2893 1 2 + + +200.000 29.2893 0.00000 1 2 +200.000 0.00000 0.00000 1 2 +200.000 0.00000 29.2893 1 2 +200.000 29.2893 29.2893 1 2 +200.000 29.2893 0.00000 1 2 + + +200.000 0.00000 0.00000 1 2 +200.000 -29.2893 0.00000 1 2 +200.000 -29.2893 29.2893 1 2 +200.000 0.00000 29.2893 1 2 +200.000 0.00000 0.00000 1 2 + + +200.000 -70.7107 -70.7107 1 2 +200.000 -100.000 0.00000 1 2 +200.000 -53.6612 0.00000 1 2 +200.000 -50.0000 -50.0000 1 2 +200.000 -70.7107 -70.7107 1 2 + + +200.000 -100.000 0.00000 1 2 +200.000 -70.7107 70.7107 1 2 +200.000 -50.0000 50.0000 1 2 +200.000 -53.6612 0.00000 1 2 +200.000 -100.000 0.00000 1 2 + + +200.000 -50.0000 -50.0000 1 2 +200.000 -53.6612 0.00000 1 2 +200.000 -29.2893 0.00000 1 2 +200.000 -29.2893 -29.2893 1 2 +200.000 -50.0000 -50.0000 1 2 + + +200.000 -53.6612 0.00000 1 2 +200.000 -50.0000 50.0000 1 2 +200.000 -29.2893 29.2893 1 2 +200.000 -29.2893 0.00000 1 2 +200.000 -53.6612 0.00000 1 2 + + +0.00000 -70.7107 -70.7107 1 0 +0.00000 -100.000 0.00000 1 0 +100.000 -100.000 0.00000 1 0 +100.000 -70.7107 -70.7107 1 0 +0.00000 -70.7107 -70.7107 1 0 + + +0.00000 -100.000 0.00000 1 0 +0.00000 -70.7107 70.7107 1 0 +100.000 -70.7107 70.7107 1 0 +100.000 -100.000 0.00000 1 0 +0.00000 -100.000 0.00000 1 0 + + +100.000 -70.7107 -70.7107 1 0 +100.000 -100.000 0.00000 1 0 +200.000 -100.000 0.00000 1 0 +200.000 -70.7107 -70.7107 1 0 +100.000 -70.7107 -70.7107 1 0 + + +100.000 -100.000 0.00000 1 0 +100.000 -70.7107 70.7107 1 0 +200.000 -70.7107 70.7107 1 0 +200.000 -100.000 0.00000 1 0 +100.000 -100.000 0.00000 1 0 + + +0.00000 70.7107 70.7107 1 0 +100.000 70.7107 70.7107 1 0 +100.000 0.00000 100.000 1 0 +0.00000 0.00000 100.000 1 0 +0.00000 70.7107 70.7107 1 0 + + +100.000 70.7107 70.7107 1 0 +200.000 70.7107 70.7107 1 0 +200.000 0.00000 100.000 1 0 +100.000 0.00000 100.000 1 0 +100.000 70.7107 70.7107 1 0 + + +0.00000 0.00000 100.000 1 0 +100.000 0.00000 100.000 1 0 +100.000 -70.7107 70.7107 1 0 +0.00000 -70.7107 70.7107 1 0 +0.00000 0.00000 100.000 1 0 + + +100.000 0.00000 100.000 1 0 +200.000 0.00000 100.000 1 0 +200.000 -70.7107 70.7107 1 0 +100.000 -70.7107 70.7107 1 0 +100.000 0.00000 100.000 1 0 + + +200.000 70.7107 70.7107 1 2 +200.000 50.0000 50.0000 1 2 +200.000 0.00000 53.6612 1 2 +200.000 0.00000 100.000 1 2 +200.000 70.7107 70.7107 1 2 + + +200.000 50.0000 50.0000 1 2 +200.000 29.2893 29.2893 1 2 +200.000 0.00000 29.2893 1 2 +200.000 0.00000 53.6612 1 2 +200.000 50.0000 50.0000 1 2 + + +200.000 0.00000 100.000 1 2 +200.000 0.00000 53.6612 1 2 +200.000 -50.0000 50.0000 1 2 +200.000 -70.7107 70.7107 1 2 +200.000 0.00000 100.000 1 2 + + +200.000 0.00000 53.6612 1 2 +200.000 0.00000 29.2893 1 2 +200.000 -29.2893 29.2893 1 2 +200.000 -50.0000 50.0000 1 2 +200.000 0.00000 53.6612 1 2 + + +DEAL::74 +DEAL::72 -- 2.39.5