How is smesh (salome mesh) module maintained in FreeCAD

Having trouble installing or compiling FreeCAD? Get help here.
qingfeng.xia
Posts: 172
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford Uk
Contact:

Re: How is smesh (salome mesh) module maintained in FreeCAD

Postby qingfeng.xia » Sat Nov 09, 2019 12:12 pm

There is some breaking change in netget master, which I think I have fixed (netgen 6.2 and occt 7.3 all from ppa). On ubuntu 16.04, the compiler gcc 5 is not high enough to compile, I spent one hour to update g++ to make it works. I will give it anther test before I post.

> " why did you split out salome geometry module".
It is not used in FC, but in my other project, it leads me to think how to split out mesh module.
looo wrote:
Fri Nov 08, 2019 4:25 pm
qingfeng.xia wrote:
Fri Nov 08, 2019 4:01 pm
Fem module wiki said netgen has been disabled since moved to occt 7.x. so it is safe. netget must be patched, in ordered to work with smesh, I just wonder why netgen does not merge this patch, due to occt 7.0 upgrade. I will have another investigation on netgen error, to see if I can bring it back.
No netgen works with occt7.3 and this version of smesh:
https://github.com/LaughlinResearch/SMESH

Smesh and netgen are build for linux, osx and win via these recipes as conda-packages:
https://github.com/conda-forge/smesh-feedstock
https://github.com/conda-forge/netgen-feedstock

But I don't think repo you linked will work with netgen, as the structure has changed a lot.

btw.: why did you split out salome geometry module. I thought we are talkina about salome mesh module.
Ubuntu LTS 64bit in virtualbox, always work with latest FreeCAD git version
Mainly work on OpenFOAM + Fenics for CFD, FSI
looo
Posts: 2965
Joined: Mon Nov 11, 2013 5:29 pm

Re: How is smesh (salome mesh) module maintained in FreeCAD

Postby looo » Sat Nov 09, 2019 1:18 pm

qingfeng.xia wrote:
Sat Nov 09, 2019 12:12 pm
There is some breaking change in netget master, which I think I have fixed (netgen 6.2 and occt 7.3 all from ppa). On ubuntu 16.04, the compiler gcc 5 is not high enough to compile, I spent one hour to update g++ to make it works. I will give it anther test before I post.

Good to hear this. I gave up on latest netgen and settled at 6.2.1808. But this also needs some patches to work.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
qingfeng.xia
Posts: 172
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford Uk
Contact:

Re: How is smesh (salome mesh) module maintained in FreeCAD

Postby qingfeng.xia » Sat Nov 09, 2019 1:42 pm

looo wrote:
Sat Nov 09, 2019 1:18 pm
Good to hear this. I gave up on latest netgen and settled at 6.2.1808. But this also needs some patches to work.
netgen 6.2 has been developed for 3 years, lots of change. If you mean patch is needed to work (not only to compiling), then I'd better to give up.
I just use netgen in ubuntu (it may be released by freecad-daily ppa).

Windows compiling still failed, on pthread, I just wonder why pthread is needed. Shall I just turn it off if(WIN32)
Ubuntu LTS 64bit in virtualbox, always work with latest FreeCAD git version
Mainly work on OpenFOAM + Fenics for CFD, FSI
wmayer
Site Admin
Posts: 14999
Joined: Thu Feb 19, 2009 10:32 am

Re: How is smesh (salome mesh) module maintained in FreeCAD

Postby wmayer » Sun Nov 10, 2019 10:30 am

FYI: The last major upgrade of the Salome smesh code was done 3 years ago with git commit 666a3e5a68
Since then we had to make multiple changes to fix critical bugs and I think not all of them found their way into upstream. So, we should go through the list of changes and apply those we need.

https://github.com/FreeCAD/FreeCAD/comm ... alomesmesh
reox
Posts: 666
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: How is smesh (salome mesh) module maintained in FreeCAD

Postby reox » Sun Nov 10, 2019 5:57 pm

