mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Time: pass in case name from argList
This commit is contained in:
@ -384,18 +384,11 @@ 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
|
||||
|
||||
@ -80,7 +80,29 @@ Foam::TimePaths::TimePaths
|
||||
case_(caseName),
|
||||
system_(systemName),
|
||||
constant_(constantName)
|
||||
{}
|
||||
{
|
||||
if (!processorCase)
|
||||
{
|
||||
// For convenience: find out from case name whether it is a
|
||||
// processor directory and set processorCase flag so file searching
|
||||
// goes up one level.
|
||||
std::string::size_type pos = caseName.find("processor");
|
||||
|
||||
if (pos != string::npos)
|
||||
{
|
||||
processorCase_ = true;
|
||||
|
||||
if (pos == 0)
|
||||
{
|
||||
globalCaseName_ = ".";
|
||||
}
|
||||
else
|
||||
{
|
||||
globalCaseName_ = caseName(pos-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Reference in New Issue
Block a user