|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Join Date: Apr 2015
Posts: 15
Rep Power: 11 ![]() |
I am trying to understand roughly what each method/function in OpenFOAM does by searching for it in the link cpp.openfoam.org.
As I went through the laplacianFoam.C, I got stuck with the member functions of "options" class namely constrain() and correct(). Scouring the above source code, I found the class definition and function definitions, which call member function of another class called "option" (source.constrain()), which was empty. I've attached below the screenshots. I've been having a bit of trouble understanding OpenFOAM code this way. Are there other easy ways of knowing what the functions do? constrain.png option.C.png |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
|
In order to understand OpenFOAM, try to do the following:
~ Work in debug mode till your code works promptly. The debug mode locates the error appropriately during compilation which helps to understand the code better. WM_COMPILE_OPTION=Debug ~ Try using gdb or nemiver debuggers which helps to navigate the code line by line from the scratch. https://openfoamwiki.net/index.php/HowTo_debugging ~ Create doxygen documentation for your customized solver. It's a good reference manual with source trees to easily refer the actual code. Hope it helps. Thank you |
|
![]() |
![]() |
![]() |
Tags |
source code |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Frequently Asked Questions about Installing OpenFOAM | wyldckat | OpenFOAM Installation | 3 | November 14, 2023 11:58 |
OpenFOAM.com versus OpenFOAM.org: Which version to use? | wyldckat | OpenFOAM | 19 | March 25, 2023 07:50 |
OpenFOAM, progress in academia and industry, after 13 years' effort | sharonyue | OpenFOAM | 5 | March 29, 2018 12:09 |
Specific OpenFOAM Code | pbhuter | OpenFOAM | 13 | June 30, 2012 19:06 |
Design Integration with CFD? | John C. Chien | Main CFD Forum | 19 | May 17, 2001 15:56 |