(Martin Kronbichler, 2015/11/26)
</li>
+ <li> New: In 3d, GridGenerator::extract_boundary_mesh() now copies the
+ manifold ids of edges of the volume mesh to the manifold ids of the edges
+ of the extracted surface mesh.
+ <br>
+ (Wolfgang Bangerth, 2015/11/25)
+ </li>
+
+ <li> New: Triangulation::create_triangulation() now accepts subcell-data
+ objects that may include information about interior edges and faces, to
+ facilitate setting manifold indicators on interior edges and faces.
+ <br>
+ (Wolfgang Bangerth, 2015/11/25)
+ </li>
+
<li> Fixed: GridGenerator::extract_boundary_mesh() in 3d could generate
surface cells that did not uniformly had a right- or left-handed coordinate
system associated with them when viewed from one side of the surface. This
* a common number describing the boundary condition to hold on this part of
* the boundary. The triangulation creation function gives lines not in this
* list either the boundary indicator zero (if on the boundary) or
- * numbers::internal_face_boundary_id (if in the interior). Explicitly giving
- * a line the indicator numbers::internal_face_boundary_id will result in an
- * error, as well as giving an interior line a boundary indicator.
+ * numbers::internal_face_boundary_id (if in the interior).
+ *
+ * You will get an error if you try to set the boundary indicator of
+ * an interior edge or face, i.e., an edge or face that is not at the
+ * boundary of the mesh. However, one may sometimes want to set the
+ * manifold indicator to an interior object. In this case, set its
+ * boundary indicator to numbers::internal_face_boundary_id, to
+ * indicate that you understand that it is an interior object, but set
+ * its manifold id to the value you want.
*
* @ingroup grid
*/
std::vector< bool > touched (get_tria(volume_mesh).n_vertices(), false);
std::vector< CellData< boundary_dim > > cells;
- std::vector< Point<spacedim> > vertices;
+ SubCellData subcell_data;
+ std::vector< Point<spacedim> > vertices;
std::map<unsigned int,unsigned int> map_vert_index; //volume vertex indices to surf ones
if (i % 2 == 1)
std::swap (c_data.vertices[1], c_data.vertices[2]);
+ // in 3d, we also need to make sure we copy the manifold
+ // indicators from the edges of the volume mesh to the
+ // edges of the surface mesh
+ //
+ // one might think that we we can also prescribe
+ // boundary indicators for edges, but this is only
+ // possible for edges that aren't just on the boundary
+ // of the domain (all of the edges we consider are!) but
+ // that would actually end up at the boundary of the
+ // surface mesh. there is no easy way to check this, so
+ // we simply don't do it and instead set it to an
+ // invalid value that makes sure
+ // Triangulation::create_triangulation doesn't copy it
+ if (dim == 3)
+ for (unsigned int e=0; e<4; ++e)
+ {
+ // see if we already saw this edge from a
+ // neighboring face, either in this or the reverse
+ // orientation. if so, skip it.
+ {
+ bool edge_found = false;
+ for (unsigned int i=0; i<subcell_data.boundary_lines.size(); ++i)
+ if (((subcell_data.boundary_lines[i].vertices[0]
+ == map_vert_index[face->line(e)->vertex_index(0)])
+ &&
+ (subcell_data.boundary_lines[i].vertices[1]
+ == map_vert_index[face->line(e)->vertex_index(1)]))
+ ||
+ ((subcell_data.boundary_lines[i].vertices[0]
+ == map_vert_index[face->line(e)->vertex_index(1)])
+ &&
+ (subcell_data.boundary_lines[i].vertices[1]
+ == map_vert_index[face->line(e)->vertex_index(0)])))
+ {
+ edge_found = true;
+ break;
+ }
+ if (edge_found == true)
+ continue; // try next edge of current face
+ }
+
+ CellData<1> edge;
+ edge.vertices[0] = map_vert_index[face->line(e)->vertex_index(0)];
+ edge.vertices[1] = map_vert_index[face->line(e)->vertex_index(1)];
+ edge.boundary_id = numbers::internal_face_boundary_id;
+ edge.manifold_id = face->line(e)->manifold_id();
+
+ subcell_data.boundary_lines.push_back (edge);
+ }
+
+
cells.push_back(c_data);
mapping.push_back(face);
}
// create level 0 surface triangulation
Assert (cells.size() > 0, ExcMessage ("No boundary faces selected"));
const_cast<Triangulation<dim-1,spacedim>&>(get_tria(surface_mesh))
- .create_triangulation (vertices, cells, SubCellData());
+ .create_triangulation (vertices, cells, subcell_data);
// Make the actual mapping
for (typename Container<dim-1,spacedim>::active_cell_iterator
line->set_manifold_id(numbers::flat_manifold_id);
}
- // set boundary indicators where
- // given
+ // set boundary indicators where given
std::vector<CellData<1> >::const_iterator boundary_line
= subcelldata.boundary_lines.begin();
std::vector<CellData<1> >::const_iterator end_boundary_line
std::pair<int,int> line_vertices(std::make_pair(boundary_line->vertices[0],
boundary_line->vertices[1]));
if (needed_lines.find(line_vertices) != needed_lines.end())
- // line found in this
- // direction
+ // line found in this direction
line = needed_lines[line_vertices];
else
{
- // look whether it exists
- // in reverse direction
+ // look whether it exists in reverse direction
std::swap (line_vertices.first, line_vertices.second);
if (needed_lines.find(line_vertices) != needed_lines.end())
line = needed_lines[line_vertices];
line_vertices.second));
}
- // assert that we only set
- // boundary info once
+ // assert that we only set boundary info once
AssertThrow (! (line->boundary_id() != 0 &&
line->boundary_id() != numbers::internal_face_boundary_id),
ExcMultiplySetLineInfoOfLine(line_vertices.first,
line_vertices.second));
- // Assert that only exterior lines
- // are given a boundary indicator
- AssertThrow (! (line->boundary_id() == numbers::internal_face_boundary_id),
- ExcInteriorLineCantBeBoundary(line->vertex_index(0),
- line->vertex_index(1),
- boundary_line->boundary_id));
+ // Assert that only exterior lines are given a boundary
+ // indicator; however, it is possible that someone may
+ // want to give an interior line a manifold id (and thus
+ // lists this line in the subcell_data structure), and we
+ // need to allow that
+ if (boundary_line->boundary_id != numbers::internal_face_boundary_id)
+ {
+ AssertThrow (! (line->boundary_id() == numbers::internal_face_boundary_id),
+ ExcInteriorLineCantBeBoundary(line->vertex_index(0),
+ line->vertex_index(1),
+ boundary_line->boundary_id));
+ line->set_boundary_id (boundary_line->boundary_id);
+ }
- line->set_boundary_id (boundary_line->boundary_id);
line->set_manifold_id (boundary_line->manifold_id);
}
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// 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.
+//
+// ---------------------------------------------------------------------
+
+
+// We can not copy boundary ids from edges of the volume mesh to edges
+// of the surface mesh in 3d because the boundary edges of the volume
+// mesh are not necessarily boundary edges of the surface mesh.
+//
+// if the original mesh's geometry was only defined via the boundary
+// indicators, this leads to a surface mesh with a geometry
+// description of edges that is not likely what was desired. there is
+// little one can do about it with only boundary_ids, and without
+// resorting to manifold_ids. this testcase in essence just ensures
+// that we continue to get this "undesirable" behavior until someone
+// comes up with a better idea
+
+#include "../tests.h"
+
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/grid_out.h>
+#include <deal.II/grid/grid_tools.h>
+#include <deal.II/grid/tria_boundary_lib.h>
+
+
+
+void test()
+{
+ const int dim=3;
+
+ Triangulation<dim> triangulation;
+ GridGenerator::cylinder(triangulation, 100, 200);
+
+ static const CylinderBoundary<dim> outer_cylinder (100,0);
+ triangulation.set_boundary(0,outer_cylinder);
+
+ // now extract the surface mesh
+ Triangulation<dim-1,dim> triangulation_surface;
+
+ static const CylinderBoundary<dim-1,dim> surface_cyl(100,0);
+ triangulation_surface.set_boundary(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();
+}
--- /dev/null
+
+-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 70.7107 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 70.7107 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 70.7107 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 70.7107 0.00000 1 1
+-200.000 50.0000 0.00000 1 1
+-200.000 50.0000 -50.0000 1 1
+-200.000 70.7107 -70.7107 1 1
+
+
+-200.000 70.7107 0.00000 1 1
+-200.000 70.7107 70.7107 1 1
+-200.000 50.0000 50.0000 1 1
+-200.000 50.0000 0.00000 1 1
+-200.000 70.7107 0.00000 1 1
+
+
+-200.000 50.0000 -50.0000 1 1
+-200.000 50.0000 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 50.0000 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 50.0000 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 70.7107 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 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 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
+
+
+-200.000 70.7107 70.7107 1 1
+-200.000 0.00000 70.7107 1 1
+-200.000 0.00000 50.0000 1 1
+-200.000 50.0000 50.0000 1 1
+-200.000 70.7107 70.7107 1 1
+
+
+-200.000 0.00000 70.7107 1 1
+-200.000 -70.7107 70.7107 1 1
+-200.000 -50.0000 50.0000 1 1
+-200.000 0.00000 50.0000 1 1
+-200.000 0.00000 70.7107 1 1
+
+
+-200.000 50.0000 50.0000 1 1
+-200.000 0.00000 50.0000 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 50.0000 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 50.0000 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 70.7107 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 70.7107 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 50.0000 0.00000 1 2
+200.000 70.7107 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 50.0000 0.00000 1 2
+200.000 50.0000 -50.0000 1 2
+
+
+200.000 70.7107 0.00000 1 2
+200.000 50.0000 0.00000 1 2
+200.000 50.0000 50.0000 1 2
+200.000 70.7107 70.7107 1 2
+200.000 70.7107 0.00000 1 2
+
+
+200.000 50.0000 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 50.0000 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 70.7107 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 70.7107 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 50.0000 1 2
+200.000 0.00000 70.7107 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 50.0000 1 2
+200.000 50.0000 50.0000 1 2
+
+
+200.000 0.00000 70.7107 1 2
+200.000 0.00000 50.0000 1 2
+200.000 -50.0000 50.0000 1 2
+200.000 -70.7107 70.7107 1 2
+200.000 0.00000 70.7107 1 2
+
+
+200.000 0.00000 50.0000 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 50.0000 1 2
+
+
+DEAL::74
+DEAL::72
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// 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 _10, but this time try to use manifold ids that can be copied
+// from the volume to the surface mesh
+
+#include "../tests.h"
+
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/grid_out.h>
+#include <deal.II/grid/grid_tools.h>
+#include <deal.II/grid/tria_boundary_lib.h>
+
+
+
+void test()
+{
+ const int dim=3;
+
+ Triangulation<dim> triangulation;
+ GridGenerator::cylinder(triangulation, 100, 200);
+
+ // copy boundary indicators to manifold indicators for boundary
+ // faces. for boundary zero (the outer hull of the cylinder), we
+ // need to make sure that the adjacent edges are also all
+ // correct. for the other boundaries, don't bother with adjacent
+ // edges
+ for (Triangulation<dim>::active_cell_iterator cell=triangulation.begin_active();
+ cell != triangulation.end(); ++cell)
+ for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
+ if (cell->face(f)->at_boundary())
+ if (cell->face(f)->boundary_id() == 0)
+ cell->face(f)->set_all_manifold_ids(0);
+ else
+ cell->face(f)->set_manifold_id(cell->face(f)->boundary_id());
+
+ static const CylinderBoundary<dim> outer_cylinder (100,0);
+ triangulation.set_manifold(0,outer_cylinder);
+
+ // now extract the surface mesh
+ Triangulation<dim-1,dim> triangulation_surface;
+
+ static const CylinderBoundary<dim-1,dim> 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();
+}
--- /dev/null
+
+-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
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// 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 refine the volume mesh and not the surface mesh. this
+// should yield the same result
+
+#include "../tests.h"
+
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/grid_out.h>
+#include <deal.II/grid/grid_tools.h>
+#include <deal.II/grid/tria_boundary_lib.h>
+
+
+
+void test()
+{
+ const int dim=3;
+
+ Triangulation<dim> triangulation;
+ GridGenerator::cylinder(triangulation, 100, 200);
+
+ // copy boundary indicators to manifold indicators for boundary
+ // faces. for boundary zero (the outer hull of the cylinder), we
+ // need to make sure that the adjacent edges are also all
+ // correct. for the other boundaries, don't bother with adjacent
+ // edges
+ for (Triangulation<dim>::active_cell_iterator cell=triangulation.begin_active();
+ cell != triangulation.end(); ++cell)
+ for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
+ if (cell->face(f)->at_boundary())
+ if (cell->face(f)->boundary_id() == 0)
+ cell->face(f)->set_all_manifold_ids(0);
+ else
+ cell->face(f)->set_manifold_id(cell->face(f)->boundary_id());
+
+ static const CylinderBoundary<dim> outer_cylinder (100,0);
+ triangulation.set_manifold(0,outer_cylinder);
+
+ // refine the surface mesh to see the effect of boundary/manifold
+ // indicators
+ triangulation.refine_global (1);
+
+ // now extract the surface mesh
+ Triangulation<dim-1,dim> triangulation_surface;
+
+ static const CylinderBoundary<dim-1,dim> surface_cyl(100,0);
+ triangulation_surface.set_manifold(0,surface_cyl);
+
+ GridGenerator::extract_boundary_mesh(triangulation,triangulation_surface);
+
+ 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();
+}
--- /dev/null
+
+-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