|
[Sponsors] |
October 2, 2024, 03:57 |
'readFromStream' function operator?
|
#1 |
New Member
Jeongseok Kang
Join Date: Nov 2023
Posts: 1
Rep Power: 0 |
Hello, i'm jskang
I am currently studying OpenFOAM code and reviewing icoFoam.c step by step. However, I have encountered a part that I cannot understand, so I am posting this question in the community. I am studying using ESI version v2312, and I am looking at the following code in IOField.C. The part I do not understand is is >> *this. I assume it means transferring the data from the Istream instance (is) to the IOField instance. Also, I expect that the >> is an operator overloaded for IOField. When I look for this operator definition, I see that >> is defined in Istream, but with different arguments, so it doesn’t seem to be the correct one. Could you tell me where the >> operator for this case is defined? // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // template<class Type> void Foam::IOField<Type>::readFromStream(const bool readOnProc) { Istream& is = readStream(typeName, readOnProc); if (readOnProc) { is >> *this; } close(); } |
|
Tags |
code study |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Invalid Normals for source face to target face while making AMI? | Sorabh | OpenFOAM Meshing & Mesh Conversion | 1 | August 3, 2021 07:35 |
[mesh manipulation] RefineMesh Error and Foam warning | jiahui_93 | OpenFOAM Meshing & Mesh Conversion | 4 | March 3, 2018 12:32 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
Compilation errors in ThirdPartymallochoard | feng_w | OpenFOAM Installation | 1 | January 25, 2009 07:59 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 21:50 |