]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
3D dx output patched
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 7 Dec 2001 14:45:35 +0000 (14:45 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 7 Dec 2001 14:45:35 +0000 (14:45 +0000)
git-svn-id: https://svn.dealii.org/trunk@5327 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/data_out_base.cc

index bf9242b8b1f0badb108641423568db01c65e0e89..38d70727c943b88c1d7a79fbcaa756764dd629b8 100644 (file)
@@ -659,14 +659,14 @@ void DataOutBase::write_dx (const typename std::vector<Patch<dim,spacedim> > &pa
                    for (unsigned int k=0; k<n_subdivisions; ++k)
                      {
 //TODO:[GK] Put in correct order
-                       out << first_vertex_of_patch+(i*(n_subdivisions+1)+j      )*(n_subdivisions+1)+k   << '\t'
+                       out << first_vertex_of_patch+((i  )*(n_subdivisions+1)+j  )*(n_subdivisions+1)+k   << '\t'
                            << first_vertex_of_patch+((i+1)*(n_subdivisions+1)+j  )*(n_subdivisions+1)+k   << '\t'
+                           << first_vertex_of_patch+((i  )*(n_subdivisions+1)+j+1)*(n_subdivisions+1)+k   << '\t'
                            << first_vertex_of_patch+((i+1)*(n_subdivisions+1)+j+1)*(n_subdivisions+1)+k   << '\t'
-                           << first_vertex_of_patch+(i*(n_subdivisions+1)+j+1    )*(n_subdivisions+1)+k   << '\t'
-                           << first_vertex_of_patch+(i*(n_subdivisions+1)+j      )*(n_subdivisions+1)+k+1 << '\t'
+                           << first_vertex_of_patch+((i  )*(n_subdivisions+1)+j  )*(n_subdivisions+1)+k+1 << '\t'
                            << first_vertex_of_patch+((i+1)*(n_subdivisions+1)+j  )*(n_subdivisions+1)+k+1 << '\t'
+                           << first_vertex_of_patch+((i  )*(n_subdivisions+1)+j+1)*(n_subdivisions+1)+k+1 << '\t'
                            << first_vertex_of_patch+((i+1)*(n_subdivisions+1)+j+1)*(n_subdivisions+1)+k+1 << '\t'
-                           << first_vertex_of_patch+(i*(n_subdivisions+1)+j+1    )*(n_subdivisions+1)+k+1 << '\t'
                            << std::endl;
                      };
                break;
@@ -700,7 +700,11 @@ void DataOutBase::write_dx (const typename std::vector<Patch<dim,spacedim> > &pa
       out << std::endl;
     };
 
-  out << "attribute \"element type\" string \"quads\"" << std::endl
+  out << "attribute \"element type\" string \"";
+  if (dim==1) out << "lines";
+  if (dim==2) out << "quads";
+  if (dim==3) out << "cubes";
+  out << "\"" << std::endl
       << "attribute \"ref\" string \"positions\"" << std::endl;
   
                                   /////////////////////////////

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.