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

What is the meaning of

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 1, 2008, 12:00
Default Hi all, I know that maybe
  #1
Member
 
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 17
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, 15:37
Default Francesco, This confused me
  #2
New Member
 
C.E.M.
Join Date: Mar 2009
Posts: 16
Rep Power: 17
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, 17:05
Default It's an initialization list fo
  #3
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
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, 04:54
Default Hi Evan and Sandeep, Thanks
  #4
Member
 
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 17
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


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
What is the meaning.. ??? lopez FLUENT 6 November 2, 2016 03:48
want to know meaning Sangamesh Siemens 0 May 15, 2007 05:15
what is the meaning of this dpshaka Main CFD Forum 0 December 15, 2005 21: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 17:17.