From f7d657da9c82c98466f0fef1da30d2c4fb7b7991 Mon Sep 17 00:00:00 2001
From: Romain Boman <r.boman@uliege.be>
Date: Fri, 25 Feb 2022 13:52:29 +0100
Subject: [PATCH] use new gmsh interface by default

---
 models/Panthera_pardus/Panthera_pardus_RC_30.py | 2 ++
 models/boneload.py                              | 4 ++--
 models/bonemodel.py                             | 2 +-
 models/dolicorhynchops/dolicorhynchops_149k.py  | 2 ++
 4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/models/Panthera_pardus/Panthera_pardus_RC_30.py b/models/Panthera_pardus/Panthera_pardus_RC_30.py
index 94832dd..891dca0 100644
--- a/models/Panthera_pardus/Panthera_pardus_RC_30.py
+++ b/models/Panthera_pardus/Panthera_pardus_RC_30.py
@@ -60,6 +60,8 @@ def parms(d={}):
     p['Young'] = 18000.      # [MPa]
     p['Poisson'] = 0.3       # [-]
 
+    # p['use_gmshOld'] = True
+
     p.update(d)
     return p
 
diff --git a/models/boneload.py b/models/boneload.py
index 59b919b..e69afec 100644
--- a/models/boneload.py
+++ b/models/boneload.py
@@ -168,7 +168,7 @@ def identify_nodes_brutal(coords, all_no, all_coords, eps=1e-3):
     cpu_stop = time.perf_counter()
 
     # print stats
-    print(f'identify_nodes_brutal done in {cpu_stop-cpu_start} seconds')
+    print(f'identify_nodes_brutal done in {cpu_stop-cpu_start:.2f} seconds')
 
     if(len(notfound) != 0):
         print('WARNING: these nodes have not been identified:')
@@ -248,7 +248,7 @@ def identify_nodes_SaP(coords, all_no, all_coords, eps=1e-3):
     cpu_stop = time.perf_counter()
 
     # print stats
-    print(f'sweep and prune done in {cpu_stop-cpu_start} seconds')
+    print(f'sweep and prune done in {cpu_stop-cpu_start:.2f} seconds')
     print(f'({ntests} tests instead of {len(coords)*len(all_coords)})')
     print(f'{len(coords)} to be identified')
     print(f'{len(ntags)} successfully identified')
diff --git a/models/bonemodel.py b/models/bonemodel.py
index 120258b..1652645 100644
--- a/models/bonemodel.py
+++ b/models/bonemodel.py
@@ -69,7 +69,7 @@ def parms(d={}):
     p['dt0'] = 1.0           # [s] time step size
 
     # gmsh toolbox
-    p['use_gmshOld'] = True  # use old gmsh interface
+    p['use_gmshOld'] = False  # use old gmsh interface
 
     p.update(d)
     return p
diff --git a/models/dolicorhynchops/dolicorhynchops_149k.py b/models/dolicorhynchops/dolicorhynchops_149k.py
index 7ee9127..ee24fa7 100644
--- a/models/dolicorhynchops/dolicorhynchops_149k.py
+++ b/models/dolicorhynchops/dolicorhynchops_149k.py
@@ -36,6 +36,8 @@ def parms(d={}):
     p['Young'] = 20000.      # [MPa]
     p['Poisson'] = 0.3       # [-]
 
+    # p['use_gmshOld'] = True
+
     p.update(d)
     return p
 
-- 
GitLab