BUG: Time: not setting IO flags for e.g. fvSolution constructed from Time.

This commit is contained in:
mattijs
2011-03-28 16:43:04 +01:00
parent ab36a99d6f
commit 6ee1d853b6
3 changed files with 17 additions and 9 deletions

View File

@ -1,6 +1,5 @@
// We do not have a top-level mesh. Construct the fvSolution for
// the runTime instead.
runTime.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
fvSolution solutionDict(runTime);
const dictionary& pimple = solutionDict.subDict("PIMPLE");

View File

@ -641,14 +641,16 @@ int main(int argc, char *argv[])
);
# include "setRootCase.H"
//- Not useful anymore. See above.
//// Create processor directory if non-existing
//if (!Pstream::master() && !isDir(args.path()))
//{
// Pout<< "Creating case directory " << args.path() << endl;
// mkDir(args.path());
//}
// Create processor directory if non-existing
if (!Pstream::master() && !isDir(args.path()))
{
Pout<< "Creating case directory " << args.path() << endl;
mkDir(args.path());
}
// Make sure we do not use the master-only reading.
regIOobject::fileModificationChecking = regIOobject::timeStamp;
# include "createTime.H"
word regionName = polyMesh::defaultRegion;

View File

@ -260,6 +260,10 @@ Foam::Time::Time
readLibs_(controlDict_, "libs"),
functionObjects_(*this)
{
// Explicitly set read flags on objectRegistry so anything constructed
// from it reads as well (e.g. fvSolution).
readOpt() = IOobject::MUST_READ_IF_MODIFIED;
setControls();
// Time objects not registered so do like objectRegistry::checkIn ourselves.
@ -342,10 +346,13 @@ Foam::Time::Time
readLibs_(controlDict_, "libs"),
functionObjects_(*this)
{
// Explicitly set read flags on objectRegistry so anything constructed
// from it reads as well (e.g. fvSolution).
readOpt() = IOobject::MUST_READ_IF_MODIFIED;
// Since could not construct regIOobject with setting:
controlDict_.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
setControls();
// Time objects not registered so do like objectRegistry::checkIn ourselves.