ENH: Consistency improvement for setting postProcessing directory name

This commit is contained in:
Andrew Heather
2018-02-27 14:37:05 +00:00
parent 853b9abb79
commit aec949d7cc
16 changed files with 71 additions and 40 deletions

View File

@ -63,11 +63,11 @@ Foam::functionObjects::extractEulerianParticles::dictBaseFileDir() const
{
// Put in undecomposed case (Note: gives problems for
// distributed data running)
baseDir = baseDir/".."/"postProcessing";
baseDir = baseDir/".."/functionObject::outputPrefix;
}
else
{
baseDir = baseDir/"postProcessing";
baseDir = baseDir/functionObject::outputPrefix;
}
return baseDir;

View File

@ -647,8 +647,8 @@ bool Foam::functionObjects::streamLineBase::writeToFile()
fileName vtkPath
(
Pstream::parRun()
? time_.path()/".."/"postProcessing"/"sets"/name()
: time_.path()/"postProcessing"/"sets"/name()
? time_.path()/".."/functionObject::outputPrefix/"sets"/name()
: time_.path()/functionObject::outputPrefix/"sets"/name()
);
if (mesh_.name() != fvMesh::defaultRegion)
{

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015-2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -389,9 +389,17 @@ void Foam::functionObjects::runTimePostPro::scene::saveImage
const Time& runTime = obr_.time();
fileName prefix(Pstream::parRun() ?
runTime.path()/".."/"postProcessing"/name_/obr_.time().timeName() :
runTime.path()/"postProcessing"/name_/obr_.time().timeName());
const fileName relPath
(
functionObject::outputPrefix/name_/obr_.time().timeName()
);
fileName prefix
(
Pstream::parRun() ?
runTime.path()/".."/relPath
: runTime.path()/relPath
);
mkDir(prefix);