[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] (no subject)
From: |
Andriy Andreykiv |
Subject: |
[Getfem-commits] (no subject) |
Date: |
Wed, 26 Jul 2017 08:52:47 -0400 (EDT) |
branch: fixing_binary_vtk_export
commit 4993fd92a4ff4bf8aef83b1ce760dfce5baad24c
Author: aa <address@hidden>
Date: Wed Jul 26 14:50:31 2017 +0200
fixing writing binary files in vtk_export
---
src/getfem_export.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/getfem_export.cc b/src/getfem_export.cc
index 18bfc73..14da099 100644
--- a/src/getfem_export.cc
+++ b/src/getfem_export.cc
@@ -63,7 +63,9 @@ namespace getfem
: os(os_), ascii(ascii_) { init(); }
vtk_export::vtk_export(const std::string& fname, bool ascii_)
- : os(real_os), ascii(ascii_), real_os(fname.c_str()) {
+ : os(real_os), ascii(ascii_),
+ real_os(fname.c_str(), !ascii ? std::ios_base::binary | std::ios_base::out
:
+ std::ios_base::out) {
GMM_ASSERT1(real_os, "impossible to write to vtk file '" << fname << "'");
init();
}