qingfeng.xia wrote:
Sat Nov 09, 2019 1:42 pm
Windows compiling still failed, on pthread, I just wonder why pthread is needed. Shall I just turn it off if(WIN32)
usually, the pthread error is not the error itself! look carefully at the cmake output and see what failed first.
vocx wrote:
Fri Nov 08, 2019 4:27 pm
The wiki information was true at the time it was written, but in this development version, 0.19, some users in fact enabled Netgen with FreeCAD and it seemed to work. compile with netgen for FEM meshing. Only recently there seems to be some problems with Netgen again.
uhhm - yes I can compile. But netgen is not useable - it segfaults on mesh creation.
I tried with the latest version of netgen, but the segfaults persist.
qingfeng.xia
Posts: 172
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford Uk
Contact:

Re: How is smesh (salome mesh) module maintained in FreeCAD

Postby qingfeng.xia » Mon Nov 11, 2019 10:53 am

I also got segment fault, if our research project will use netgen later, I may have time to investigate. for the time being, I may leave it as it is.
There is patch for netgen 6.2, not sure how good it is.

netgen license is GNU Lesser General Public License v2.1. it is compatible with FC, an easy way to maintain is to include netgen into FC somehow, git submodule, if user enable netgen. salome 9.3 still uses the patched netgen 5.5 version, packed with salome.

wmayer wrote:
Sun Nov 10, 2019 10:30 am
FYI: The last major upgrade of the Salome smesh code was done 3 years ago with git commit 666a3e5a68
Since then we had to make multiple changes to fix critical bugs and I think not all of them found their way into upstream. So, we should go through the list of changes and apply those we need.

https://github.com/FreeCAD/FreeCAD/comm ... alomesmesh
Ubuntu LTS 64bit in virtualbox, always work with latest FreeCAD git version
Mainly work on OpenFOAM + Fenics for CFD, FSI
reox
Posts: 666
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: How is smesh (salome mesh) module maintained in FreeCAD

Postby reox » Mon Nov 11, 2019 6:17 pm

qingfeng.xia wrote:
Mon Nov 11, 2019 10:53 am
an easy way to maintain is to include netgen into FC somehow, git submodule
It is the cheap and easy way, yes. But it just postpones the problems to a later time. Not being able to use the upstream version makes it very difficult to integrate patches and fixes.
In my opinion, freecad should not have any third party libraries integrated. But this is my very personal opinion and there are probably good reasons for some library not to do it.

According to the conda users, netgen works. I still haven't found out what they are doing differently, but there seems a combination of smesh, freecad and netgen plus some build settings and voodoo magic which works - and is a recent netgen version.
looo
Posts: 2965
Joined: Mon Nov 11, 2013 5:29 pm

Re: How is smesh (salome mesh) module maintained in FreeCAD

Postby looo » Tue Nov 19, 2019 2:52 pm

reox wrote:
Mon Nov 11, 2019 6:17 pm
qingfeng.xia wrote:
Mon Nov 11, 2019 10:53 am
an easy way to maintain is to include netgen into FC somehow, git submodule
It is the cheap and easy way, yes. But it just postpones the problems to a later time. Not being able to use the upstream version makes it very difficult to integrate patches and fixes.
In my opinion, freecad should not have any third party libraries integrated. But this is my very personal opinion and there are probably good reasons for some library not to do it.

According to the conda users, netgen works. I still haven't found out what they are doing differently, but there seems a combination of smesh, freecad and netgen plus some build settings and voodoo magic which works - and is a recent netgen version.

No there is definetly no magic involved. We simple wasted a lot of energy and time to get it done. There are some topics on all the problems we had to get to the point where netgen/smesh finally worked for all 3 platforms supported by conda.

But now there is occt7.4 and smesh problems begin again. Occt7.4 introduced a lot of diff for meshes. salome-smesh 9.3 is compatible with occt7.4 but the external and internal forks of salome mesh are not compatible...
So we can choose between using smesh8.3 and go through all the incompatibilities and fix them or use salome smesh 9.3 and apply all the patches to this version. Both tasks are unnecessary duplicate and difficult work.
On the other hand, this is a very important task to stay up to date with dependencies.
please help with my conda-packaging efforts: https://liberapay.com/looooo/