|
[Sponsors] |
Understanding the basic of Openfoam programming |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 25, 2020, 05:43 |
Understanding the basic of Openfoam programming
|
#1 |
New Member
Vishal
Join Date: Sep 2020
Posts: 6
Rep Power: 6 |
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 05:44. Reason: tags |
|
September 25, 2020, 06:09 |
|
#2 |
Senior Member
Join Date: Oct 2017
Posts: 131
Rep Power: 9 |
These are not special features of OpenFOAM programming. Take a look at this:
https://www.learncpp.com/cpp-tutorial/611-references/ https://www.learncpp.com/cpp-tutoria...nd-references/ |
|
Tags |
classes, openfoam, openfoam4.1, programming, psireactionthermo |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Frequently Asked Questions about Installing OpenFOAM | wyldckat | OpenFOAM Installation | 3 | November 14, 2023 12:58 |
Beginner: How to bridge the gap between basic C++ knowledge to openFOAM programming | bigbang | OpenFOAM Programming & Development | 14 | July 10, 2018 06:34 |
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 | cfd.direct | OpenFOAM Announcements from Other Sources | 2 | August 31, 2015 14:36 |
New OpenFOAM Forum Structure | jola | OpenFOAM | 2 | October 19, 2011 07:55 |
looking for a basic tutorial to use openfoam | ramaerocfd | OpenFOAM | 3 | December 31, 2010 04:21 |