IOobject: Added localPath and localObjectPath member functions

For many information and diagnostic messages the absolute path of the object is
not required and the local path relative to the current case is sufficient; the
new localObjectPath() member function of IOobject provides a convenient way of
printing this.
This commit is contained in:
Henry Weller
2020-01-24 11:52:45 +00:00
parent 3c1456571e
commit c8a1c95b06
23 changed files with 74 additions and 56 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -201,13 +201,13 @@ int main(int argc, char *argv[])
if (!meshDictIO.typeHeaderOk<IOdictionary>(true))
{
FatalErrorInFunction
<< meshDictIO.objectPath()
<< meshDictIO.localObjectPath()
<< nl
<< exit(FatalError);
}
Info<< "Creating block mesh from\n "
<< meshDictIO.objectPath() << endl;
<< meshDictIO.localObjectPath() << endl;
IOdictionary meshDict(meshDictIO);
blockMesh blocks(meshDict, regionName);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -1034,7 +1034,7 @@ int main(int argc, char *argv[])
}
mesh.setInstance(runTimeExtruded.constant());
Info<< "Writing mesh to " << mesh.objectPath() << nl << endl;
Info<< "Writing mesh to " << mesh.localObjectPath() << nl << endl;
if (!mesh.write())
{

View File

@ -316,7 +316,7 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance)
// }
//
// Info<< "Writing map from tetDualMesh points to Voronoi mesh to "
// << pointDualAddressing.objectPath() << endl;
// << pointDualAddressing.localObjectPath() << endl;
// pointDualAddressing.write();
//
//
@ -370,7 +370,7 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance)
// }
//
// Info<< "Writing tetDualMesh points mapped onto Voronoi mesh to "
// << dualPoints.objectPath() << endl
// << dualPoints.localObjectPath() << endl
// << "Replace the polyMesh/points with these." << endl;
// dualPoints.write();
// }