ENH: add globalPath() to argList and TimePaths

- simply combines (rootPath()/globalCaseName())
This commit is contained in:
Mark Olesen
2018-09-28 15:24:59 +02:00
parent d92d77cc84
commit 69f6f63810
12 changed files with 28 additions and 13 deletions

View File

@ -64,7 +64,7 @@ class TimePaths
const word constant_;
// Private Member functions
// Private Member Functions
//- Determine from case name whether it is a processor directory
bool detectProcessorCase();
@ -105,7 +105,7 @@ public:
);
// Member functions
// Member Functions
//- Return true if this is a processor case
bool processorCase() const
@ -164,12 +164,18 @@ public:
//- \c ../constant() for parallel runs.
fileName caseConstant() const;
//- Return path
//- Return path for the case
fileName path() const
{
return rootPath()/caseName();
}
//- Return global path for the case
fileName globalPath() const
{
return rootPath()/globalCaseName();
}
//- Return system path
fileName systemPath() const
{

View File

@ -293,7 +293,7 @@ public:
//- Return case name (parallel run) or global case (serial run)
inline const fileName& caseName() const;
//- Return case name
//- Return global case name
inline const fileName& globalCaseName() const;
//- Return parRunControl
@ -302,6 +302,9 @@ public:
//- Return the path to the caseName
inline fileName path() const;
//- Return the path to the globalCaseName
inline fileName globalPath() const;
//- Return the number of arguments
inline label size() const;

View File

@ -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
{
return args_.size();

View File

@ -214,7 +214,7 @@ bool Foam::functionObjects::ensightWrite::write()
fileName ensightDir = dirName_;
if (!ensightDir.isAbsolute())
{
ensightDir = t.rootPath()/t.globalCaseName()/ensightDir;
ensightDir = t.globalPath()/ensightDir;
}
ensCase_.reset

View File

@ -278,7 +278,7 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
{
const Time& runTime = boundaryMesh().mesh().time();
fileName dir(runTime.rootPath()/runTime.globalCaseName());
fileName dir(runTime.globalPath());
fileName postfix("_" + runTime.timeName()+"_expanded.obj");
ownStr.reset(new OBJstream(dir/name() + postfix));