CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Understanding the basic of Openfoam programming

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Krapf

LinkBack Thread Tools Search this Thread Display Modes
Old   September 25, 2020, 04:43
Default Understanding the basic of Openfoam programming
New Member
Join Date: Sep 2020
Posts: 6
Rep Power: 5
vishalgarg474 is on a distinguished road
Hello Everyone,

I am a beginner in Openfoam programming and I am trying to understand these lines of code.

psiReactionThermo& thermo = reaction->thermo();

basicMultiComponentMixture& composition = thermo.composition();

What I can not understand is the usage of & and the -> in the codeline.

1. Does & call some functionality thermo of class psiReactionThermo. Or is it defining some kind of variable named thermo and then initializing it with reaction?

2. Further, what does the -> mean?

Could somebody share what they mean?

Last edited by vishalgarg474; September 25, 2020 at 04:44. Reason: tags
vishalgarg474 is offline   Reply With Quote

Old   September 25, 2020, 05:09
Senior Member
Join Date: Oct 2017
Posts: 123
Rep Power: 8
Krapf is on a distinguished road
These are not special features of OpenFOAM programming. Take a look at this:
vishalgarg474 likes this.
Krapf is offline   Reply With Quote


classes, openfoam, openfoam4.1, programming, psireactionthermo

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 11:58
Beginner: How to bridge the gap between basic C++ knowledge to openFOAM programming bigbang OpenFOAM Programming & Development 14 July 10, 2018 05:34
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 OpenFOAM Announcements from Other Sources 2 August 31, 2015 13:36
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55
looking for a basic tutorial to use openfoam ramaerocfd OpenFOAM 3 December 31, 2010 03:21

All times are GMT -4. The time now is 02:07.