Commit 4b7ace55 authored by Mark Olesen's avatar Mark Olesen

ENH: export FOAM_API in dictionary (issue #1158)

- uses the value of foamVersion::api, which should be reliable.
parent 1be9b800
...@@ -30,6 +30,7 @@ License ...@@ -30,6 +30,7 @@ License
#include "areaFaMesh.H" #include "areaFaMesh.H"
#include "faMesh.H" #include "faMesh.H"
#include "fvMesh.H" #include "fvMesh.H"
#include "foamVersion.H"
#include "Time.H" #include "Time.H"
#include "patchZones.H" #include "patchZones.H"
#include "IOobjectList.H" #include "IOobjectList.H"
...@@ -314,6 +315,9 @@ Foam::vtkPVFoam::vtkPVFoam ...@@ -314,6 +315,9 @@ Foam::vtkPVFoam::vtkPVFoam
fullCasePath = cwd(); fullCasePath = cwd();
} }
// OPENFOAM API
setEnv("FOAM_API", std::to_string(foamVersion::api), true);
// The name of the executable, unless already present in the environment // The name of the executable, unless already present in the environment
setEnv("FOAM_EXECUTABLE", "paraview", false); setEnv("FOAM_EXECUTABLE", "paraview", false);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2017-2019 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -29,6 +29,7 @@ License ...@@ -29,6 +29,7 @@ License
// OpenFOAM includes // OpenFOAM includes
#include "blockMesh.H" #include "blockMesh.H"
#include "blockMeshTools.H" #include "blockMeshTools.H"
#include "foamVersion.H"
#include "Time.H" #include "Time.H"
#include "patchZones.H" #include "patchZones.H"
#include "StringStream.H" #include "StringStream.H"
...@@ -206,6 +207,9 @@ Foam::vtkPVblockMesh::vtkPVblockMesh ...@@ -206,6 +207,9 @@ Foam::vtkPVblockMesh::vtkPVblockMesh
fullCasePath = cwd(); fullCasePath = cwd();
} }
// OPENFOAM API
setEnv("FOAM_API", std::to_string(foamVersion::api), true);
// The name of the executable, unless already present in the environment // The name of the executable, unless already present in the environment
setEnv("FOAM_EXECUTABLE", "paraview", false); setEnv("FOAM_EXECUTABLE", "paraview", false);
......
Markdown is supported
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