]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Revert patch 1.66. Lines are given only once for following cases: no mapping given...
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 23 Sep 2004 13:18:08 +0000 (13:18 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 23 Sep 2004 13:18:08 +0000 (13:18 +0000)
git-svn-id: https://svn.dealii.org/trunk@9679 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/grid_out.cc

index 3e3136bd24b04b2e3956d8035b1c1c6ef788f0b8..4dfa53779e64d642ea697b252a7d4e1df63b8372 100644 (file)
@@ -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<GeometryInfo<dim>::faces_per_cell; ++face_no)
-         {
-           const Triangulation<dim>::face_iterator
-             face = cell->face(face_no);
-           
-           for (unsigned int v=0; v<GeometryInfo<dim>::vertices_per_face; ++v)
-             out << face->vertex(v)
-                 << ' ' << cell->level()
-                 << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl;
-           out << face->vertex(0)
-               << ' ' << cell->level()
-               << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl;            
-           out << std::endl;
-           out << std::endl;
-         }
+       {                   
+                                          // front face
+         out << cell->vertex(0)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << cell->vertex(1)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << cell->vertex(2)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << cell->vertex(3)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << cell->vertex(0)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << std::endl;
+                                          // back face
+         out << cell->vertex(4)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << cell->vertex(5)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << cell->vertex(6)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << cell->vertex(7)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << cell->vertex(4)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << std::endl;
+         
+                                          // now for the four connecting lines
+         out << cell->vertex(0)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << cell->vertex(4)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << std::endl;
+         out << cell->vertex(1)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << cell->vertex(5)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << std::endl;
+         out << cell->vertex(2)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << cell->vertex(6)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << std::endl;
+         out << cell->vertex(3)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << cell->vertex(7)
+             << ' ' << cell->level()
+             << ' ' << static_cast<unsigned int>(cell->material_id()) << std::endl
+             << std::endl;
+       }
       else
        {
          for (unsigned int face_no=0; face_no<GeometryInfo<dim>::faces_per_cell; ++face_no)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.