[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] [getfem-commits] branch devel-tetsuo-fix-export-vtu upd
From: |
Tetsuo Koyama |
Subject: |
[Getfem-commits] [getfem-commits] branch devel-tetsuo-fix-export-vtu updated: Fix the expression of for loop |
Date: |
Wed, 30 Dec 2020 01:36:43 -0500 |
This is an automated email from the git hooks/post-receive script.
tkoyama010 pushed a commit to branch devel-tetsuo-fix-export-vtu
in repository getfem.
The following commit(s) were added to refs/heads/devel-tetsuo-fix-export-vtu by
this push:
new cced307 Fix the expression of for loop
cced307 is described below
commit cced3072198d2b05c5f1b0383b7f207dcd9ba6dd
Author: Tetsuo Koyama <tkoyama010@gmail.com>
AuthorDate: Wed Dec 30 15:30:03 2020 +0900
Fix the expression of for loop
---
src/getfem_export.cc | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/getfem_export.cc b/src/getfem_export.cc
index d83950c..04f0d0b 100644
--- a/src/getfem_export.cc
+++ b/src/getfem_export.cc
@@ -506,10 +506,8 @@ namespace getfem
os << (ascii ? "format=\"ascii\">\n" : "format=\"binary\">\n");
if (!ascii) {
int size = 0;
- for (size_type ic=0; ic < psl->nb_convex(); ++ic) {
- const getfem::mesh_slicer::cs_simplexes_ct& s = psl->simplexes(ic);
- size += int(s.size()*sizeof(int));
- }
+ for (size_type ic=0; ic < psl->nb_convex(); ++ic)
+ size += int(psl->simplexes(ic).size()*sizeof(int));
write_val(size);
}
}
@@ -534,11 +532,8 @@ namespace getfem
os << (ascii ? "format=\"ascii\">\n" : "format=\"binary\">\n");
if (!ascii) {
int size = 0;
- for (size_type ic=0; ic < psl->nb_convex(); ++ic) {
- const getfem::mesh_slicer::cs_simplexes_ct& s = psl->simplexes(ic);
- for (size_type i=0; i < s.size(); ++i)
- size += int(sizeof(int));
- }
+ for (size_type ic=0; ic < psl->nb_convex(); ++ic)
+ size += int(psl->simplexes(ic).size()*sizeof(int));
write_val(size);
}
for (size_type ic=0; ic < psl->nb_convex(); ++ic) {