functionObjectList: Prevent execution during construction

As of 2ebed5ec, functonObjectList::start contains run commands that
trigger if some function objects are executable at time-zero. A call to
this method in functionObjectList::New has been removed (and replaced
with functonObjectList::read) as it was causing postProcess and <solver>
-postProcess to execute twice; once on construction, and once at the
selected initial time.

This change also fixes lookup errors generated by postProcess which
occured because fields (specified with -field or -fields arguments) are
not read and registered prior to function object construction.

Usage of functonObjectList::start within Time::run has not been altered.
This commit is contained in:
Will Bainbridge
2019-11-15 15:44:00 +00:00
parent 0d9786651b
commit 5f0e76fcf9

View File

@ -540,7 +540,7 @@ Foam::autoPtr<Foam::functionObjectList> Foam::functionObjectList::New
functionsPtr.reset(new functionObjectList(runTime));
}
functionsPtr->start();
functionsPtr->read();
return functionsPtr;
}