Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev

This commit is contained in:
andy
2009-07-23 17:09:22 +01:00
17 changed files with 138 additions and 65 deletions

View File

@ -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.

View File

@ -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

View File

@ -5,6 +5,8 @@ linearValveFvMesh/linearValveFvMesh.C
linearValveLayersFvMesh/linearValveLayersFvMesh.C
*/
movingConeTopoFvMesh/movingConeTopoFvMesh.C
/*
mixerFvMesh/mixerFvMesh.C
*/
LIB = $(FOAM_LIBBIN)/libtopoChangerFvMesh