Onboarding FEM Devs: Difference between revisions

From FreeCAD Documentation
mNo edit summary
No edit summary
(27 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
{{TOCRight}}
<translate>


<!--T:1-->
== Description ==
{{TOCright}}


== 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-->
* [[Paraview]]
* Netgen
*
*


=== Compiling via Source ===
=== Recommended === <!--T:8-->


<!--T:9-->
* Paraview

=== Compiling via Source === <!--T:10-->

<!--T:11-->
TBD
TBD


=== Compiling via Docker ===
=== Compiling via Docker === <!--T:12-->


<!--T:13-->
TBD
TBD


== Source Code Management == <!--T:14-->


<!--T:15-->
== FEM Code Infrastructure ==
Keeping FreeCAD up-to-date is documented in [[Source_code_management|Source code management]] page. Along with useful {{incode|git}} tips.


== FEM Code Infrastructure == <!--T:16-->

<!--T:17-->
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|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|fem.dox}}
* {{incode|femexamples/}}
* {{incode|femguiobjects/}}
* {{incode|femguiutils/}}
* {{incode|feminout/}}
* {{incode|femmesh/}}
* {{incode|femobjects/}}
* {{incode|femresult/}}
* {{incode|femsolver/}}
* {{incode|femtaskpanels/}}
* {{incode|femtest/}}
* {{incode|femtools/}}
* {{incode|femviewprovider/}}
* {{incode|InitGui.py}}
* {{incode|Init.py}}
* {{incode|ObjectsFem.py}}
* {{incode|TestFemApp.py}}
* {{incode|TestFemGui.py}}

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

== Adding New FEM Solvers == <!--T:21-->

<!--T:22-->
A new FEM solver requires the following:

<!--T:23-->
* 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

<!--T:24-->
See also:
* [[Sandbox:Add_FEM_Solver_Tutorial|Add FEM Solver Tutorial]]
* [[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/FreeCAD/FreeCAD/compare/a03eb6b9625ba...dfc01ec949525 myStran] solver

== Writing Unit Tests == <!--T:25-->

<!--T:26-->
TBD


== Informative == <!--T:27-->


<!--T:28-->
== Adding New FEM Solvers ==
* [[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 == <!--T:29-->
== Related ==


<!--T:30-->
* FreeCAD [[bugtracker]]
* FEM bugs in the [https://tracker.freecadweb.org/set_project.php?project_id=4;14 FreeCAD bugtracker]
* [[FEM Workbench]]
* Open FEM [https://github.com/FreeCAD/FreeCAD/search?q=FIXME+AND+fem FIXME] comments in the FreeCAD source code
* [[Category:FEM]]
* https://github.com/FreeCAD/FreeCAD/search?q=FIXME+AND+fem
* 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
* https://github.com/FreeCAD/FreeCAD/search?q=TODO+AND+fem
* [[FEM_Workbench|FEM Workbench]]




</translate>
[[Category:FEM{{#translation:}}]]
[[Category:FEM{{#translation:}}]]
[[Category:Developer Documentation{{#translation:}}]]

Revision as of 14:55, 3 November 2021

Other languages:

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:

Writing Unit Tests

TBD

Informative

Related