getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] (no subject)


From: Tetsuo Koyama
Subject: [Getfem-commits] (no subject)
Date: Sat, 3 Oct 2020 20:46:04 -0400 (EDT)

branch: devel-tetsuo-xml-binary
commit a2b981069070b5e63411e81605eb839d9dcab961
Author: Tetsuo Koyama <tkoyama010@gmail.com>
AuthorDate: Sun Sep 6 02:07:55 2020 +0900

    Update for pass
---
 src/getfem_export.cc | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/getfem_export.cc b/src/getfem_export.cc
index f5865f8..c2ce7ee 100644
--- a/src/getfem_export.cc
+++ b/src/getfem_export.cc
@@ -567,29 +567,30 @@ namespace getfem
       unsigned char bytes[sizeof(int)];
     } uint;
     /* Points */
-    std::vector<unsigned char> v;
+    clear_vals();
     uint.value = sizeof(float)*6;
     for (size_type i=0; i < sizeof(int); i++)
-      v.push_back(uint.bytes[i]);
+      vals.push_back(uint.bytes[i]);
     ufloat.value = 0.0;
     for (size_type i=0; i < sizeof(float); i++)
-      v.push_back(ufloat.bytes[i]);
+      vals.push_back(ufloat.bytes[i]);
     ufloat.value = 0.0;
     for (size_type i=0; i < sizeof(float); i++)
-      v.push_back(ufloat.bytes[i]);
+      vals.push_back(ufloat.bytes[i]);
     ufloat.value = 0.0;
     for (size_type i=0; i < sizeof(float); i++)
-      v.push_back(ufloat.bytes[i]);
+      vals.push_back(ufloat.bytes[i]);
     ufloat.value = 1.0;
     for (size_type i=0; i < sizeof(float); i++)
-      v.push_back(ufloat.bytes[i]);
+      vals.push_back(ufloat.bytes[i]);
     ufloat.value = 0.0;
     for (size_type i=0; i < sizeof(float); i++)
-      v.push_back(ufloat.bytes[i]);
+      vals.push_back(ufloat.bytes[i]);
     ufloat.value = 0.0;
     for (size_type i=0; i < sizeof(float); i++)
-      v.push_back(ufloat.bytes[i]);
-    os << base64_encode(v);
+      vals.push_back(ufloat.bytes[i]);
+    os << base64_encode(vals);
+    clear_vals();
 
     size_type nb_cell_values = 0;
     for (dal::bv_visitor cv(pmf->convex_index()); !cv.finished(); ++cv)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]