CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

'readFromStream' function operator?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 2, 2024, 03:57
Default 'readFromStream' function operator?
  #1
New Member
 
Jeongseok Kang
Join Date: Nov 2023
Posts: 1
Rep Power: 0
jskang is on a distinguished road
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();
}
jskang is offline   Reply With Quote

Reply

Tags
code study


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 23:10.