From 4b7ace550669ea27e167ac6bbe268eed155806b8 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 7 Jan 2019 19:04:50 +0100 Subject: [PATCH] ENH: export FOAM_API in dictionary (issue #1158) - uses the value of foamVersion::api, which should be reliable. --- src/paraview-plugins/vtkPVFoam/vtkPVFoam.C | 4 ++++ src/paraview-plugins/vtkPVblockMesh/vtkPVblockMesh.C | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/paraview-plugins/vtkPVFoam/vtkPVFoam.C b/src/paraview-plugins/vtkPVFoam/vtkPVFoam.C index 7603478..2e6850c 100644 --- a/src/paraview-plugins/vtkPVFoam/vtkPVFoam.C +++ b/src/paraview-plugins/vtkPVFoam/vtkPVFoam.C @@ -30,6 +30,7 @@ License #include "areaFaMesh.H" #include "faMesh.H" #include "fvMesh.H" +#include "foamVersion.H" #include "Time.H" #include "patchZones.H" #include "IOobjectList.H" @@ -314,6 +315,9 @@ Foam::vtkPVFoam::vtkPVFoam fullCasePath = cwd(); } + // OPENFOAM API + setEnv("FOAM_API", std::to_string(foamVersion::api), true); + // The name of the executable, unless already present in the environment setEnv("FOAM_EXECUTABLE", "paraview", false); diff --git a/src/paraview-plugins/vtkPVblockMesh/vtkPVblockMesh.C b/src/paraview-plugins/vtkPVblockMesh/vtkPVblockMesh.C index 6a9037c..efec807 100644 --- a/src/paraview-plugins/vtkPVblockMesh/vtkPVblockMesh.C +++ b/src/paraview-plugins/vtkPVblockMesh/vtkPVblockMesh.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2017-2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -29,6 +29,7 @@ License // OpenFOAM includes #include "blockMesh.H" #include "blockMeshTools.H" +#include "foamVersion.H" #include "Time.H" #include "patchZones.H" #include "StringStream.H" @@ -206,6 +207,9 @@ Foam::vtkPVblockMesh::vtkPVblockMesh fullCasePath = cwd(); } + // OPENFOAM API + setEnv("FOAM_API", std::to_string(foamVersion::api), true); + // The name of the executable, unless already present in the environment setEnv("FOAM_EXECUTABLE", "paraview", false); -- GitLab