Commit 6ee1d853 authored by mattijs's avatar mattijs
Browse files

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

parent ab36a99d
// 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");
......
......@@ -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;
......
......@@ -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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment