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:10 -0400 (EDT)

branch: devel-tetsuo-xml-binary
commit 32148b52b20f1d9d2d83767350b0658aedb2172f
Author: Tetsuo Koyama <tkoyama010@gmail.com>
AuthorDate: Sun Oct 4 02:00:11 2020 +0900

    Add vtk for check
---
 interface/tests/python/check_export_vtu.py   |  16 +++++++++++-----
 interface/tests/python/check_mesh_ascii.vtk  |  16 ++++++++++++++++
 interface/tests/python/check_mesh_binary.vtk | Bin 0 -> 185 bytes
 3 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/interface/tests/python/check_export_vtu.py 
b/interface/tests/python/check_export_vtu.py
index 500b886..f6118ee 100644
--- a/interface/tests/python/check_export_vtu.py
+++ b/interface/tests/python/check_export_vtu.py
@@ -35,11 +35,17 @@ mesh = gf.Mesh("cartesian", [0.0, 1.0, 2.0])
 pts = mesh.pts()[0]
 
 
-filenames = ["check_mesh_ascii.vtu", "check_mesh_binary.vtu"]
-
-mesh.export_to_vtu(filenames[0], "ascii")
-
-mesh.export_to_vtu(filenames[1])
+filenames = [
+    "check_mesh_ascii.vtk",
+    "check_mesh_binary.vtk",
+    "check_mesh_ascii.vtu",
+    "check_mesh_binary.vtu",
+]
+
+mesh.export_to_vtk(filenames[0], "ascii")
+mesh.export_to_vtk(filenames[1])
+mesh.export_to_vtu(filenames[2], "ascii")
+mesh.export_to_vtu(filenames[3])
 
 for filename in filenames:
     print(filename)
diff --git a/interface/tests/python/check_mesh_ascii.vtk 
b/interface/tests/python/check_mesh_ascii.vtk
new file mode 100644
index 0000000..325fafb
--- /dev/null
+++ b/interface/tests/python/check_mesh_ascii.vtk
@@ -0,0 +1,16 @@
+# vtk DataFile Version 2.0
+Exported by GetFEM
+ASCII
+DATASET UNSTRUCTURED_GRID
+POINTS 3 float
+ 0 0 0
+ 1 0 0
+ 2 0 0
+
+CELLS 2 6
+ 2 0 1
+ 2 1 2
+
+CELL_TYPES 2
+ 3
+ 3
diff --git a/interface/tests/python/check_mesh_binary.vtk 
b/interface/tests/python/check_mesh_binary.vtk
new file mode 100644
index 0000000..a1a8644
Binary files /dev/null and b/interface/tests/python/check_mesh_binary.vtk differ



reply via email to

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