From: Afeef Date: Fri, 24 Sep 2021 09:30:35 +0000 (+0200) Subject: Correction to mapping and adding HXT in 3D X-Git-Tag: V9_8_0a1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c9bdb67733d66d6513538560b46ca18fbfd137a3;p=plugins%2Fgmshplugin.git Correction to mapping and adding HXT in 3D --- diff --git a/tests/gmsh_tetra_algorithms_for_box.py b/tests/gmsh_tetra_algorithms_for_box.py index 6ca8995..2ffd5ed 100644 --- a/tests/gmsh_tetra_algorithms_for_box.py +++ b/tests/gmsh_tetra_algorithms_for_box.py @@ -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() diff --git a/tests/gmsh_triangulation_algorithms_for_square.py b/tests/gmsh_triangulation_algorithms_for_square.py index 8340c58..452bde4 100644 --- a/tests/gmsh_triangulation_algorithms_for_square.py +++ b/tests/gmsh_triangulation_algorithms_for_square.py @@ -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. '''