CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   C++ topics (https://www.cfd-online.com/Forums/openfoam-programming-development/157784-c-topics.html)

shovan August 8, 2015 03:43

C++ topics
 
Hi everybody

I know basic C++. I want to know what are the topics in C++ i have to go through so that i can understand Openfoam.

Lisandro Maders August 8, 2015 21:41

Hi Shovan,

I am in a very similar situation as you are. I will try to implement some simple models in OpenFOAM and in order to do that I am going a bit into the OpenFOAM source code.

I knew basic C++, but all I knew was regarded to procedural programming. OpenFOAM makes large use of object oriented programming, which is not trivial to understand. I would suggest you to start reading some book and follow the class chapter (be sure you understand well about pointers in C++). Try to understand the concepts of class, constructors, friend functions and friend classes, inheritance, templates and a lot of things more about classes. I think this will be your first and most difficult test. Once you have done this, I believe you will be able to start looking at the code and understand the things day after day.

If you want some suggestion of very clear and objective book, try the Daoqi Yang C++ book. I found it very good.


Best of luck,

Lisandro

shovan August 9, 2015 00:14

Thank you very much


All times are GMT -4. The time now is 20:09.