From: Ralf 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-Tag: v8.0.0~14790 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15b7038c64af8b91d1fd500d675f9d547af717f1;p=dealii.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)