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

Class Time constructor

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 23, 2013, 09:59
Default Class Time constructor
  #1
Senior Member
 
Join Date: Jan 2012
Posts: 166
Rep Power: 14
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, 16:49
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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, 06:38
Default
  #3
Senior Member
 
Join Date: Jan 2012
Posts: 166
Rep Power: 14
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, 16:05
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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


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
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 32 June 16, 2021 06:55
calculation stops after few time steps sivakumar OpenFOAM Running, Solving & CFD 7 March 17, 2013 06:37
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 03: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 04:53.