mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: TimePaths: allow '-case processor0' to use parent directory system/, constant/
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user