STYLE: use globalPath() instead of path()/".." for parallel

This commit is contained in:
Mark Olesen
2018-12-05 22:54:50 +01:00
parent d3a2544bfa
commit a199fef957
7 changed files with 53 additions and 89 deletions

View File

@ -97,16 +97,10 @@ Foam::sampledSets::sampledSets
interpolationScheme_(word::null),
writeFormat_(word::null)
{
const fileName relPath(functionObject::outputPrefix/name);
if (Pstream::parRun())
{
outputPath_ = mesh_.time().path()/".."/relPath;
}
else
{
outputPath_ = mesh_.time().path()/relPath;
}
outputPath_ =
(
mesh_.time().globalPath()/functionObject::outputPrefix/name
);
if (mesh_.name() != fvMesh::defaultRegion)
{
@ -136,16 +130,10 @@ Foam::sampledSets::sampledSets
interpolationScheme_(word::null),
writeFormat_(word::null)
{
const fileName relPath(functionObject::outputPrefix/name);
if (Pstream::parRun())
{
outputPath_ = mesh_.time().path()/".."/relPath;
}
else
{
outputPath_ = mesh_.time().path()/relPath;
}
outputPath_ =
(
mesh_.time().globalPath()/functionObject::outputPrefix/name
);
if (mesh_.name() != fvMesh::defaultRegion)
{