|
[Sponsors] |
July 15, 2010, 01:58 |
tmp< T >
|
#1 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi FOAMers
Can any one tell me "tmp< T >" class is for what? It seems it is "A class for managing temporary objects." but can any one explain for me what is difference between const GeometricField< Type, fvsPatchField, surfaceMesh > and const tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > Any help will be appreciated Best regards Ata |
|
July 15, 2010, 05:07 |
|
#2 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
||
July 15, 2010, 08:45 |
Thanks
|
#3 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi Anton Kidess
Thank you very much Best regards Ata |
|
July 17, 2010, 02:24 |
difference between tmp<T> and &T
|
#4 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi Anton Kidess
So, would you please tell me what is difference between tmp<T> and passing a reference (&T)? Thank you very much Best regards Ata |
|
July 17, 2010, 11:58 |
|
#5 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
tmp is used for returning *local variables* without copying. You can't pass a reference because the data it points to is going out of scope. There's an article on the wiki here:
http://openfoamwiki.net/index.php/OpenFOAM_guide/tmp |
|
July 17, 2010, 21:37 |
Thanks
|
#6 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi David
Thank you very much Best regards Ata |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CAD -> gMsh -> enGrid -> OpenFOAM Problem | AlGates | OpenFOAM | 7 | August 6, 2010 13:46 |
[Netgen] Geometry > Netgen > OpenFOAM | ericnutsch | OpenFOAM Meshing & Mesh Conversion | 9 | February 22, 2010 08:39 |
Cyclic Boundaries -> Match Option -> Arbitrary | Derek | Siemens | 1 | August 4, 2004 23:06 |
convection......-> conduction......-> convection | madasu | FLUENT | 3 | November 24, 2002 02:15 |
Plot3d grids > Gambit > Fluent 5 | David C | FLUENT | 1 | February 16, 2001 17:29 |