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

OpenSource but I cannot find

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 14, 2016, 04:19
Default OpenSource but I cannot find
  #1
Member
 
Kai
Join Date: May 2010
Location: Shanghai
Posts: 61
Blog Entries: 1
Rep Power: 15
kaifu is on a distinguished road
Hi, Foamers

Openfoam is an OpenSource CFD, but I cannot find the class members "MeshConstructorTablePtr_"
and the relevant type "MeshConstructorTable::iterator" in surfaceInterpolationScheme.C

Code:
    typename MeshConstructorTable::iterator constructorIter =
        MeshConstructorTablePtr_->find(schemeName);
I can find the relevant info from web elsewhere, like
Code:
typedef tmp<surfaceInterpolationScheme> (*MeshConstructorPtr) (const fvMesh& mesh, Istream& schemeData);

typedef HashTable<MeshConstructorPtr, word, string::hash> MeshConstructorTable;
But it's weird that I cannot find the statement in the official published codes. Can somebody help me?
__________________
Kai
kaifu is offline   Reply With Quote

Old   August 15, 2016, 16:36
Default
  #2
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
The quick answer is that this is all performed through the runtime selection mechanism setup via c++ macros. Take a look at the wiki entry on the runTimeSelection mechanism

You will notice in other files there are things like

Code:
    defineRunTimeSelectionTable(GAMGAgglomeration, lduMesh);
and then later in that same file and class, you will see
Code:
        lduMeshConstructorTable::iterator cstrIter =
            lduMeshConstructorTablePtr_->find(agglomeratorType);
this is the result of the c++ Macros defined in

Code:
src/OpenFOAM/db/runTimeSelection/construction/runTimeSelectionTables.H
That has particular keywords replaced during compilation and completed with the arguments provided in for example "defineRunTimeSelectionTable" call. A very simple explanation for something that is very cool within OpenFOAM. Good luck.

Last edited by chegdan; August 16, 2016 at 09:48.
chegdan 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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 91 December 21, 2022 04:50
How to make a code parallel? Bruno Machado Fluent UDF and Scheme Programming 15 May 27, 2016 09:18
CFX-Pre problem, pls help!!! cth_yao CFX 0 February 17, 2012 00:52
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 12:38
Problem Building OF on Centos cluster (no admin rights) CKH OpenFOAM Installation 5 November 13, 2011 06:32


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