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: Tue, 26 May 2020 20:55:21 -0400 (EDT)

branch: devel-tetsuo-xml-slices
commit d156a478426b9ea6005e0eae1264ea9f47b689a9
Author: Tetsuo Koyama <address@hidden>
AuthorDate: Tue May 26 00:42:40 2020 +0000

    Add tests for exporting slices for VTU
---
 tests/helmholtz.cc | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/tests/helmholtz.cc b/tests/helmholtz.cc
index 449a206..6b4a8d1 100644
--- a/tests/helmholtz.cc
+++ b/tests/helmholtz.cc
@@ -232,12 +232,17 @@ int main(int argc, char *argv[]) {
   
   if (p.PARAM.int_value("VTK_EXPORT")) {
     cout << "export to " << p.datafilename + ".vtk" << "..\n";
-    getfem::vtk_export exp(p.datafilename + ".vtk",
-                          p.PARAM.int_value("VTK_EXPORT")==1);
+    getfem::vtk_export vtk_exp(p.datafilename + ".vtk",
+                          p.PARAM.int_value("VTK_EXPORT")==1, true);
+    cout << "export to " << p.datafilename + ".vtu" << "..\n";
+    getfem::vtu_export vtu_exp(p.datafilename + ".vtu");
     getfem::stored_mesh_slice sl(p.mesh, p.mesh.nb_convex() < 2000 ? 8 : 6);
-    exp.exporting(sl);
-    exp.write_point_data(p.mf_u, gmm::real_part(U), "helmholtz_rfield");
-    exp.write_point_data(p.mf_u, gmm::imag_part(U), "helmholtz_ifield");
+    vtk_exp.exporting(sl);
+    vtk_exp.write_point_data(p.mf_u, gmm::real_part(U), "helmholtz_rfield");
+    vtk_exp.write_point_data(p.mf_u, gmm::imag_part(U), "helmholtz_ifield");
+    vtu_exp.exporting(sl);
+    vtu_exp.write_point_data(p.mf_u, gmm::real_part(U), "helmholtz_rfield");
+    vtu_exp.write_point_data(p.mf_u, gmm::imag_part(U), "helmholtz_ifield");
     cout << "export done, you can view the data file with (for example)\n"
       "mayavi2 -d helmholtz.vtk -f WarpScalar -m Surface -m Outline"
       "\n";



reply via email to

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