[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: |
Sun, 27 Dec 2020 19:33:21 -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 8bf16b3 Fix the expression of for loop
8bf16b3 is described below
commit 8bf16b32a6e65b07d39ebc3af0b1b1f448c20cca
Author: Tetsuo Koyama <tkoyama010@gmail.com>
AuthorDate: Mon Dec 28 09:31:47 2020 +0900
Fix the expression of for loop
---
src/getfem_export.cc | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/getfem_export.cc b/src/getfem_export.cc
index ab331de..d83950c 100644
--- a/src/getfem_export.cc
+++ b/src/getfem_export.cc
@@ -479,8 +479,7 @@ namespace getfem
for (size_type ic=0; ic < psl->nb_convex(); ++ic) {
const getfem::mesh_slicer::cs_simplexes_ct& s = psl->simplexes(ic);
for (const auto &val : s)
- for (size_type j=0; j < val.dim()+1; ++j)
- size += int(sizeof(int));
+ size += int((val.dim()+1)*sizeof(int));
}
write_val(size);
}
@@ -509,8 +508,7 @@ namespace getfem
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 (const auto &val : s)
- size += int(sizeof(int));
+ size += int(s.size()*sizeof(int));
}
write_val(size);
}
- [Getfem-commits] [getfem-commits] branch devel-tetsuo-fix-export-vtu updated: Fix the expression of for loop,
Tetsuo Koyama <=