]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
fix .vtu output when we have no zlib
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Jan 2012 16:56:10 +0000 (16:56 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Jan 2012 16:56:10 +0000 (16:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@24873 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/source/base/data_out_base.cc

index 03c1b7825df1052281daf82729562807caed2952..5cb71117c5eea74821af004b1a694d5b4da0ea76 100644 (file)
@@ -74,6 +74,10 @@ enabled due to a missing include file in file
 
 <ol>
 
+<li> Fixed: writing vtu output when no ZLIB is found.
+<br>
+(Timo Heister, 2012/01/03)
+
 <li> Improved: <code>PETScWrappers::SolverXXX</code> class was
 restricted to using default solver options for the KSP only. It is now
 possible to override those by using PETSc command-line options
index a1f08292b8cf6117839d1a3871000a86061df69e..70290c412f682133568b0b7850b97a74d0e8c0af 100644 (file)
@@ -4877,8 +4877,17 @@ DataOutBase::write_vtu (const std::vector<Patch<dim,spacedim> > &patches,
       << ascii_or_binary << "\">\n";
 
   {
+                                    // uint8_t might be a typedef to unsigned
+                                    // char which is then not printed as
+                                    // ascii integers
+#ifdef HAVE_LIBZ
+    std::vector<uint8_t> cell_types (n_cells,
+                                    static_cast<uint8_t>(vtk_cell_type[dim]));
+#else
+    std::vector<unsigned int> cell_types (n_cells,
+                                    vtk_cell_type[dim]);
+#endif
                                     // this should compress well :-)
-    std::vector<uint8_t> cell_types (n_cells, vtk_cell_type[dim]);
     vtu_out << cell_types;
   }
   out << "\n";

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.