CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   the code difference (

Yanming Ding June 4, 2013 21:37

the code difference
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:

what's the difference between the two forms?

Best regards


cutter June 5, 2013 03:03

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?


Yanming Ding June 5, 2013 04:44

the change of version
Dear cutter,
Thank you for your reply.

The reason why I was wondering is the change of version.

There is a same solver, 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.


All times are GMT -4. The time now is 16:42.