Onboarding FEM Devs

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 tips.

FEM Code Infrastructure
The FEM code lives in


 * console-mode application, defines basic structures and base classes for document objects, that are used by modules to build their own.
 * 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.

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 page
 * The implementation efforts of the oofem solver
 * The implementation efforts of the myStran solver

Informative

 * Wrapping a Cplusplus class in Python

Related

 * FEM bugs in the FreeCAD bugtracker
 * FEM Workbench
 * https://github.com/FreeCAD/FreeCAD/search?q=FIXME+AND+fem
 * https://github.com/FreeCAD/FreeCAD/search?q=TODO+AND+fem
 * https://github.com/FreeCAD/FreeCAD/search?q=TODO+AND+fem