|
[Sponsors] |
June 4, 2013, 22:37 |
the code difference
|
#1 |
New Member
Auggie
Join Date: Oct 2012
Posts: 5
Rep Power: 14 |
I have get stuck in a problem about a simple code.
for example: I defined a function combustion::tmp<volScalarField>sh() const; when I tried to call the function: (1)combustion->sh() (2)combustion->sh()() what's the difference between the two forms? Best regards Auggie |
|
June 5, 2013, 04:03 |
|
#2 |
Senior Member
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16 |
As far as I understand the first one calls operator() on sh. The second one calls operator() on the return value of sh(). What's your intention?
cutter |
|
June 5, 2013, 05:44 |
the change of version
|
#3 |
New Member
Auggie
Join Date: Oct 2012
Posts: 5
Rep Power: 14 |
Dear cutter,
Thank you for your reply. The reason why I was wondering is the change of version. There is a same solver, chemistry.sh()() in openfoam 1.7, but combustion->sh() in openfoam 2.0,2.1 I was wondering whether the different forms express the same meanings or not. Auggie |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Understanding code of inletOutlet / outletInlet | fredo490 | OpenFOAM Programming & Development | 10 | June 13, 2013 13:45 |
The FOAM Documentation Project - SHUT-DOWN | holger_marschall | OpenFOAM | 242 | March 7, 2013 13:30 |
Design Integration with CFD? | John C. Chien | Main CFD Forum | 19 | May 17, 2001 16:56 |
What is the Better Way to Do CFD? | John C. Chien | Main CFD Forum | 54 | April 23, 2001 09:10 |
own Code vs. commercial code | Bernhard Mueck | Main CFD Forum | 10 | February 16, 2000 11:07 |