mesh distortion on reload (only quadratic elements)

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: mesh distortion on reload (only quadratic elements)

Post by bernd »

great !
sgrogan wrote:How to I create first order elements with gmesh in FreeCAD? It seems 2nd order elements are the default (which is good)
there should be a property in property editor of gmsh mesh object. I'm on the way and can not make a screen.
bernd
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: mesh distortion on reload (only quadratic elements)

Post by sgrogan »

bernd wrote:there should be a property in property editor of gmsh mesh object. I'm on the way and can not make a screen.
bernd
OK got it. I was only looking in the creation dialog.

Good sleuthing, the previous commit is good.
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10414 (Git)
Build type: Release
Branch: (detached from 19f8fd4)
Hash: 19f8fd4c10d3e19df1945fe33037fe98ed4d77cc
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
"fight the good fight"
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: mesh distortion on reload (only quadratic elements)

Post by sgrogan »

bernd wrote:I have a vague guess ... git commit 732bd85 It is a pity I can not test, I have never compiled FreeCAD on Windows. ...
I don't see why this would be win specific in FreeCAD? Should I try different gmesh versions?
"fight the good fight"
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: mesh distortion on reload (only quadratic elements)

Post by bernd »

bernd wrote:
sgrogan wrote:I have a vague guess ... git commit 732bd85 It is a pity I can not test, I have never compiled FreeCAD on Windows. ...
Good sleuthing, the previous commit is good.
does it mean git commit 732bd85 is the culprit ?

bernd

EDIT: I got in contact with vejmarie the author of this commit.
Last edited by bernd on Fri Mar 24, 2017 5:47 am, edited 1 time in total.
User avatar
vejmarie
Posts: 713
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: mesh distortion on reload (only quadratic elements)

Post by vejmarie »

Is this on 32 bits or 64 bits Windows that the issue appears ? That is strange it did work on MacOS and Linux ;). This reminds me why I am not using Windows (I am kidding guys don't worry)
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: mesh distortion on reload (only quadratic elements)

Post by sgrogan »

bernd wrote:does it mean git commit 732bd85 is the culprit ?
Probably git commit 732bd85 shows the problem. The previous git commit 19f8fd4 does not.
vejmarie wrote:Is this on 32 bits or 64 bits Windows that the issue appears ?
I only tested x64
vejmarie wrote:That is strange it did work on MacOS and Linux ;).
Agreed.
"fight the good fight"
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: mesh distortion on reload (only quadratic elements)

Post by UR_ »

win 32 bit build is ok.
box win x32.png
box win x32.png (31.21 KiB) Viewed 2055 times
written and reloaded with:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 32-bit
Version: 0.17.10634 (Git)
Build type: Release
Branch: master
Hash: abe15bbd83671b24f9fadc7a064d8baf5aa52ff3
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: mesh distortion on reload (only quadratic elements)

Post by UR_ »

User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: mesh distortion on reload (only quadratic elements)

Post by sgrogan »

UR_ wrote:if this is tender spot https://github.com/FreeCAD/FreeCAD/commit/732bd85
i think you should have a look at:
http://stackoverflow.com/questions/3845 ... it-windows
Good sleuthing here as well :)
"unsigned long long" seems to work.
tested win64, and kubuntu 14.04 x64.

I can't find "long long" in the FreeCAD sources though. With C++11 "long long" is OK?
"fight the good fight"
joha2
Posts: 303
Joined: Tue Oct 11, 2016 9:48 pm

Re: mesh distortion on reload (only quadratic elements)

Post by joha2 »

Maybe for this explicitly architecture/bit size dependent code one should use the best-practice solution in C++ (namely explicit usage of those 64bit types, like mentioned in the stackexchange discussion) and put a comment into the code. (I have the feeling that just changing the size to `unsigned long long' maybe not prevents such errors in the future.) Are there more such parts in the core code of FC?

Best wishes
Johannes
Post Reply