]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #42665: MeshIO: GMSH and ANSYS (II)
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Fri, 2 Aug 2024 08:28:13 +0000 (10:28 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Fri, 2 Aug 2024 08:28:13 +0000 (10:28 +0200)
products/meshio.pyconf
products/patches/meshio-5.3.5.p01.gmsh_ansys.patch [new file with mode: 0644]

index 390a75d411b520fb30637d8814c0c3b4d95503a5..6d87618fa2b2a2e95a36a8555860c536d1498b28 100644 (file)
@@ -49,6 +49,7 @@ version_5_3_5_win :
 {
    compil_script: "meshio-5.3.5.bat"
    archive_info : {archive_name : "meshio-5.3.5.tar.gz"}
+   patches : ['meshio-5.3.5.p01.gmsh_ansys.patch']
    properties :
    {
      incremental : "yes"
diff --git a/products/patches/meshio-5.3.5.p01.gmsh_ansys.patch b/products/patches/meshio-5.3.5.p01.gmsh_ansys.patch
new file mode 100644 (file)
index 0000000..a0d8e16
--- /dev/null
@@ -0,0 +1,25 @@
+--- meshio-5.3.5_ref/src/meshio/gmsh/main.py   2023-06-26 21:18:18.000000000 +0200
++++ meshio-5.3.5_dev/src/meshio/gmsh/main.py   2024-08-02 10:20:16.667483402 +0200
+@@ -108,6 +108,6 @@
+     read,
+     {
+         "gmsh22": lambda f, m, **kwargs: write(f, m, "2.2", **kwargs),
+-        "gmsh": lambda f, m, **kwargs: write(f, m, "4.1", **kwargs),
++        "gmsh": lambda f, m, **kwargs: write(f, m, "4.0", **kwargs),
+     },
+ )
+--- meshio-5.3.5_ref/src/meshio/ansys/_ansys.py        2024-01-31 16:09:01.000000000 +0100
++++ meshio-5.3.5_dev/src/meshio/ansys/_ansys.py        2024-08-02 10:20:57.619917526 +0200
+@@ -446,9 +446,10 @@
+                 ansys_cell_type = meshio_to_ansys_type[cell_type]
+             except KeyError:
+                 legal_keys = ", ".join(meshio_to_ansys_type.keys())
+-                raise KeyError(
+-                    f"Illegal ANSYS cell type '{cell_type}'. (legal: {legal_keys})"
++                warn(
++                    f"Illegal ANSYS cell type '{cell_type}'. (legal: {legal_keys}). Skipping cell!"
+                 )
++                continue
+             fh.write(
+                 f"({key} (1 {first_index:x} {last_index:x} 1 {ansys_cell_type})(\n".encode()
+             )