netgen - risks and chances

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
django013
Posts: 106
Joined: Tue Jan 13, 2015 7:51 am

netgen - risks and chances

Post by django013 »

Hi,

on my way to build an fc-version with netgen support, I run into nealy every pitfall existing - and no matter what I tried, I did not succeed to build a fc with netgen support. Well, the build works, but problems arise at runtime.
(may be I have to dive into FCs netgen part :O )

So I crawled down the hell of netgens cmake definitions. I never used cmake before, so I needed to scratch cmakes manual ...
Puh - after having visited every cmake-file I guess, netgens author is of the kind: make things as complicated as possible :(

I don't know why, but it looks to me, as if the author don't want to support shared libraries on windows systems. So he changed most libraries to cmakes virtual library type OBJECT.
The virtual library type has the benefit, that it will never be installed, but need a lot of extra coding, lot of if(WIN32) and of cause, that travel involved a lot of inconsitencies.

Don't know, how FC uses netgen on windows? Doesn't FC need shared libs?

From my very little knowledge of cmake I would say, that goal could have been reached easier.
Anyway - its not my job to optimize build system of netgen, so I only tried to fix the inconsistencies.
Here are all cmake-files, no matter whether it got changed or not
netgen.build.tar.bz2
(8 KiB) Downloaded 66 times
@ulrich1a wrote, that netgen-gui does not work on debian. Don't know, whether that statement is limited to 4.9.13 ...
When I build netgen, I can start netgen-gui and load step-files.
I never got a meshing result - I always killed netgen after several hours ...
... so I can't state, that netgen would work.

So I started netgen with valgrind and loaded a step-file.
valgrind.txt
(13.73 KiB) Downloaded 72 times
The valgrind output shows, that netgen is not stable. May be my source-snapshot is ongoing work?

Anyway - would be nice, to hear, how FC uses netgen on windows systems.
May be it makes sense, to integrate changed cmake-definitions for netgen into fc?
OS: Linux Debian Jessie amd64 - FC: Git Master
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: netgen - risks and chances

Post by ulrich1a »

django013 wrote:@ulrich1a wrote, that netgen-gui does not work on debian. Don't know, whether that statement is limited to 4.9.13 ...
When I build netgen, I can start netgen-gui and load step-files.
I never got a meshing result - I always killed netgen after several hours ...
... so I can't state, that netgen would work.
This statement is valid vor 4.9.13.
I tried to get FreeCAD work with several versions of netgen. I came to the point, that FreeCAD currently only works with the 4.9.13-library. I did compile netgen 4.9.13 not with cmake but with the old autotools: configure

The gui for netgen 6.1 worked for me, but the library does not work with FreeCAD.
I had to compile both netgen 6.1 and netgen 4.9.13 to different installation places, in order to have both: FreeCAD with netgen support and a working netgen-standalone binary with gui-support.

In some cases, if you need a mesh for a complicated part, I would try to use the GMSH-macro with the "iso"-algorithm enabled. Thoses meshes do not follow the geometry as exact as the other do, but they are better suited for calculix.

Ulrich
django013
Posts: 106
Joined: Tue Jan 13, 2015 7:51 am

Re: netgen - risks and chances

Post by django013 »

This statement is valid vor 4.9.13.
I see
I came to the point, that FreeCAD currently only works with the 4.9.13-library.
I actually had a look at fcs netgen plugin - its from salome and looks quite a bit outdated :O
In some cases, if you need a mesh for a complicated part, I would try to use the GMSH-macro with the "iso"-algorithm enabled. Thoses meshes do not follow the geometry as exact as the other do, but they are better suited for calculix.
Thanks for that hint. I'll go for that.

Currently I'm trying to find a way for fc and netgen6.1 ...
I don't understand all related parts yet :(
OS: Linux Debian Jessie amd64 - FC: Git Master
Post Reply