mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use globalPath() instead of path()/".." for parallel
This commit is contained in:
@ -195,26 +195,24 @@ Foam::label Foam::probes::prepare()
|
||||
<< endl;
|
||||
|
||||
|
||||
fileName probeDir;
|
||||
fileName probeSubDir = name();
|
||||
|
||||
if (mesh_.name() != polyMesh::defaultRegion)
|
||||
{
|
||||
probeSubDir = probeSubDir/mesh_.name();
|
||||
}
|
||||
probeSubDir =
|
||||
functionObject::outputPrefix/probeSubDir/mesh_.time().timeName();
|
||||
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
// Put in undecomposed case
|
||||
// (Note: gives problems for distributed data running)
|
||||
probeDir = mesh_.time().path()/".."/probeSubDir;
|
||||
}
|
||||
else
|
||||
{
|
||||
probeDir = mesh_.time().path()/probeSubDir;
|
||||
}
|
||||
// Put in undecomposed case
|
||||
// (Note: gives problems for distributed data running)
|
||||
|
||||
fileName probeDir =
|
||||
(
|
||||
mesh_.time().globalPath()
|
||||
/ functionObject::outputPrefix
|
||||
/ probeSubDir
|
||||
/ mesh_.time().timeName()
|
||||
);
|
||||
|
||||
probeDir.clean(); // Remove unneeded ".."
|
||||
|
||||
// ignore known fields, close streams for fields that no longer exist
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user