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

What is the meaning of

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 1, 2008, 13:00
Default Hi all, I know that maybe
  #1
Member
 
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 8
francesco_b is on a distinguished road
Hi all,

I know that maybe it could be a silly question, but I'm a beginner and somewhere I need to start

in the file inletOutletFvPatchField.C there is this expressions:

template<class>
inletOutletFvPatchField<type>::inletOutletFvPatchF ield
(
const fvPatch& p,
const DimensionedField<type,>& iF
)
:
mixedFvPatchField<type>(p, iF),
phiName_("phi")
{
this->refValue() = pTraits<type>::zero;
this->refGrad() = pTraits<type>::zero;
this->valueFraction() = 0.0;
}

What is the meaning of the ":"? Is it only a way to say that the line goes on through next line?

Thanks in advance

Francesco
francesco_b is offline   Reply With Quote

Old   February 1, 2008, 16:37
Default Francesco, This confused me
  #2
New Member
 
C.E.M.
Join Date: Mar 2009
Posts: 16
Rep Power: 8
evan is on a distinguished road
Francesco,

This confused me too. Check here:

http://www.cs.huji.ac.il/labs/parall...e/tic0143.html

with operator overload I think you can also use it with an access specifier.

Evan
evan is offline   Reply With Quote

Old   February 1, 2008, 18:05
Default It's an initialization list fo
  #3
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 386
Rep Power: 15
deepsterblue will become famous soon enough
It's an initialization list for member data. For classes that don't provide a default null-constructor, this is the only way to go, since the object (in this case: mixedFvPatchField<type>(p, iF),etc ) needs some initial parameters for the constructor.
Other situations in which this happens:
When you have references as member data. Something like - label& myData_;
When the object is created, myData_ MUST have a reference to something, otherwise, it's invalid.

Hope this helps
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   February 4, 2008, 05:54
Default Hi Evan and Sandeep, Thanks
  #4
Member
 
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 8
francesco_b is on a distinguished road
Hi Evan and Sandeep,

Thanks for your help, now it is clear

Regards,

Francesco
francesco_b is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the meaning.. ??? lopez FLUENT 5 September 11, 2009 10:01
want to know meaning Sangamesh CD-adapco 0 May 15, 2007 05:15
what is the meaning of this dpshaka Main CFD Forum 0 December 15, 2005 22:24
what's the meaning arwang FLUENT 4 May 3, 2005 07:34
meaning id Main CFD Forum 0 September 18, 2003 04:01


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