Why does FEM meshing doesn't generate volume elements in some cases

About the development of the FEM module/workbench.

Moderator: bernd

solofo
Posts: 5
Joined: Sat May 07, 2016 7:01 pm

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby solofo » Sat May 14, 2016 12:40 pm

The compilation lasted for around 30 minutes with an i7-3770 and 32GB memory and 'make -j8' (no speedy SSD).
ickby
Posts: 2914
Joined: Wed Oct 05, 2011 7:36 am

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby ickby » Sat May 14, 2016 2:24 pm

are you guys able to run all FEM tests successfully with the occ7 branch?
vejmarie
Posts: 542
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby vejmarie » Sat May 14, 2016 9:41 pm

ickby wrote:are you guys able to run all FEM tests successfully with the occ7 branch?
I think so, but to be sure, what is the way you use to run all the tests ?
User avatar
bernd
Posts: 8247
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby bernd » Sun May 15, 2016 8:58 am

vejmarie wrote:but to be sure, what is the way you use to run all the tests ?
on GUI
- start FreeCAD
- change workbench to Test framework
- click on icon "Self-test" --> a new widget pops up
- choose "TestApp.All" for all tests or "TestFem" for FEM related tests
- click on "Start"
ickby wrote:are you guys able to run all FEM tests successfully with the occ7 branch?
The branch of vejmarie? To be honest I'ven't tried the unit test on this. Lazy boy I am ... The one I have here was compiled on May 5th, just after the first release of the vagrant file.

Opps segmentation fault on TestFem for me !

OS: Debian GNU/Linux 8.4 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.7471 (Git)
Build type: Unknown
Branch: occt7
Hash: bf99bcee5c2029303af69e997d60f4b1a83ecf7c
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.0.0
vejmarie
Posts: 542
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby vejmarie » Sun May 15, 2016 9:11 am

This is what I am doing on my Mac and it seems to work. Let me check on Linux what might happen
ickby
Posts: 2914
Joined: Wed Oct 05, 2011 7:36 am

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby ickby » Sun May 15, 2016 9:25 am

Thanks bernd, that is the correct sequence. It segfaultet for me too. It is good to know that it does not originate in my porting. I currently dig into it and will solve it. Another issue is that the new smesh works a bit different and that we need to adopt for the new mesh structure in FEM workbench. But I will o pen a extra thread for that.
vejmarie
Posts: 542
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby vejmarie » Sun May 15, 2016 9:30 am

Ok, I think I have been able to reproduce the problem.
The PartMesher works for you ? (it is working for me, as well as Fem on MacOS)
You got a crash into VTK with getTuple function ?
If yes, there should be somewhere a Mesh = operation which is performed on a non properly initialized Mesh (probably the one who is getting the value), I had this issue within the Mesher code of FEM. It is crashing within my VM on this currently.
I have some time this afternoon to track this bug.
ickby
Posts: 2914
Joined: Wed Oct 05, 2011 7:36 am

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby ickby » Sun May 15, 2016 9:34 am

Yes the meshing works fine, however, than making an analysis with the mesh does not. This is a larger issue, as mentioned I create a new thread about new smesh behavior when I better understand it.

If you start working on it just give me a call on IRC, I'm also into bugfixing right now and it would be a shame if we duplicate work. A small chat should help aligning.
ickby
Posts: 2914
Joined: Wed Oct 05, 2011 7:36 am

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby ickby » Sun May 15, 2016 11:56 am

vejmarie wrote:Ok, I think I have been able to reproduce the problem.
The PartMesher works for you ? (it is working for me, as well as Fem on MacOS)
You got a crash into VTK with getTuple function ?
If yes, there should be somewhere a Mesh = operation which is performed on a non properly initialized Mesh (probably the one who is getting the value), I had this issue within the Mesher code of FEM. It is crashing within my VM on this currently.
I have some time this afternoon to track this bug.
Yes it is exactly the getTuple problem with wrongly initialized meshes. I've seen that you fighted this already in FemMeshShapeNetgenObject::execute . I see that it works with your fix, but honestly I do not understand why :) I tried nearly 2 hours to change the Fem::FemMesh initialisation to make the function work without your addition, but now way. IMHO this is a good testing point, we need to make this function work with normal mesh initialization, than all other places with the same problem should be fixed too. Porting your fix everywhere else is not an option, it is a hack at best. But well, I do not understand SMESH very well, it is a badly documented beast. I have no idea how to fix the Fem::Mesh initialisation...