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

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -38,6 +38,7 @@ namespace Foam
bool Foam::functionObject::postProcess(false);
Foam::word Foam::functionObject::outputPrefix("postProcessing");
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -172,6 +172,9 @@ public:
//- Global post-processing mode switch
static bool postProcess;
//- Directory prefix
static word outputPrefix;
//- Switch write log to Info
Switch log;

View File

@ -27,14 +27,10 @@ License
#include "Time.H"
#include "polyMesh.H"
#include "IFstream.H"
#include "functionObject.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
const Foam::word Foam::functionObjects::writeFile::outputPrefix
(
"postProcessing"
);
Foam::label Foam::functionObjects::writeFile::addChars = 8;
@ -56,11 +52,11 @@ Foam::fileName Foam::functionObjects::writeFile::baseFileDir() const
{
// Put in undecomposed case (Note: gives problems for
// distributed data running)
baseDir = baseDir/".."/outputPrefix;
baseDir = baseDir/".."/functionObject::outputPrefix;
}
else
{
baseDir = baseDir/outputPrefix;
baseDir = baseDir/functionObject::outputPrefix;
}
// Append mesh name if not default region

View File

@ -117,9 +117,6 @@ private:
public:
//- Directory prefix
static const word outputPrefix;
//- Additional characters for writing
static label addChars;