From a95c8b7df2edc285177333ec8fbccf3bf43f5cd2 Mon Sep 17 00:00:00 2001
From: Romain Boman <romain.boman@gmail.com>
Date: Wed, 8 Jun 2022 15:35:19 +0200
Subject: [PATCH] improve mech tests

---
 cxxfem/tests/beam2d.py | 4 +---
 cxxfem/tests/beam3d.py | 6 ++----
 fossils.spec           | 1 +
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/cxxfem/tests/beam2d.py b/cxxfem/tests/beam2d.py
index 1e75f33..384e198 100644
--- a/cxxfem/tests/beam2d.py
+++ b/cxxfem/tests/beam2d.py
@@ -2,7 +2,6 @@
 # -*- coding: utf-8 -*-
 
 import cxxfem as fem
-import os
 import gmsh
 
 
@@ -77,8 +76,6 @@ if __name__ == "__main__":
     build_square(0.0, 0.0, 10.0, 1.0, 80, 8, True, True)
     # build_square(0.0, 0.0, 10.0, 1.0, 2, 1, True, True)
 
-    # input()
-
     m = fem.Medium(pbl, "interior", 100.0, 0.3)
 
     d1 = fem.Dirichlet(pbl, "left", "X", 0.0)
@@ -95,6 +92,7 @@ if __name__ == "__main__":
     post = fem.Post(solver)
     post.build_views()
     post.show_views( [ "stress_tensor", "force_vector" ] )
+    post.write()
     post.deform(5)  
     post.probe("force_vector", 1)
     
diff --git a/cxxfem/tests/beam3d.py b/cxxfem/tests/beam3d.py
index 7e2b254..acdae06 100644
--- a/cxxfem/tests/beam3d.py
+++ b/cxxfem/tests/beam3d.py
@@ -52,8 +52,7 @@ if __name__ == "__main__":
         bcs.append(fem.Dirichlet(pbl, "Left", dof=d, val=0.0))
     
     # Vertical displacement
-    # bcs.append(fem.Dirichlet(pbl, "Right", dof='Z', val=-1.0)) # prescribed displ
-    
+    # bcs.append(fem.Dirichlet(pbl, "Right", dof='Z', val=-1.0)) # prescribed displ    
     # bcs.append(fem.Neumann(pbl, "Corner", 'Z', -0.1)) # concentrated force (seems OK)
     bcs.append(fem.Neumann(pbl, "Top", 'Z', -1e-2)) # distributed load
     bcs.append(fem.Neumann(pbl, "Top", 'Y', -5e-2)) # distributed load
@@ -67,10 +66,9 @@ if __name__ == "__main__":
     post.build_views()
     post.show_views(['force_vector','stress_tensor'])
     post.set_camera_3D()
-    # post.write()    
+    post.write()    
     post.deform()
 
     args = fem.parseargs()
     if not args.nogui:    
         post.view()
-
diff --git a/fossils.spec b/fossils.spec
index 695d498..eab11a0 100644
--- a/fossils.spec
+++ b/fossils.spec
@@ -21,6 +21,7 @@ a = Analysis(
         (r'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.5.281\windows\redist\intel64_win\compiler\libiomp5md.dll', '.')
     ],
     datas=[
+        (r'cxxfem\tests\parallelepiped.geo',r'models\others'),
         (r'cxxfem\tests\beam2d.py',r'models\others'),
         (r'cxxfem\tests\beam3d.py',r'models\others'),
         (r'models\dolicorhynchops\dolicorhynchops_10k.py',r'models\others\dolicorhynchops'),
-- 
GitLab