OOFem

Plenty of changes (https://github.com/HarryvL/FreeCAD/tree/assess) compared to my forked master, but so far “no show” of OOFEM solver object in the Fem>Solve drop down menu :laughing:

I guess I still need to add a menu item here … https://github.com/HarryvL/FreeCAD/blob/f3f9ab96bff4de3bc2f340e958d82fac00105fca/src/Mod/Fem/Gui/Workbench.cpp#L121-L134

If so, why is there not also an entry for Z88, whereas it pops up in the Fem>Solve drop-down menu?

And I guess I missed one here:

https://github.com/HarryvL/FreeCAD/blob/f3f9ab96bff4de3bc2f340e958d82fac00105fca/src/Mod/Fem/femcommands/commands.py#L875-L880

A lot of guesswork :confused:

Once i get a tip of @bernd (he is kind of grep master) for searching terms in some files/ folders if some other exist

Thanks @ Jee-Bee

because it is here https://github.com/HarryvL/FreeCAD/blob/f3f9ab96bff4de3bc2f340e958d82fac00105fca/src/Mod/Fem/Gui/Workbench.cpp#L252

z88 is missing above because these lines define the tool bar and z88 has no tool bar icon only a menue

this is needed too. Without this workbench.cpp does not know the command which iss added to the menue and toolbar by workbench.cpp

Yes, sure, I think this are few lines of code only. I will have a look at this too when I find time to tackle the VTK and node numbering issue we talked about.

@HarryvL: this may bei helpful too in the regbard of adding new command to FreeCAD FEM 7d7a02e

3628 and some helpful links …

Thanks. I am gradually getting in the swing of things.

OK this all works now for a dummy file. So far so good. Next the task of writing FC data in OOFEM input format :smiley:

:smiley:

calculix cantilever is a good example and we will need it anyway as a official example for the new solver. see startwb, we have it for all three solvers in new solver frame work example.

There is another one you should keep in mind. All FEM python code is pep8 compatible. You can check easily by running the following command in your FreeCAD source tree.

find src/Mod/Fem/ -name "*\.py" | grep -v convert2TetGen.py | grep -v InitGui.py | grep -v TestFem.py | xargs -I [] flake8 --ignore=E501,E265,E266,E402 []

Thanks. Are there any good references about the architecture of FreeCAD? I mean the philosophy and implementation of C++ and Python class structure. It feel it would help speed up understanding of where and how methods and attributes are defined and perhaps more importantly when NOT to worry about this and just apply a method or data structure in a confident and predictable manner.

As far as I can tell the best way is to read the source and just do your thing, make a pull request (as small as possible) and the gurus will tell you if that’s OK or not. “git grep” + basic understanding how C++ works (headers, definitions, inheritance) is really a powerful tool. I know sometimes it would be better to read a doc i.e. “How to add a new command to a workbench”, but instead you can check git log for commit that added a new command and you’ll see all required changes in one place.
I also recommend using text editor that can run flake8/pep8 tests on file save - you get immediate feedback if your code formatting is OK.

Thanks !

there is no coding standard in FreeCAD. I know just one, which is used in any workbench. Use spaces and no tabs.

As I wrote, in FEM we use pep8 compliant code. Since I have done most Python development in the last two years I check this on any new code. Means if you would like to have your code merged into FreeCAD FEM it is highly possible it has to pass my eyes before it gets merged and I will for sure check if it is pep8 compliant. :mrgreen:

Thus runing flake8 from time to time while you are developing makes sence.

BTW: since I’m highly interested in this integrateion I will for sure try your new solver and have a look at the code before you are ready for a PR :ugeek:

bernd

:open_mouth: no pressure Harry :astonished: