From a5d5638e4afb8339f11322bc1e28a50e4c1c0588 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 12 Sep 2020 13:46:55 +0200 Subject: [PATCH] allow uncompressed files --- python/damask/_vtk.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/damask/_vtk.py b/python/damask/_vtk.py index 7f3e64aef..d23bfd22e 100644 --- a/python/damask/_vtk.py +++ b/python/damask/_vtk.py @@ -168,7 +168,7 @@ class VTK: def _write(writer): """Wrapper for parallel writing.""" writer.Write() - def to_file(self,fname,parallel=True): + def to_file(self,fname,parallel=True,compress=True): """ Write to file. @@ -192,7 +192,10 @@ class VTK: if ext and ext != '.'+default_ext: raise ValueError(f'Given extension {ext} does not match default .{default_ext}') writer.SetFileName(str(Path(fname).with_suffix('.'+default_ext))) - writer.SetCompressorTypeToZLib() + if compress: + writer.SetCompressorTypeToZLib() + else: + writer.SetCompressorTypeToNone() writer.SetDataModeToBinary() writer.SetInputData(self.vtk_data)