ENH: add IOobject::objectRelPath() for compact output (#2195)

This commit is contained in:
Mark Olesen
2021-09-02 16:12:17 +02:00
parent 610711ac47
commit 96adf3ae80
10 changed files with 57 additions and 11 deletions

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2019-2020 OpenCFD Ltd.
Copyright (C) 2019-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -165,7 +165,7 @@ int main(int argc, char *argv[])
IOdictionary meshDict(dictIO);
Info<< "Creating PDRblockMesh from "
<< runTime.relativePath(dictIO.objectPath()) << endl;
<< dictIO.objectRelPath() << endl;
// Always start from a PDRblock
PDRblock blkMesh(meshDict, true);

View File

@ -1,3 +1,20 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
Description
Search for the appropriate blockMeshDict dictionary...
\*---------------------------------------------------------------------------*/
// Search for the appropriate blockMesh dictionary....
const word dictName("blockMeshDict");
@ -64,9 +81,12 @@ autoPtr<IOdictionary> meshDictPtr;
}
Info<< "Creating block mesh from "
<< runTime.relativePath(meshDictIO.objectPath()) << endl;
<< meshDictIO.objectRelPath() << endl;
meshDictPtr = autoPtr<IOdictionary>::New(meshDictIO);
}
const IOdictionary& meshDict = *meshDictPtr;
// ************************************************************************* //