mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add globalPath() to argList and TimePaths
- simply combines (rootPath()/globalCaseName())
This commit is contained in:
@ -8,7 +8,7 @@ if (Pstream::master())
|
|||||||
(
|
(
|
||||||
new OFstream
|
new OFstream
|
||||||
(
|
(
|
||||||
runTime.rootPath()/runTime.globalCaseName()
|
runTime.globalPath()
|
||||||
/("logSummary." + runTime.timeName() + ".dat")
|
/("logSummary." + runTime.timeName() + ".dat")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -8,7 +8,7 @@ if (Pstream::master())
|
|||||||
(
|
(
|
||||||
new OFstream
|
new OFstream
|
||||||
(
|
(
|
||||||
runTime.rootPath()/runTime.globalCaseName()
|
runTime.globalPath()
|
||||||
/("logSummary." + runTime.timeName() + ".dat")
|
/("logSummary." + runTime.timeName() + ".dat")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -525,7 +525,7 @@ void extractSurface
|
|||||||
fileName globalCasePath
|
fileName globalCasePath
|
||||||
(
|
(
|
||||||
runTime.processorCase()
|
runTime.processorCase()
|
||||||
? runTime.path()/".."/outFileName
|
? runTime.globalPath()/outFileName
|
||||||
: runTime.path()/outFileName
|
: runTime.path()/outFileName
|
||||||
);
|
);
|
||||||
globalCasePath.clean();
|
globalCasePath.clean();
|
||||||
|
|||||||
@ -2451,7 +2451,7 @@ int main(int argc, char *argv[])
|
|||||||
<< " on all processors" << nl << endl;
|
<< " on all processors" << nl << endl;
|
||||||
instantList timeDirs;
|
instantList timeDirs;
|
||||||
|
|
||||||
const fileName basePath(args.rootPath()/args.globalCaseName());
|
const fileName basePath(args.globalPath());
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -225,7 +225,7 @@ int main(int argc, char *argv[])
|
|||||||
fileName ensightDir = args.lookupOrDefault<word>("name", "EnSight");
|
fileName ensightDir = args.lookupOrDefault<word>("name", "EnSight");
|
||||||
if (!ensightDir.isAbsolute())
|
if (!ensightDir.isAbsolute())
|
||||||
{
|
{
|
||||||
ensightDir = args.rootPath()/args.globalCaseName()/ensightDir;
|
ensightDir = args.globalPath()/ensightDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -194,7 +194,7 @@ int main(int argc, char *argv[])
|
|||||||
fileName ensightDir = args.lookupOrDefault<word>("name", "Ensight");
|
fileName ensightDir = args.lookupOrDefault<word>("name", "Ensight");
|
||||||
if (!ensightDir.isAbsolute())
|
if (!ensightDir.isAbsolute())
|
||||||
{
|
{
|
||||||
ensightDir = args.rootPath()/args.globalCaseName()/ensightDir;
|
ensightDir = args.globalPath()/ensightDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@ -411,7 +411,7 @@ int main(int argc, char *argv[])
|
|||||||
? outFileName
|
? outFileName
|
||||||
: (
|
: (
|
||||||
runTime.processorCase()
|
runTime.processorCase()
|
||||||
? runTime.rootPath()/runTime.globalCaseName()/outFileName
|
? runTime.globalPath()/outFileName
|
||||||
: runTime.path()/outFileName
|
: runTime.path()/outFileName
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -64,7 +64,7 @@ class TimePaths
|
|||||||
const word constant_;
|
const word constant_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Determine from case name whether it is a processor directory
|
//- Determine from case name whether it is a processor directory
|
||||||
bool detectProcessorCase();
|
bool detectProcessorCase();
|
||||||
@ -105,7 +105,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return true if this is a processor case
|
//- Return true if this is a processor case
|
||||||
bool processorCase() const
|
bool processorCase() const
|
||||||
@ -164,12 +164,18 @@ public:
|
|||||||
//- \c ../constant() for parallel runs.
|
//- \c ../constant() for parallel runs.
|
||||||
fileName caseConstant() const;
|
fileName caseConstant() const;
|
||||||
|
|
||||||
//- Return path
|
//- Return path for the case
|
||||||
fileName path() const
|
fileName path() const
|
||||||
{
|
{
|
||||||
return rootPath()/caseName();
|
return rootPath()/caseName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Return global path for the case
|
||||||
|
fileName globalPath() const
|
||||||
|
{
|
||||||
|
return rootPath()/globalCaseName();
|
||||||
|
}
|
||||||
|
|
||||||
//- Return system path
|
//- Return system path
|
||||||
fileName systemPath() const
|
fileName systemPath() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -293,7 +293,7 @@ public:
|
|||||||
//- Return case name (parallel run) or global case (serial run)
|
//- Return case name (parallel run) or global case (serial run)
|
||||||
inline const fileName& caseName() const;
|
inline const fileName& caseName() const;
|
||||||
|
|
||||||
//- Return case name
|
//- Return global case name
|
||||||
inline const fileName& globalCaseName() const;
|
inline const fileName& globalCaseName() const;
|
||||||
|
|
||||||
//- Return parRunControl
|
//- Return parRunControl
|
||||||
@ -302,6 +302,9 @@ public:
|
|||||||
//- Return the path to the caseName
|
//- Return the path to the caseName
|
||||||
inline fileName path() const;
|
inline fileName path() const;
|
||||||
|
|
||||||
|
//- Return the path to the globalCaseName
|
||||||
|
inline fileName globalPath() const;
|
||||||
|
|
||||||
//- Return the number of arguments
|
//- Return the number of arguments
|
||||||
inline label size() const;
|
inline label size() const;
|
||||||
|
|
||||||
|
|||||||
@ -87,6 +87,12 @@ inline Foam::fileName Foam::argList::path() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::fileName Foam::argList::globalPath() const
|
||||||
|
{
|
||||||
|
return rootPath()/globalCaseName();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::label Foam::argList::size() const
|
inline Foam::label Foam::argList::size() const
|
||||||
{
|
{
|
||||||
return args_.size();
|
return args_.size();
|
||||||
|
|||||||
@ -214,7 +214,7 @@ bool Foam::functionObjects::ensightWrite::write()
|
|||||||
fileName ensightDir = dirName_;
|
fileName ensightDir = dirName_;
|
||||||
if (!ensightDir.isAbsolute())
|
if (!ensightDir.isAbsolute())
|
||||||
{
|
{
|
||||||
ensightDir = t.rootPath()/t.globalCaseName()/ensightDir;
|
ensightDir = t.globalPath()/ensightDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
ensCase_.reset
|
ensCase_.reset
|
||||||
|
|||||||
@ -278,7 +278,7 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
|||||||
{
|
{
|
||||||
const Time& runTime = boundaryMesh().mesh().time();
|
const Time& runTime = boundaryMesh().mesh().time();
|
||||||
|
|
||||||
fileName dir(runTime.rootPath()/runTime.globalCaseName());
|
fileName dir(runTime.globalPath());
|
||||||
fileName postfix("_" + runTime.timeName()+"_expanded.obj");
|
fileName postfix("_" + runTime.timeName()+"_expanded.obj");
|
||||||
|
|
||||||
ownStr.reset(new OBJstream(dir/name() + postfix));
|
ownStr.reset(new OBJstream(dir/name() + postfix));
|
||||||
|
|||||||
Reference in New Issue
Block a user