ENH: glboal file handling: initial commit

Moved file path handling to regIOobject and made it type specific so
now every object can have its own rules. Examples:
- faceZones are now processor local (and don't search up anymore)
- timeStampMaster is now no longer hardcoded inside IOdictionary
  (e.g. uniformDimensionedFields support it as well)
- the distributedTriSurfaceMesh is properly processor-local; no need
  for fileModificationChecking manipulation.
This commit is contained in:
mattijs
2016-01-25 13:03:15 +00:00
parent 9fd840c12a
commit e424059208
188 changed files with 3487 additions and 1364 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -194,7 +194,7 @@ int main(int argc, char *argv[])
}
if (!csDictIoPtr->headerOk())
if (!csDictIoPtr->typeHeaderOk<coordinateSystems>(false))
{
FatalErrorIn(args.executable())
<< "Cannot open coordinateSystems file\n "

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -174,7 +174,7 @@ int main(int argc, char *argv[])
}
if (!ioPtr->headerOk())
if (!ioPtr->typeHeaderOk<coordinateSystems>(false))
{
FatalErrorIn(args.executable())
<< "Cannot open coordinateSystems file\n "

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -187,7 +187,7 @@ int main(int argc, char *argv[])
}
if (!ioPtr->headerOk())
if (!ioPtr->typeHeaderOk<coordinateSystems>(false))
{
FatalErrorIn(args.executable())
<< "Cannot open coordinateSystems file\n "

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -42,6 +42,7 @@ Note
#include "polyMesh.H"
#include "distributedTriSurfaceMesh.H"
#include "mapDistribute.H"
#include "localIOdictionary.H"
using namespace Foam;
@ -171,7 +172,8 @@ int main(int argc, char *argv[])
IOobject::AUTO_WRITE
);
const fileName actualPath(io.filePath());
// Look for file (using searchableSurface rules)
const fileName actualPath(typeFilePath<searchableSurface>(io));
fileName localPath(actualPath);
localPath.replace(runTime.rootPath() + '/', "");
@ -193,7 +195,7 @@ int main(int argc, char *argv[])
dict.add("distributionType", distType);
dict.add("mergeDistance", SMALL);
IOdictionary ioDict
localIOdictionary ioDict
(
IOobject
(
@ -238,7 +240,6 @@ int main(int argc, char *argv[])
(
"faceCentres", // name
surfMesh.searchableSurface::time().timeName(), // instance
surfMesh.searchableSurface::local(), // local
surfMesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE