From: Ralf Hartmann Date: Wed, 28 Sep 2005 13:41:13 +0000 (+0000) Subject: DataOutBase<2,3>::write_tecplot_binary did not write the variable name z. This is... X-Git-Tag: v8.0.0~13063 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cef9ef06af128d4d7fc062f721738dc776bf79a5;p=dealii.git DataOutBase<2,3>::write_tecplot_binary did not write the variable name z. This is now fixed. git-svn-id: https://svn.dealii.org/trunk@11540 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/source/data_out_base.cc b/deal.II/base/source/data_out_base.cc index b343642107..f678447c3a 100644 --- a/deal.II/base/source/data_out_base.cc +++ b/deal.II/base/source/data_out_base.cc @@ -3444,7 +3444,7 @@ void DataOutBase::write_tecplot_binary (const std::vector > // 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::vertices_per_cell; #ifdef DEAL_II_ANON_NAMESPACE_BOGUS_WARNING @@ -3460,9 +3460,9 @@ void DataOutBase::write_tecplot_binary (const std::vector > 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 > *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 > // then write data. for (unsigned int data_set=0; data_set(data_vectors[data_set][entry]); + tm.nd((spacedim+data_set),entry) = static_cast(data_vectors[data_set][entry]);