Skip to content
Snippets Groups Projects
Commit bda95a48 authored by Mark Olesen's avatar Mark Olesen
Browse files

Export new environment variable FOAM_CASENAME

- contains the name part of the FOAM_CASE environment variable
parent f1fe6d5d
Branches
Tags
No related merge requests found
......@@ -145,6 +145,8 @@
+ The *new* =readList(Istream&)= can read a bracket-delimited list or handle
a single value as a list of size 1. This can be a useful convenience when
processing command-line options.
+ Export *new* environment variable =FOAM_CASENAME= that contains the
name part of the =FOAM_CASE= environment variable
*** Misc. improvements
+ Improved consistency and interoperability between =face= and =triFace= classes.
......
......@@ -261,11 +261,15 @@ Foam::vtkPV3Foam::vtkPV3Foam
// Set the case as an environment variable - some BCs might use this
if (fullCasePath.name().find("processor", 0) == 0)
{
setEnv("FOAM_CASE", fullCasePath.path(), true);
const fileName globalCase = fullCasePath.path();
setEnv("FOAM_CASE", globalCase, true);
setEnv("FOAM_CASENAME", globalCase.name(), true);
}
else
{
setEnv("FOAM_CASE", fullCasePath, true);
setEnv("FOAM_CASENAME", fullCasePath.name(), true);
}
// look for 'case{region}.OpenFOAM'
......@@ -299,6 +303,7 @@ Foam::vtkPV3Foam::vtkPV3Foam
{
Info<< "fullCasePath=" << fullCasePath << nl
<< "FOAM_CASE=" << getEnv("FOAM_CASE") << nl
<< "FOAM_CASENAME=" << getEnv("FOAM_CASENAME") << nl
<< "region=" << meshRegion_ << endl;
}
......
......@@ -522,8 +522,9 @@ Foam::argList::argList
}
jobInfo.write();
// Set the case as an environment variable
// Set the case and case-name as an environment variable
setEnv("FOAM_CASE", 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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment