Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
aec949d7
Commit
aec949d7
authored
Feb 27, 2018
by
Andrew Heather
Browse files
ENH: Consistency improvement for setting postProcessing directory name
parent
853b9abb
Changes
16
Hide whitespace changes
Inline
Side-by-side
applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C
View file @
aec949d7
...
...
@@ -10,6 +10,7 @@
#include
"polyMeshTetDecomposition.H"
#include
"surfaceWriter.H"
#include
"checkTools.H"
#include
"functionObject.H"
#include
"vtkSurfaceWriter.H"
#include
"writer.H"
...
...
@@ -1020,7 +1021,7 @@ Foam::label Foam::checkGeometry
{
wr
.
write
(
"postProcessing"
,
functionObject
::
outputPrefix
,
"src_"
+
tmName
,
meshedSurfRef
(
...
...
@@ -1074,7 +1075,7 @@ Foam::label Foam::checkGeometry
{
wr
.
write
(
"postProcessing"
,
functionObject
::
outputPrefix
,
"tgt_"
+
tmName
,
meshedSurfRef
(
...
...
applications/utilities/mesh/manipulation/checkMesh/checkTools.C
View file @
aec949d7
...
...
@@ -41,6 +41,7 @@ License
#include
"syncTools.H"
#include
"globalIndex.H"
#include
"PatchTools.H"
#include
"functionObject.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
@@ -285,7 +286,7 @@ void Foam::mergeAndWrite
(
set
.
time
().
path
()
/
(
Pstream
::
parRun
()
?
".."
:
""
)
/
"postProcessing"
/
functionObject
::
outputPrefix
/
mesh
.
pointsInstance
()
/
set
.
name
()
);
...
...
@@ -379,7 +380,7 @@ void Foam::mergeAndWrite
(
set
.
time
().
path
()
/
(
Pstream
::
parRun
()
?
".."
:
""
)
/
"postProcessing"
/
functionObject
::
outputPrefix
/
mesh
.
pointsInstance
()
/
set
.
name
()
);
...
...
@@ -483,7 +484,7 @@ void Foam::mergeAndWrite
(
set
.
time
().
path
()
/
(
Pstream
::
parRun
()
?
".."
:
""
)
/
"postProcessing"
/
functionObject
::
outputPrefix
/
mesh
.
pointsInstance
()
// set.name()
);
...
...
applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C
View file @
aec949d7
...
...
@@ -39,6 +39,7 @@ Description
#include
"vtkSurfaceWriter.H"
#include
"cyclicAMIPolyPatch.H"
#include
"PatchTools.H"
#include
"functionObject.H"
using
namespace
Foam
;
...
...
@@ -139,7 +140,7 @@ void writeWeights(const polyMesh& mesh)
mesh
,
ami
.
tgtWeightsSum
(),
cpp
.
neighbPatch
(),
"postProcessing"
,
functionObject
::
outputPrefix
,
"tgt"
,
tmName
);
...
...
@@ -148,7 +149,7 @@ void writeWeights(const polyMesh& mesh)
mesh
,
ami
.
srcWeightsSum
(),
cpp
,
"postProcessing"
,
functionObject
::
outputPrefix
,
"src"
,
tmName
);
...
...
applications/utilities/postProcessing/miscellaneous/profilingSummary/profilingSummary.C
View file @
aec949d7
...
...
@@ -44,6 +44,7 @@ Description
#include
"stringOps.H"
#include
"timeSelector.H"
#include
"IOobjectList.H"
#include
"functionObject.H"
using
namespace
Foam
;
...
...
@@ -149,7 +150,7 @@ int main(int argc, char *argv[])
// Name/location for the output summary
const
fileName
outputName
{
"postProcessing"
,
functionObject
::
outputPrefix
,
"profiling"
,
runTime
.
timeName
(),
profilingFileName
...
...
src/OpenFOAM/db/functionObjects/functionObject/functionObject.C
View file @
aec949d7
...
...
@@ -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 * * * * * * * * * * * //
...
...
src/OpenFOAM/db/functionObjects/functionObject/functionObject.H
View file @
aec949d7
...
...
@@ -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
;
...
...
src/OpenFOAM/db/functionObjects/writeFile/writeFile.C
View file @
aec949d7
...
...
@@ -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
...
...
src/OpenFOAM/db/functionObjects/writeFile/writeFile.H
View file @
aec949d7
...
...
@@ -117,9 +117,6 @@ private:
public:
//- Directory prefix
static
const
word
outputPrefix
;
//- Additional characters for writing
static
label
addChars
;
...
...
src/functionObjects/field/extractEulerianParticles/extractEulerianParticles/extractEulerianParticles.C
View file @
aec949d7
...
...
@@ -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
;
...
...
src/functionObjects/field/streamLine/streamLineBase.C
View file @
aec949d7
...
...
@@ -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
)
{
...
...
src/functionObjects/graphics/runTimePostProcessing/scene.C
View file @
aec949d7
...
...
@@ -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-201
7
OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015-201
8
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
);
...
...
src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.C
View file @
aec949d7
...
...
@@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include
"CloudFunctionObject.H"
#include
"functionObject.H"
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
...
...
@@ -56,8 +57,13 @@ Foam::CloudFunctionObject<CloudType>::CloudFunctionObject
CloudSubModelBase
<
CloudType
>
(
modelName
,
owner
,
dict
,
typeName
,
objectType
),
outputDir_
(
owner
.
mesh
().
time
().
path
())
{
const
fileName
relPath
=
"postProcessing"
/
cloud
::
prefix
/
owner
.
name
()
/
this
->
modelName
();
const
fileName
relPath
(
functionObject
::
outputPrefix
/
cloud
::
prefix
/
owner
.
name
()
/
this
->
modelName
()
);
if
(
Pstream
::
parRun
())
...
...
src/randomProcesses/noise/noiseModels/noiseModel/noiseModel.C
View file @
aec949d7
...
...
@@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include
"noiseModel.H"
#include
"functionObject.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
...
...
@@ -143,7 +144,7 @@ Foam::fileName Foam::noiseModel::baseFileDir(const label dataseti) const
word
datasetName
(
"input"
+
Foam
::
name
(
dataseti
));
baseDir
=
baseDir
.
expand
()
/
"postProcessing"
/
functionObject
::
outputPrefix
/
"noise"
/
outputPrefix_
/
type
()
...
...
src/sampling/probes/probes.C
View file @
aec949d7
...
...
@@ -202,7 +202,8 @@ Foam::label Foam::probes::prepare()
{
probeSubDir
=
probeSubDir
/
mesh_
.
name
();
}
probeSubDir
=
"postProcessing"
/
probeSubDir
/
mesh_
.
time
().
timeName
();
probeSubDir
=
functionObject
::
outputPrefix
/
probeSubDir
/
mesh_
.
time
().
timeName
();
if
(
Pstream
::
parRun
())
{
...
...
src/sampling/sampledSet/sampledSets/sampledSets.C
View file @
aec949d7
...
...
@@ -97,18 +97,22 @@ Foam::sampledSets::sampledSets
interpolationScheme_
(
word
::
null
),
writeFormat_
(
word
::
null
)
{
const
fileName
relPath
(
functionObject
::
outputPrefix
/
name
);
if
(
Pstream
::
parRun
())
{
outputPath_
=
mesh_
.
time
().
path
()
/
".."
/
"postProcessing"
/
name
;
outputPath_
=
mesh_
.
time
().
path
()
/
".."
/
relPath
;
}
else
{
outputPath_
=
mesh_
.
time
().
path
()
/
"postProcessing"
/
name
;
outputPath_
=
mesh_
.
time
().
path
()
/
relPath
;
}
if
(
mesh_
.
name
()
!=
fvMesh
::
defaultRegion
)
{
outputPath_
=
outputPath_
/
mesh_
.
name
();
}
outputPath_
.
clean
();
// Remove unneeded ".."
read
(
dict
);
...
...
@@ -132,18 +136,22 @@ Foam::sampledSets::sampledSets
interpolationScheme_
(
word
::
null
),
writeFormat_
(
word
::
null
)
{
const
fileName
relPath
(
functionObject
::
outputPrefix
/
name
);
if
(
Pstream
::
parRun
())
{
outputPath_
=
mesh_
.
time
().
path
()
/
".."
/
"postProcessing"
/
name
;
outputPath_
=
mesh_
.
time
().
path
()
/
".."
/
relPath
;
}
else
{
outputPath_
=
mesh_
.
time
().
path
()
/
"postProcessing"
/
name
;
outputPath_
=
mesh_
.
time
().
path
()
/
relPath
;
}
if
(
mesh_
.
name
()
!=
fvMesh
::
defaultRegion
)
{
outputPath_
=
outputPath_
/
mesh_
.
name
();
}
outputPath_
.
clean
();
// Remove unneeded ".."
read
(
dict
);
...
...
src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C
View file @
aec949d7
...
...
@@ -138,14 +138,17 @@ Foam::sampledSurfaces::sampledSurfaces
changedGeom_
(),
formatter_
(
nullptr
)
{
const
fileName
relPath
(
functionObject
::
outputPrefix
/
name
);
if
(
Pstream
::
parRun
())
{
outputPath_
=
mesh_
.
time
().
path
()
/
".."
/
"postProcessing"
/
name
;
outputPath_
=
mesh_
.
time
().
path
()
/
".."
/
relPath
;
}
else
{
outputPath_
=
mesh_
.
time
().
path
()
/
"postProcessing"
/
name
;
outputPath_
=
mesh_
.
time
().
path
()
/
relPath
;
}
outputPath_
.
clean
();
// Remove unneeded ".."
read
(
dict
);
...
...
@@ -174,14 +177,17 @@ Foam::sampledSurfaces::sampledSurfaces
{
read
(
dict
);
const
fileName
relPath
(
functionObject
::
outputPrefix
/
name
);
if
(
Pstream
::
parRun
())
{
outputPath_
=
time_
.
path
()
/
".."
/
"postProcessing"
/
name
;
outputPath_
=
time_
.
path
()
/
".."
/
relPath
;
}
else
{
outputPath_
=
time_
.
path
()
/
"postProcessing"
/
name
;
outputPath_
=
time_
.
path
()
/
relPath
;
}
outputPath_
.
clean
();
// Remove unneeded ".."
read
(
dict
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment