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

mesh_(U.mesh()),

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 15, 2011, 16:58
Default mesh_(U.mesh()),
  #1
Senior Member
 
Tarak
Join Date: Aug 2010
Location: State College, PA
Posts: 111
Rep Power: 15
Tarak is on a distinguished road
Hii,

Can someone please let me know what the expressions runTime_(U.time()) and mesh_(U.mesh()) do in the following lines?

regIOobject
(
IOobject
(
turbulenceModelName,
U.time().constant(),
U.db(),
IOobject::NO_READ,
IOobject::NO_WRITE
)
),
runTime_(U.time()),
mesh_(U.mesh()),

U_(U),
phi_(phi),
transportModel_(transport)


Thanks,
Tarak
Tarak is offline   Reply With Quote

Old   July 16, 2011, 17:08
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 21
marupio is on a distinguished road
Not much context, but it looks like this is a constructor initialization list. The object under construction has a reference to the mesh and runTime. You'll find data members in its header file:
Code:
fvMesh& mesh_;
Time& runTime_;
Possibly with "const" in front. This means the object stores the location of runTime and the mesh for easy access. These are not copies - they are references (kind of like pointers). All references must be initialized during construction. That is the purpose of those lines... giving the references their addresses.
marupio is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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



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