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

fvm::div() Function

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By Tobi
  • 4 Post By Zeppo

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 23, 2018, 10:37
Default fvm::div() Function
  #1
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,


just a brief question. Analyzing the fvm::div() functions in the inside the fvm namespace, we can see that in the last instance, we have:
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);
}

However, the fv.mesh().divScheme(name) should return an ITstream. The New() function of the convectionScheme class however takes an Istream. The problem I have right now, I cannot find the conversion of the ITstream and Istream anywhere.

  1. vf.mesh() return the object of class Mesh (which is similar to fvMesh)
  2. the fvMesh object is used to apply the divScheme() function which is implemented in the inherited class fvSchemes. This function returns an ITstream.
  3. Now, I am not sure why it can be converted into an Istream directly?
Any suggestion is appreaciated. I guess I just can't see it or I am mixing anything up.
Thanks in advance.
atulkjoy likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 23, 2018, 12:48
Default
  #2
Senior Member
 
Zeppo's Avatar
 
Sergei
Join Date: Dec 2009
Posts: 261
Rep Power: 21
Zeppo will become famous soon enough
Hi
Simple. ITstream is derived from Istream that's why you don't need any explicit conversion function, conversion is done implicitly.
Zeppo is offline   Reply With Quote

Old   December 23, 2018, 17:03
Default
  #3
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Of course. Thanks Zeppo.
__________________
Keep foaming,
Tobias Holzmann
Tobi 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
[mesh manipulation] RefineMesh Error and Foam warning jiahui_93 OpenFOAM Meshing & Mesh Conversion 4 March 3, 2018 11:32
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 06:42
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 06:59
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50


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