Salome HOME
Correction to mapping and adding HXT in 3D spns/24411 V9_8_0a1 V9_8_0a2
authorAfeef <afeef.badri@gmail.com>
Fri, 24 Sep 2021 09:30:35 +0000 (11:30 +0200)
committerAfeef <afeef.badri@gmail.com>
Fri, 24 Sep 2021 09:30:35 +0000 (11:30 +0200)
tests/gmsh_tetra_algorithms_for_box.py
tests/gmsh_triangulation_algorithms_for_square.py

index 6ca8995386b6c20b78aee4847b0759a698f1a8d5..2ffd5edd22e241558aa82e4fb4d35888cafa4d31 100644 (file)
@@ -3,10 +3,11 @@
 '''
 This file creates a box using GEOM then meshes the same using Gmsh's different algorithms
 
-1. Frontal Delaunay ----> Gmsh_Parameters.Set3DAlgo( 0 )
-2. Frontal Hex      ----> Gmsh_Parameters.Set3DAlgo( 1 )
-3. MMG3D            ----> Gmsh_Parameters.Set3DAlgo( 2 )
-4. R-Tree           ----> Gmsh_Parameters.Set3DAlgo( 3 )
+1. Delaunay               ----> Gmsh_Parameters.Set3DAlgo( 0 )
+2. Frontal Delaunay       ----> Gmsh_Parameters.Set3DAlgo( 1 )
+3. MMG3D                  ----> Gmsh_Parameters.Set3DAlgo( 2 )
+4. R-Tree                 ----> Gmsh_Parameters.Set3DAlgo( 3 )
+5. Parallel Delaunay(HXT) ----> Gmsh_Parameters.Set3DAlgo( 4 )
 
 This file is solely for the propose of testing and we do overwrite the meshes.
 '''
@@ -49,9 +50,9 @@ try:
   Gmsh_Parameters.Set3DAlgo( 0 )
   isDone = Mesh_1.Compute()
   if not isDone:
-    errorMsg+= '\n ERROR: failed to mesh the box using Frontal Delaunay algorithm from Gmsh\n'
+    errorMsg+= '\n ERROR: failed to mesh the box using Delaunay algorithm from Gmsh\n'
   else:
-    okMsg+= '\n PASSED: Successfully meshed the box using Frontal Delaunay algorithm from Gmsh\n'
+    okMsg+= '\n PASSED: Successfully meshed the box using Delaunay algorithm from Gmsh\n'
 except:
       errorMsg+='\n ERROR: Exception raised in Mesh computation'
 
@@ -62,35 +63,49 @@ try:
   Gmsh_Parameters.Set3DAlgo( 1 )
   isDone = Mesh_1.Compute()
   if not isDone:
-    errorMsg+= '\n ERROR: failed to mesh the box using Frontal Hex algorithm from Gmsh\n'
+    errorMsg+= '\n ERROR: failed to mesh the box using Frontal Delaunay algorithm from Gmsh\n'
   else:
-    okMsg+= '\n PASSED: Successfully meshed the box using Frontal Hex algorithm from Gmsh\n'    
+    okMsg+= '\n PASSED: Successfully meshed the box using Frontal Delaunay algorithm from Gmsh\n'
 except:
       errorMsg+='\n ERROR: Exception raised in Mesh computation'
 
 #-------------------------------------
 # Test: MMG3D
-#-------------------------------------      
+#-------------------------------------
 try:
   Gmsh_Parameters.Set3DAlgo( 2 )
   isDone = Mesh_1.Compute()
   if not isDone:
     errorMsg+= '\n ERROR: failed to mesh the box using MMG3D algorithm from Gmsh\n'
   else:
-    okMsg+= '\n PASSED: Successfully meshed the box using MMG3D algorithm from Gmsh\n'    
+    okMsg+= '\n PASSED: Successfully meshed the box using MMG3D algorithm from Gmsh\n'
 except:
       errorMsg+='\n ERROR: Exception raised in Mesh computation'
       
 #-------------------------------------
 # Test: R-Tree Algorithm
-#-------------------------------------           
+#-------------------------------------
 try:
   Gmsh_Parameters.Set3DAlgo( 3 )
   isDone = Mesh_1.Compute()
   if not isDone:
-    errorMsg+= '\n ERROR: failed to mesh the box using  R-Tree algorithm from Gmsh\n'
+    errorMsg+= '\n ERROR: failed to mesh the box using R-Tree algorithm from Gmsh\n'
+  else:
+    okMsg+= '\n PASSED: Successfully meshed the box using R-Tree algorithm from Gmsh\n'
+except:
+      errorMsg+='\n ERROR: Exception raised in Mesh computation'
+
+
+#-------------------------------------
+# Test: R-Tree Algorithm
+#-------------------------------------
+try:
+  Gmsh_Parameters.Set3DAlgo( 4 )
+  isDone = Mesh_1.Compute()
+  if not isDone:
+    errorMsg+= '\n ERROR: failed to mesh the box using Parallel Delaunay HXT algorithm from Gmsh\n'
   else:
-    okMsg+= '\n PASSED: Successfully meshed the box using R-Tree algorithm from Gmsh\n'    
+    okMsg+= '\n PASSED: Successfully meshed the box using Parallel Delaunay HXT algorithm from Gmsh\n'
 except:
       errorMsg+='\n ERROR: Exception raised in Mesh computation'
 
@@ -102,7 +117,7 @@ if okMsg!= '':
   print (okMsg)
       
 if errorMsg!= '':
-  raise RuntimeError (errorMsg + "\n Test is KO.")  
+  raise RuntimeError (errorMsg + "\n Test is KO.")
 
 if salome.sg.hasDesktop():
   salome.sg.updateObjBrowser()
index 8340c589e87b719c211f4eeff660f38f321d0e1c..452bde4426476e423bc655186f93365e45337384 100644 (file)
@@ -7,8 +7,8 @@ This file creates a square using GEOM then meshes the same using Gmsh's differen
 2. mesh Adapt             ----> Gmsh_Parameters.Set2DAlgo( 1 )
 3. Delaunay               ----> Gmsh_Parameters.Set2DAlgo( 2 )
 4. Frontal                ----> Gmsh_Parameters.Set2DAlgo( 3 )
-5. Delaunay For Quads     ----> Gmsh_Parameters.Set2DAlgo( 3 )
-6. Packing Parallelograms ----> Gmsh_Parameters.Set2DAlgo( 3 )
+5. Delaunay For Quads     ----> Gmsh_Parameters.Set2DAlgo( 4 )
+6. Packing Parallelograms ----> Gmsh_Parameters.Set2DAlgo( 5 )
 
 This file is solely for the propose of testing and we do overwrite the meshes.
 '''