mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -129,14 +129,18 @@ void Foam::argList::getRootCase()
|
||||
casePath = iter();
|
||||
casePath.removeRepeated('/');
|
||||
casePath.removeTrailing('/');
|
||||
|
||||
// handle degenerate form and '-case .' like no -case specified
|
||||
if (casePath.empty() || casePath == ".")
|
||||
{
|
||||
casePath = cwd();
|
||||
options_.erase("case");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// nothing specified, use the current dir
|
||||
casePath = cwd();
|
||||
|
||||
// we could add this back in as '-case'?
|
||||
// options_.set("case", casePath);
|
||||
}
|
||||
|
||||
rootPath_ = casePath.path();
|
||||
@ -522,8 +526,25 @@ Foam::argList::argList
|
||||
}
|
||||
jobInfo.write();
|
||||
|
||||
// Set the case as an environment variable
|
||||
setEnv("FOAM_CASE", rootPath_/globalCase_, true);
|
||||
|
||||
// Set the case and case-name as an environment variable
|
||||
if (rootPath_[0] == '/')
|
||||
{
|
||||
// absolute path
|
||||
setEnv("FOAM_CASE", rootPath_/globalCase_, true);
|
||||
}
|
||||
else if (rootPath_ == ".")
|
||||
{
|
||||
// relative to the current working directory
|
||||
setEnv("FOAM_CASE", cwd()/globalCase_, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// qualify relative path
|
||||
setEnv("FOAM_CASE", cwd()/rootPath_/globalCase_, true);
|
||||
}
|
||||
setEnv("FOAM_CASENAME", globalCase_, true);
|
||||
|
||||
|
||||
// Switch on signal trapping. We have to wait until after Pstream::init
|
||||
// since this sets up its own ones.
|
||||
|
||||
@ -54,6 +54,8 @@ Description
|
||||
|
||||
The environment variable @b FOAM_CASE is set to the path of the
|
||||
global case (same for serial and parallel jobs).
|
||||
The environment variable @b FOAM_CASENAME is set to the name of the
|
||||
global case.
|
||||
|
||||
Note
|
||||
- Adjustment of the valid (mandatory) arguments
|
||||
|
||||
@ -5,6 +5,8 @@ linearValveFvMesh/linearValveFvMesh.C
|
||||
linearValveLayersFvMesh/linearValveLayersFvMesh.C
|
||||
*/
|
||||
movingConeTopoFvMesh/movingConeTopoFvMesh.C
|
||||
/*
|
||||
mixerFvMesh/mixerFvMesh.C
|
||||
*/
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libtopoChangerFvMesh
|
||||
|
||||
Reference in New Issue
Block a user