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
@ -209,7 +209,7 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces)
}
Pout<< "Writing " << duplicateSet.size()
<< " duplicate faces to faceSet " << duplicateSet.objectPath()
<< " duplicate faces to faceSet " << duplicateSet.localObjectPath()
<< nl << endl;
duplicateSet.write();
}
@ -365,7 +365,7 @@ int main(int argc, char *argv[])
Pout<< "Writing " << dupPoints.size()
<< " duplicated points to pointSet "
<< dupPoints.objectPath() << nl << endl;
<< dupPoints.localObjectPath() << nl << endl;
dupPoints.write();
}

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
@ -406,7 +406,7 @@ int main(int argc, char *argv[])
}
Info<< "Writing map from new to old cell to "
<< newToOld.objectPath() << nl << endl;
<< newToOld.localObjectPath() << nl << endl;
newToOld.write();

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
@ -1412,7 +1412,7 @@ void writeCellToRegion(const fvMesh& mesh, const labelList& cellRegion)
cellToRegion.write();
Info<< "Writing region per cell file (for manual decomposition) to "
<< cellToRegion.objectPath() << nl << endl;
<< cellToRegion.localObjectPath() << nl << endl;
}
// Write for postprocessing
{
@ -1438,7 +1438,7 @@ void writeCellToRegion(const fvMesh& mesh, const labelList& cellRegion)
cellToRegion.write();
Info<< "Writing region per cell as volScalarField to "
<< cellToRegion.objectPath() << nl << endl;
<< cellToRegion.localObjectPath() << nl << endl;
}
}