Mesh groups efficiency measurements

About the development of the FEM module/workbench.

Moderator: bernd

ettaka
Posts: 5
Joined: Mon Sep 02, 2019 8:19 pm

Mesh groups efficiency measurements

Postby ettaka » Mon Sep 02, 2019 8:44 pm

Hello,

we are using FreeCAD with a library https://github.com/ElmerCSC/elmerfem/tr ... chFEMTools
for automated mesh creation. Our geometries can consist of many mesh groups (faces, solids). We have come to notice that FreeCAD slows down by o(n^2) when the number of mesh groups is increased.

In the image attached you can see test results using a test script (found in the FreeCADBatchFEMTools library under tests/cubemeshtest/cubemeshtest.py).

You can try this script yourself (library is tested today with daily). Write
$ python cubemeshtest.py -h
for help.

Basically the script creates a number of cubes (or spheres) in air, meshes everything and tries to find each boundary and solid (if -fb and -fs switches are used). Then it logs the time elapsed for each procedure.

I'm interested in improving this performance with some binary search or other method but I would like to get input from the community if there are someone who has worked on this.
Attachments
FreeCAD_cubemeshtest_point_search_cube_without_air50.png
FreeCAD cubemeshtest point search cube without air50
FreeCAD_cubemeshtest_point_search_cube_without_air50.png (53.28 KiB) Viewed 222 times
User avatar
Kunda1
Posts: 6220
Joined: Thu Jan 05, 2017 9:03 pm

Re: Mesh groups efficiency measurements

Postby Kunda1 » Mon Sep 02, 2019 9:10 pm

FreeCADBatchFEMTools.py is a set of tools for handling batch type preprocessing for Elmer Solver. The library was written by Trafotek Oy in collaboration with VTT Technical Reseach Centre of Finland Ltd supported by Business Finland Oy.
Nice, the Finns have arrived :D
Welcome!

Lets ping the relevant folks
bernd wrote:
m42kus wrote:
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
ettaka
Posts: 5
Joined: Mon Sep 02, 2019 8:19 pm

Re: Mesh groups efficiency measurements

Postby ettaka » Mon Sep 09, 2019 11:38 am

Kunda1 wrote:
Mon Sep 02, 2019 9:10 pm
Nice, the Finns have arrived :D
Welcome!
Thanks!
User avatar
Kunda1
Posts: 6220
Joined: Thu Jan 05, 2017 9:03 pm

Re: Mesh groups efficiency measurements

Postby Kunda1 » Mon Sep 09, 2019 1:44 pm

I guess @bernd has been busy. He usually responds.

@m42kus is currently wrapping up his 2nd Google Summer of Code
FEM Workbench Testing: https://forum.freecadweb.org/viewtopic.php?f=18&t=35428
The first GSOC was: Elmer Integration (GSoC) - https://forum.freecadweb.org/viewtopic.php?f=18&t=22576
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features