Onboarding FEM Devs: Difference between revisions
m (→Adding New FEM Solvers: added more references) |
(change address bug tracker) |
||
(17 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
|||
<translate> |
|||
<!--T:1--> |
|||
{{TOCright}} |
{{TOCright}} |
||
== Description == |
== Description == <!--T:2--> |
||
<!--T:3--> |
|||
This page will orient new developers on how to setup their development environments in order to hack on the FEM workbench. |
This page will orient new developers on how to setup their development environments in order to hack on the FEM workbench. |
||
== Setting up a Dev Environment == |
== Setting up a Dev Environment == <!--T:4--> |
||
<!--T:5--> |
|||
TBD |
TBD |
||
=== Prerequisites === |
=== Prerequisites === <!--T:6--> |
||
<!--T:7--> |
|||
* Netgen |
* Netgen |
||
* |
|||
=== Recommended === |
=== Recommended === <!--T:8--> |
||
<!--T:9--> |
|||
* Paraview |
* Paraview |
||
=== Compiling via Source === |
=== Compiling via Source === <!--T:10--> |
||
<!--T:11--> |
|||
TBD |
TBD |
||
=== Compiling via Docker === |
=== Compiling via Docker === <!--T:12--> |
||
<!--T:13--> |
|||
TBD |
TBD |
||
== Source Code Management == |
== Source Code Management == <!--T:14--> |
||
<!--T:15--> |
|||
Keeping FreeCAD up-to-date is documented in [[Source code management]] page. Along with useful {{incode|git}} tips. |
Keeping FreeCAD up-to-date is documented in [[Source_code_management|Source code management]] page. Along with useful {{incode|git}} tips. |
||
== FEM Code Infrastructure == |
== FEM Code Infrastructure == <!--T:16--> |
||
<!--T:17--> |
|||
The FEM code lives in {{incode|src/Mod/Fem}} |
The FEM code lives in {{incode|src/Mod/Fem}} |
||
<!--T:18--> |
|||
* {{incode|App/}} <small>console-mode application, defines basic structures and base classes for document objects, that are used by modules to build their own.</small> |
* {{incode|App/}} <small>console-mode application, defines basic structures and base classes for document objects, that are used by modules to build their own.</small> |
||
* {{incode|Gui/}} <small>GUI-mode application, defines the [[3D view]], tools/functions used by workbench to interact with UI and 3D view, defines base classes for [[ |
* {{incode|Gui/}} <small>GUI-mode application, defines the [[3D_view|3D view]], tools/functions used by workbench to interact with UI and 3D view, defines base classes for [[Viewprovider|view providers]].</small> |
||
* {{incode|femcommands/}} |
* {{incode|femcommands/}} |
||
* {{incode|fem.dox}} |
* {{incode|fem.dox}} |
||
Line 56: | Line 68: | ||
* {{incode|TestFemGui.py}} |
* {{incode|TestFemGui.py}} |
||
=== Coding Conventions === |
=== Coding Conventions === <!--T:19--> |
||
<!--T:20--> |
|||
Please see [https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Fem/coding_conventions.md coding_conventions.md] file on the FreeCAD repository. |
Please see [https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Fem/coding_conventions.md coding_conventions.md] file on the FreeCAD repository. |
||
== Adding New FEM Solvers == |
== Adding New FEM Solvers == <!--T:21--> |
||
<!--T:22--> |
|||
A new FEM solver requires the following: |
A new FEM solver requires the following: |
||
<!--T:23--> |
|||
* Mesh exporter |
* Mesh exporter |
||
* Results importer |
* Results importer |
||
Line 73: | Line 88: | ||
* Having one or two beers |
* Having one or two beers |
||
<!--T:24--> |
|||
See also: |
See also: |
||
* [[Extend_FEM_Module]] |
* [[Extend_FEM_Module|Extend FEM Module]] |
||
* The implementation efforts of the [https://github.com/berndhahnebach/FreeCAD_bhb/commits/femoofem oofem] solver |
* The implementation efforts of the [https://github.com/berndhahnebach/FreeCAD_bhb/commits/femoofem oofem] solver |
||
* The implementation efforts of the [https://github.com/FreeCAD/FreeCAD/compare/a03eb6b9625ba...dfc01ec949525 myStran] solver |
* The implementation efforts of the [https://github.com/FreeCAD/FreeCAD/compare/a03eb6b9625ba...dfc01ec949525 myStran] solver |
||
== Writing Unit Tests == <!--T:25--> |
|||
⚫ | |||
<!--T:26--> |
|||
TBD |
|||
⚫ | |||
<!--T:28--> |
|||
* [[Wrapping a Cplusplus class in Python]] |
* [[Wrapping_a_Cplusplus_class_in_Python|Wrapping a Cplusplus class in Python]] |
||
* [[Add_FEM_Equation_Tutorial|Add FEM Equation Tutorial]] |
|||
* [[Add_Button_to_FEM_Toolbar_Tutorial|Add Button to FEM Toolbar Tutorial]] |
|||
== Related == |
== Related == <!--T:29--> |
||
<!--T:30--> |
|||
* FEM bugs in the [https:// |
* FEM bugs in the [https://github.com/FreeCAD/FreeCAD/issues FreeCAD bugtracker] |
||
⚫ | |||
⚫ | |||
* [[Category:FEM]] |
|||
* https://github.com/FreeCAD/FreeCAD/search?q= |
* Open FEM [https://github.com/FreeCAD/FreeCAD/search?q=TODO+AND+fem TODO] comments in the FreeCAD source code |
||
* [https://forum.freecadweb.org/viewtopic.php?f=18&t=60574 Original thread discussion] for this wiki page |
|||
⚫ | |||
⚫ | |||
</translate> |
|||
[[Category:FEM{{#translation:}}]] |
[[Category:FEM{{#translation:}}]] |
||
[[Category:Developer Documentation{{#translation:}}]] |
[[Category:Developer Documentation{{#translation:}}]] |
Latest revision as of 09:14, 23 July 2023
Description
This page will orient new developers on how to setup their development environments in order to hack on the FEM workbench.
Setting up a Dev Environment
TBD
Prerequisites
- Netgen
Recommended
- Paraview
Compiling via Source
TBD
Compiling via Docker
TBD
Source Code Management
Keeping FreeCAD up-to-date is documented in Source code management page. Along with useful git
tips.
FEM Code Infrastructure
The FEM code lives in src/Mod/Fem
App/
console-mode application, defines basic structures and base classes for document objects, that are used by modules to build their own.Gui/
GUI-mode application, defines the 3D view, tools/functions used by workbench to interact with UI and 3D view, defines base classes for view providers.femcommands/
fem.dox
femexamples/
femguiobjects/
femguiutils/
feminout/
femmesh/
femobjects/
femresult/
femsolver/
femtaskpanels/
femtest/
femtools/
femviewprovider/
InitGui.py
Init.py
ObjectsFem.py
TestFemApp.py
TestFemGui.py
Coding Conventions
Please see coding_conventions.md file on the FreeCAD repository.
Adding New FEM Solvers
A new FEM solver requires the following:
- Mesh exporter
- Results importer
- Solver object (needs changes in solver settings, unit tests, ObjectsFem modules as well)
- Task and writer module (here is where the main solver input writing happens)
- GUI tool to create a solver
- GUI preference tab to set the solver binary path
- A solver input writing unit test. Best to take the ccx cantilever. This is available for all mesh element types
- Having one or two beers
See also:
- Extend FEM Module
- The implementation efforts of the oofem solver
- The implementation efforts of the myStran solver
Writing Unit Tests
TBD
Informative
Related
- FEM bugs in the FreeCAD bugtracker
- Open FEM FIXME comments in the FreeCAD source code
- Open FEM TODO comments in the FreeCAD source code
- Original thread discussion for this wiki page
- FEM Workbench