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

@ -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())
{

View File

@ -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);

View File

@ -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);