BUG: TimePaths: allow '-case processor0' to use parent directory system/, constant/

This commit is contained in:
mattijs
2013-09-16 15:35:32 +01:00
parent 12d87fcacc
commit 051676fdb4
2 changed files with 20 additions and 3 deletions

View File

@ -384,11 +384,18 @@ Foam::Time::Time
const word& constantName
)
:
//TimePaths
//(
// args.parRunControl().parRun(),
// args.rootPath(),
// args.globalCaseName(),
// args.caseName(),
// systemName,
// constantName
//),
TimePaths
(
args.parRunControl().parRun(),
args.rootPath(),
args.globalCaseName(),
args.caseName(),
systemName,
constantName

View File

@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "TimePaths.H"
#include "IOstreams.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -41,11 +42,20 @@ Foam::TimePaths::TimePaths
system_(systemName),
constant_(constantName)
{
// Find out from case name whether a processor directory
std::string::size_type pos = caseName.find("processor");
if (pos != string::npos)
{
processorCase_ = true;
globalCaseName_ = caseName(pos-1);
if (pos == 0)
{
globalCaseName_ = ".";
}
else
{
globalCaseName_ = caseName(pos-1);
}
}
else
{