From: Wolfgang Bangerth Date: Mon, 30 Nov 2015 23:21:33 +0000 (-0600) Subject: Add test. X-Git-Tag: v8.4.0-rc2~162^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f5318c4f1e5e7820268763a0f4f30c861c884e9;p=dealii.git Add test. --- 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