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:
@ -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
|
||||
@ -793,7 +793,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
Info<< nl << "Writing featureEdgeMesh to "
|
||||
<< bfeMesh.objectPath() << endl;
|
||||
<< bfeMesh.localObjectPath() << endl;
|
||||
|
||||
bfeMesh.regIOobject::write();
|
||||
}
|
||||
|
||||
@ -387,7 +387,7 @@ namespace Foam
|
||||
feMesh.writeStats(Info);
|
||||
|
||||
Info<< nl << "Writing extendedFeatureEdgeMesh to "
|
||||
<< feMesh.objectPath() << endl;
|
||||
<< feMesh.localObjectPath() << endl;
|
||||
|
||||
mkDir(feMesh.path());
|
||||
|
||||
@ -420,7 +420,7 @@ namespace Foam
|
||||
);
|
||||
|
||||
Info<< nl << "Writing featureEdgeMesh to "
|
||||
<< bfeMesh.objectPath() << endl;
|
||||
<< bfeMesh.localObjectPath() << endl;
|
||||
|
||||
bfeMesh.regIOobject::write();
|
||||
|
||||
|
||||
@ -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
|
||||
@ -337,7 +337,8 @@ int main(int argc, char *argv[])
|
||||
move(surf)
|
||||
);
|
||||
|
||||
Info<< "writing surfMesh as well: " << surfOut.objectPath() << endl;
|
||||
Info<< "writing surfMesh as well: "
|
||||
<< surfOut.localObjectPath() << endl;
|
||||
surfOut.write();
|
||||
|
||||
surfLabelField zoneIds
|
||||
@ -366,7 +367,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
|
||||
Info<< "writing surfMesh again well: " << surfOut.objectPath()
|
||||
Info<< "writing surfMesh again well: "
|
||||
<< surfOut.localObjectPath()
|
||||
<< endl;
|
||||
surfOut.write();
|
||||
|
||||
@ -386,7 +388,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
Info<< "write zoneIds (for testing only): "
|
||||
<< zoneIds.objectPath() << endl;
|
||||
<< zoneIds.localObjectPath() << endl;
|
||||
zoneIds.write();
|
||||
|
||||
surfPointLabelField pointIds
|
||||
@ -394,9 +396,7 @@ int main(int argc, char *argv[])
|
||||
IOobject
|
||||
(
|
||||
"zoneIds.",
|
||||
// "pointIds",
|
||||
surfOut.instance(),
|
||||
// "pointFields",
|
||||
surfOut,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
@ -411,7 +411,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
Info<< "write pointIds (for testing only): "
|
||||
<< pointIds.objectPath() << endl;
|
||||
<< pointIds.localObjectPath() << endl;
|
||||
pointIds.write();
|
||||
|
||||
Info<<"surfMesh with these names: " << surfOut.names() << endl;
|
||||
|
||||
@ -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
|
||||
@ -238,7 +238,7 @@ int main(int argc, char *argv[])
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "read surfMesh:\n " << smesh.objectPath() << endl;
|
||||
Info<< "read surfMesh:\n " << smesh.localObjectPath() << endl;
|
||||
|
||||
|
||||
// Simply copy for now, but really should have a separate write method
|
||||
|
||||
@ -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
|
||||
@ -288,7 +288,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
|
||||
Info<< "writing surfMesh:\n " << smesh.objectPath() << endl;
|
||||
Info<< "writing surfMesh:\n " << smesh.localObjectPath() << endl;
|
||||
smesh.write();
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
|
||||
Reference in New Issue
Block a user