]> https://gitweb.dealii.org/ - dealii.git/commitdiff
DataOutBase<2,3>::write_tecplot_binary did not write the variable name z. This is...
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Wed, 28 Sep 2005 13:41:13 +0000 (13:41 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Wed, 28 Sep 2005 13:41:13 +0000 (13:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@11540 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/data_out_base.cc

index b3436421077ed19d4bfc66e7a8d043a9c91d4b04..f678447c3afe41979217e9929ba7e2e1c1cc8a25 100644 (file)
@@ -3444,7 +3444,7 @@ void DataOutBase::write_tecplot_binary (const std::vector<Patch<dim,spacedim> >
   
                                     // local variables only needed to write Tecplot
                                     // binary output files  
-  const unsigned int vars_per_node  = (dim+n_data_sets),  
+  const unsigned int vars_per_node  = (spacedim+n_data_sets),  
                      nodes_per_cell = GeometryInfo<dim>::vertices_per_cell;
   
 #ifdef DEAL_II_ANON_NAMESPACE_BOGUS_WARNING
@@ -3460,9 +3460,9 @@ void DataOutBase::write_tecplot_binary (const std::vector<Patch<dim,spacedim> >
   
   unsigned int string_size = 0;
 
-  if (dim==2)
+  if (spacedim==2)
     string_size = 3;
-  else if (dim==3)
+  else if (spacedim==3)
     string_size = 5;
   
 
@@ -3477,20 +3477,30 @@ void DataOutBase::write_tecplot_binary (const std::vector<Patch<dim,spacedim> >
   *tecVarNames = 0;
 
   
-  switch (dim)
+  switch (spacedim)
     {
       case 2:
-           cell_type = 1;
            tecVarNames  = strncat(tecVarNames, "x y", 3);
            break;
       case 3:
-           cell_type = 3;
            tecVarNames  = strncat(tecVarNames, "x y z", 5);
            break;
       default:
             Assert(false, ExcNotImplemented());
     };
 
+  switch (dim)
+    {
+      case 2:
+           cell_type = 1;
+           break;
+      case 3:
+           cell_type = 3;
+           break;
+      default:
+            Assert(false, ExcNotImplemented());            
+    }
+
   
   for (unsigned int data_set=0; data_set<n_data_sets; ++data_set)
     {
@@ -3614,7 +3624,7 @@ void DataOutBase::write_tecplot_binary (const std::vector<Patch<dim,spacedim> >
                                    // then write data.
    for (unsigned int data_set=0; data_set<n_data_sets; ++data_set)
      for (unsigned int entry=0; entry<data_vectors[data_set].size(); entry++)
-       tm.nd((dim+data_set),entry) = static_cast<float>(data_vectors[data_set][entry]);
+       tm.nd((spacedim+data_set),entry) = static_cast<float>(data_vectors[data_set][entry]);
 
 
 

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.