branch: devel-tetsuo-xml-binary
commit 5f41641033dfc1f50611833c3bb926e1b81072b2
Author: Tetsuo Koyama <[email protected]>
AuthorDate: Sun Oct 4 00:11:37 2020 +0900
:sparkles: Fix TODO
---
src/getfem_export.cc | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/getfem_export.cc b/src/getfem_export.cc
index 00fe7a3..e9bf162 100644
--- a/src/getfem_export.cc
+++ b/src/getfem_export.cc
@@ -568,7 +568,6 @@ namespace getfem
os << "<Cells>\n";
os << "<DataArray type=\"Int64\" Name=\"connectivity\" ";
os << (ascii ? "format=\"ascii\">\n" : "format=\"binary\">\n");
- // TODO: genelize to multi cell
if (!vtk && !ascii) {
int size = 0;
for (dal::bv_visitor cv(pmf->convex_index()); !cv.finished(); ++cv) {
@@ -577,12 +576,13 @@ namespace getfem
}
write_val(size);
}
- write_val(int64_t(0));
- write_val(int64_t(1));
- write_separ();
- write_val(int64_t(1));
- write_val(int64_t(2));
- write_separ();
+ for (dal::bv_visitor cv(pmf->convex_index()); !cv.finished(); ++cv) {
+ const std::vector<unsigned> &dmap =
select_vtk_dof_mapping(pmf_mapping_type[cv]);
+ if (vtk) write_val(int(dmap.size()));
+ for (size_type i=0; i < dmap.size(); ++i)
+
write_val(int64_t(dofmap[pmf->ind_basic_dof_of_element(cv)[dmap[i]]]));
+ write_separ();
+ }
}
// TODO: genelize to multi cell