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

const word& name

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 16, 2014, 09:13
Default const word& name
  #1
New Member
 
Andrea
Join Date: Sep 2014
Posts: 17
Rep Power: 12
And901 is on a distinguished road
Hi Foamers,

i would like to know what is the meaning of "const word& name".
For example, it is used in fvmDiv.H, at the beginning of the file:

namespace fvm { template<class Type> tmp<fvMatrix<Type> > div ( const surfaceScalarField&, const GeometricField<Type, fvPatchField, volMesh>&, const word& name );
Does anybody could help me?

Regards,

Andrea
And901 is offline   Reply With Quote

Old   October 16, 2014, 10:08
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

well, if you take a look at fvmDiv.C, you'll see the usage of this name:

Code:
template<class Type>
tmp<fvMatrix<Type> >
div
(
    const surfaceScalarField& flux,
    const GeometricField<Type, fvPatchField, volMesh>& vf,
    const word& name
)
{
    return fv::convectionScheme<Type>::New
    (
        vf.mesh(),
        flux,
        vf.mesh().divScheme(name)
    )().fvmDiv(flux, vf);
}
or maybe another piece of code will be more suitable for explanation:

Code:
template<class Type>
tmp<fvMatrix<Type> >
div
(
    const surfaceScalarField& flux,
    const GeometricField<Type, fvPatchField, volMesh>& vf
)
{
    return fvm::div(flux, vf, "div("+flux.name()+','+vf.name()+')');
}
I.e. name is the name of the field by which type of div scheme is retrieved from fvSchemes file.
alexeym 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
Second Derivative Zero - Boundary Condition fu-ki-pa OpenFOAM 11 March 27, 2021 05:28
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 02:47
Wall bounded values and streamlines Ruli OpenFOAM Post-Processing 5 February 2, 2014 17:45
[snappyHexMesh] Error in SnappyHexMesh gooya_kabir OpenFOAM Meshing & Mesh Conversion 2 October 23, 2013 05:41
LiftDrag coefficient in LES fabian_korn OpenFOAM Post-Processing 1 September 22, 2008 03:34


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