triangulation.begin_active()->set_refine_flag ();
triangulation.execute_coarsening_and_refinement ();
- Triangulation<3>::active_cell_iterator cell = triangulation.begin_active(),
- endc = triangulation.end();
+ Triangulation<3>::active_cell_iterator cell = triangulation.begin_active();
+ ++cell;
+ ++cell;
+
+ deallog << "Cell=" << cell << std::endl;
+ deallog << "Neighbor=" << cell->neighbor(3) << std::endl;
+
+ const Triangulation<3>::active_cell_iterator neighbor_child
+ = cell->neighbor_child_on_subface (3, 1);
+
+ deallog << "Neighbor_child(3,1)=" << neighbor_child << std::endl;
+ for (unsigned int i=0; i<6; ++i)
+ {
+ deallog << "Neighbor_child neighbors=";
+ if (neighbor_child->at_boundary(i))
+ deallog << "(at boundary)";
+ else
+ deallog << neighbor_child->neighbor(i);
+ deallog << std::endl;
+ }
+
+ deallog << "Neighbor_of_neighbor=" << cell->neighbor_of_neighbor(3) << std::endl;
+
+ deallog << "Face=" << cell->face(3) << std::endl;
+ for (unsigned int i=0; i<4; ++i)
+ deallog << "Face_child=" << cell->face(3)->child(i) << std::endl;
+
+ for (unsigned int i=0; i<4; ++i)
+ deallog << "Neighbor_face=" << cell->neighbor(3)->face(i) << std::endl;
+
+ for (unsigned int i=0; i<4; ++i)
+ deallog << "Neighbor_child_face=" << neighbor_child->face(i) << std::endl;
- for (; cell!=endc; ++cell)
- for (unsigned int face=0; face<GeometryInfo<3>::faces_per_cell; ++face)
- if (cell->face(face)->has_children())
- {
- // so now we've found a face of an
- // active cell that has
- // children. that means that there
- // are hanging nodes
- for (unsigned int c=0; c<GeometryInfo<3>::subfaces_per_face; ++c)
- {
- Triangulation<3>::active_cell_iterator neighbor_child
- = cell->neighbor_child_on_subface (face, c);
-
- // some sanity checks
- // -- particularly
- // useful if you start
- // to think about faces
- // with
- // face_orientation==false
- // and whether we
- // really really have
- // the right face...
- Assert (cell->face(face)->child(c) ==
- neighbor_child->face(cell->neighbor_of_neighbor(face)),
- ExcInternalError());
- }
- }
+ Assert (cell->face(3)->child(1) ==
+ neighbor_child->face(cell->neighbor_of_neighbor(3)),
+ ExcInternalError());
}