Smooth transition from Netgen 5 to Netgen 6

Current version of PrePoMax uses quite stable yet old Netgen version. New Netgen 6.* is essentially faster (due to parallel meshing) and has much better quad dominated meshing.

One of the problems with Netgen 6 is a need of mandatory installation of Python 3.7. This is inconvenient for the most users, because this version is a bit old. Due to this reason it is neither used by active Python programmers nor included into popular applications like Libreoffice (it uses more recent version). Installation of the full Python 3.7 only to run Netgen is not convenient.
According to my tests, this problem can be solved by downloading the smallest existing official Python distribution ([embeddable package (64-bit) of Python 3.7.14]
(Python Releases for Windows | and copy to Netgen 6 installation directory only the following files: python.exe, pythonw.exe, python3.dll, python37.dll, vcruntime140.dll (this list probably could be shortened). This increases size of Netgen 6 distribution insignificantly.
The biggest problem is tentative Netgen 6 instability compared to Netgen 5. I think the most safe solution is used by Mecway where both Netgen 5 and Netgen 6 are included. Thus, a user can use modern Netgen 6 and switch to trusted Netgen 5 in some cases. IMHO it it the best way for smooth and safe transition to the new Netgen version.

1 Like

I am amazed at these figures. Is this a volumetric hex mesh or a surface quad mesh?

Unfortunately only surface mesh in this particular case. I should edit my message for more clarity. In any case parallel usage of Netgen 5 and 6 could be promising.

Ok, I understand. I am looking into the possibility of using Gmesh instead of Netgen in the future. The reason is to add the possibility of creating solid hex meshes. In the tetrahedral cases that I tried, Gmesh worked much faster than Netgen 5, so maybe that is also a solution.


You are right, GMSH development is faster and this program is more promising than Netgen. I don’t know is it possible to make in PrePoMax interface to GMSH as simple as to Netgen.

No, I think it is not :slight_smile:

I think it’s a good idea to integrate gmsh into prepomax, in fact matej’s netgen meshing is amazingly functional, the tetrahedral meshing is very good, including the high curvature location mesh density is very well done. However, there are 2 problems I have found in using it.
The first is the slower meshing speed compared to gmsh
The second is that the shell meshing of more complex surfaces cannot be calculated after meshing (it is not clear whether this is due to the poor adaptability of the shell mesh of the Calculix solver, or due to the meshing problems of netgen).

In addition the gmsh algorithm is updated more quickly and also has a hexahedral meshing function (although it is difficult to use), so I think it is very good to provide gmsh meshing, but of course I suggest that the basic tetrahedral function can still be used with the current setup, just to say that the meshing tool can be gmsh or netgen, I have not yet ported the gmsh hexahedral meshing function to I don’t have a good way to transfer the gmsh hexahedral meshing function to prepomax.

Just small update. I have noted that in the current 9.9.0 version of Salome old Netgen 5.3.1 is used instead of Netgen 6.2.2101 which was used previously (in Salome 9.8.0). According to the Salome documentation the reason is:

Blockquote SALOME 9.9.0 reverts to usage of Netgen 5 since Netgen 6 shows degradation in mesh quality

Due to this reason, Netgen 6.2 probably should not be considered as Netgen 5 replacement now. Although, sometimes it allows to obtain a better mesh, it is in not as robust as previous version.

BTW, Salome 9.9.0 for the first time includes GMSH 4.8.4 plug-in adapted for Windows platform. Perhaps some of this code can be “reused” in PrePoMax.

I will have a look in this Gmesh plug-in. I hope I will be able to figure out how it works.

1 Like

also, it’s look better in handling STL files to generates both volume mesh (3D) and quad-dominated (2D) planes.

it seems only DLL’s required, not any files need to be copied. I do not take full Python installation, just place these one file to c:\windows\system32

Also, latest release of Salome V 9.11 (June 2023) still using NetGen 5.3.1 but i’m not really sure about decision since latest NetGen (GUI) seems better than previous versions.

But all above conditions are not problem, PrePoMax able to import native mesh format (vol) of NetGen.