From: hartmann Date: Thu, 23 Sep 2004 13:18:08 +0000 (+0000) Subject: Revert patch 1.66. Lines are given only once for following cases: no mapping given... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=215398fb0e444dd7fb6354bbc4700ded3cf1b753;p=dealii-svn.git Revert patch 1.66. Lines are given only once for following cases: no mapping given, no additional boundary face points required and for cells that have no boundary lines. Now the regression tests: constraints, grid_out produce the old results. git-svn-id: https://svn.dealii.org/trunk@9679 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/grid/grid_out.cc b/deal.II/deal.II/source/grid/grid_out.cc index 3e3136bd24..4dfa53779e 100644 --- a/deal.II/deal.II/source/grid/grid_out.cc +++ b/deal.II/deal.II/source/grid/grid_out.cc @@ -774,21 +774,72 @@ void GridOut::write_gnuplot (const Triangulation<3> &tria, out << "# cell " << cell << std::endl; if (mapping==0 || n_points==2 || !cell->has_boundary_lines()) - for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) - { - const Triangulation::face_iterator - face = cell->face(face_no); - - for (unsigned int v=0; v::vertices_per_face; ++v) - out << face->vertex(v) - << ' ' << cell->level() - << ' ' << static_cast(cell->material_id()) << std::endl; - out << face->vertex(0) - << ' ' << cell->level() - << ' ' << static_cast(cell->material_id()) << std::endl; - out << std::endl; - out << std::endl; - } + { + // front face + out << cell->vertex(0) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << cell->vertex(1) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << cell->vertex(2) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << cell->vertex(3) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << cell->vertex(0) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << std::endl; + // back face + out << cell->vertex(4) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << cell->vertex(5) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << cell->vertex(6) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << cell->vertex(7) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << cell->vertex(4) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << std::endl; + + // now for the four connecting lines + out << cell->vertex(0) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << cell->vertex(4) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << std::endl; + out << cell->vertex(1) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << cell->vertex(5) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << std::endl; + out << cell->vertex(2) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << cell->vertex(6) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << std::endl; + out << cell->vertex(3) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << cell->vertex(7) + << ' ' << cell->level() + << ' ' << static_cast(cell->material_id()) << std::endl + << std::endl; + } else { for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no)