fcFEM - FEA from start to finish

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: fcFEM - FEA from start to finish

Post by Kunda1 »

bummer!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
heda
Veteran
Posts: 1348
Joined: Sat Dec 12, 2015 5:49 pm

Re: fcFEM - FEA from start to finish

Post by heda »

indeed a bummer.

btw, i suppose you compile everything from scratch

just tried on a linux box with an extracted appimage to do:

Code: Select all

$ pip install numba
$ freecadcmd
FreeCAD 0.19, Libs: 0.19R24276 (Git)
[FreeCAD Console mode <Use Ctrl-D (i.e. EOF) to exit.>]
>>> import time
>>> from numba import jit
>>> def test():
...   t0 = time.perf_counter()
...   @jit
...   def f(x, y):
...     return x + y
...   r = f(1, 2)
...   t = time.perf_counter() - t0
...   print('r = {} in {:.3f} sec'.format(r, t))
... 
>>> test()
r = 3 in 0.866 sec
>>> test()
r = 3 in 0.128 sec
>>> 
so it looks like that got numba working in fc with a simple pip install...
any chance you would reconsider? or is the intel-python the real dealbreaker for you?
User avatar
HarryvL
Veteran
Posts: 1285
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

Thanks. I will give that a try. Intel is not the deal breaker. Numba is. It accelerates fcFEM by a factor 100.

Anyway, I will continue to develop fcFEM and if full integration does not work we can always call it like we do Calculix.
User avatar
HarryvL
Veteran
Posts: 1285
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

heda wrote: Sun Jun 19, 2022 3:15 pm so it looks like that got numba working in fc with a simple pip install...
The issue I have is that I cannot fix the PySide/Shiboken dependency to get FC to build properly (I never had that issue in the old days). This means that the input panels don’t work properly and I cannot generate meshes. So as per the advice I switched to an app image and then hit the problem that you can’t import external dependencies (like Numba). So although numba is properly installed I cannot get the app image to work with it. Any suggestion on how to find an alternative is welcome.
JamesLiu
Posts: 26
Joined: Sat Apr 28, 2018 6:23 am

Re: fcFEM - FEA from start to finish

Post by JamesLiu »

It is possible to package the Numba into appimage as the following:

1. Extract the appimage, './FreeCAD_xxx.AppImage --appimage-extract', and then 'cd squashfs-root/'
2. Copy Numba into 'bin/` directory
3. Repackage with 'appimagetool-x86_64.AppImage squashfs-root'

Now you have an appimage with Numba integrated.
User avatar
HarryvL
Veteran
Posts: 1285
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

Cool. I will give this a try.

PS: would it then also be possible to use the dependencies from the app image to build FreeCAD from the repo?
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: fcFEM - FEA from start to finish

Post by Kunda1 »

HarryVL, we may be able to use Snap packages.
Thanks to @ppd we've been able to make a dedicated nightly toponaming build, and also create experimental builds for different PRs

What dependencies do you need?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
HarryvL
Veteran
Posts: 1285
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

Great. I have issues with user dialogues that according to @wmayer are due to PySide2 and it’s dependencies. They work well in the app image though, but I can’t fix the issue in my build. Apart from that I need Numba.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: fcFEM - FEA from start to finish

Post by Kunda1 »

@HarryvL what version of pyside is necessary ?

I'll open a request to add numba to the nightly 'edge' snap

Edit: https://github.com/FreeCAD/FreeCAD-snap/issues/27
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
HarryvL
Veteran
Posts: 1285
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

Kunda1 wrote: Mon Jun 20, 2022 11:59 am @HarryvL what version of pyside is necessary ?

I'll open a request to add numba to the nightly 'edge' snap

Edit: https://github.com/FreeCAD/FreeCAD-snap/issues/27
Thanks
Post Reply