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

Class Time constructor

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 23, 2013, 10:59
Default Class Time constructor
  #1
Senior Member
 
Join Date: Jan 2012
Posts: 159
Rep Power: 5
maybee is on a distinguished road
Hi,

I have some question about a few lines of the Class Time constructor.

1.
Code:
397* libs_(),  //dlLibraryTable libs_; //- Any loaded dynamic libraries. Make sure 
                                                   //to construct before reading controlDict.         
398*             //operator () : T& operator() (const Key& key) inline   
                   //Find and return a hashedEntry, create it null if not present.
                   //template<class T, class Key, class Hash>
                   //inline T& Foam::HashTable<T, Key, Hash>::operator()(const Key& key)
                   //{
                   //iterator iter = this->find(key);
                   //if (iter == this->end())
                   //  {
                   //this->insert(key, T());
                   //return *find(key);
                   //   }
                   //else
                   // {
                   //return *iter;
                   // }
                   //}
First of all, have I found the right overloaded operator () ? If yes, what does the happen here?

2.
Code:
417* writeControl_(wcTimeStep),
with
Code:
//enum writeControls
       //wcTimeStep
       //wcRunTime
       //wcAdjustableRunTime*
       //wcClockTime*
       //wcCpuTime
What do the the single options in the enum mean?

3.
Code:
418* writeInterval_(GREAT),  //scalar writeInterval_;, GREAT ?
What is the variable GREAT and where to find it?

4.
Code:
420* secondaryWriteInterval_(labelMax/10.0),    //scalar secondaryWriteInterval_;
What is the variable labelMax and where to find it?
maybee is offline   Reply With Quote

Old   November 24, 2013, 17:49
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,253
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings maybee,

Given the range of questions you've been asking, I suggest that you read and study the following:
And you can use Google to help you search for things, for example:
Code:
site:foam.sourceforge.net/docs/cpp/ labelMax
And on Github you can also search for things in OpenFOAM's source code: https://github.com/OpenFOAM/OpenFOAM-2.2.x/ - the search bar is on the top of the page.

Good luck! Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   November 25, 2013, 07:38
Default
  #3
Senior Member
 
Join Date: Jan 2012
Posts: 159
Rep Power: 5
maybee is on a distinguished road
Hi,

first of all thanks for the links. Surely I'll read the programmers guide at some point and the forum and github link could come in handy, too.

Furthermore I know a lot about the basics of c++ programming, google really does not help me with my questions and I just can't find the descriptions I am searching for (see QUestion 2,3,4).
maybee is offline   Reply With Quote

Old   November 25, 2013, 17:05
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,253
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi maybee,
Quote:
Originally Posted by maybee View Post
Furthermore I know a lot about the basics of c++ programming, google really does not help me with my questions and I just can't find the descriptions I am searching for (see QUestion 2,3,4).

Mmm... well, Google can help find things in some other situations, but I guess that Github would be better for finding code definitions in OpenFOAM's code.

Best regards,
Bruno
wyldckat 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
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 28 May 28, 2015 13:37
calculation stops after few time steps sivakumar OpenFOAM Running, Solving & CFD 7 March 17, 2013 07:37
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 04:34
calculation diverge after continue to run zhajingjing OpenFOAM 0 April 28, 2010 04:35
Modeling in micron scale using icoFoam m9819348 OpenFOAM Running, Solving & CFD 7 October 27, 2007 00:36


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