CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   functionObjectList in Time::run() (https://www.cfd-online.com/Forums/openfoam-programming-development/127479-functionobjectlist-time-run.html)

maybee December 12, 2013 07:02

functionObjectList in Time::run()
 
hi,

within the method run() of class Time it can be found:

Code:

...
 if (!running && timeIndex_ != startTimeIndex_) //label timeIndex_;
818* {                                                                           
819* // Note, end() also calls an indirect start() as required
820* functionObjects_.end();  //functionObjects_ Function objects executed at start and on ++, +=
                                  //end(): Called when Time::run() determines that the time-loop exits.
...

For full code of run() see:
http://foam.sourceforge.net/docs/cpp...ce.html#l00809

Furthermore I know "mutable functionObjectList functionObjects_" is defined first within the intializer list of constructor of class Time for creating object "runTime" with:

Code:

functionObjects_(*this, !args.optionFound("noFunctionObjects"))
where the following constructor of class functionObjectList is called:

Code:

Foam::functionObjectList::functionObjectList
  63 (
  64    const Time& t,
  65    const bool execution
  66 )
  67 :
  68    PtrList<functionObject>(),
  69    digests_(),
  70    indices_(),
  71    time_(t),
  72    parentDict_(t.controlDict()),
  73    execution_(execution),
  74    updated_(false)
  75 {}

Still I don t get what the function of "mutable functionObjectList functionObjects_" is, e.g. what calling method end() on "mutable functionObjectList functionObjects_" does. Can someone tell me what is happening when calling end() at the submember "functionObjects_" and what "functionsObjects_" is good for?


All times are GMT -4. The time now is 08:05.