...
 
Commits (6)
# Do not track build information
build-info
# Do not track time-stamp
time-stamp
# Do not track any manifest files
Manifest.txt
manifest.txt
# META-INFO
Meta-information is for OpenFOAM internal use only.
(Backport from 1812)
api=1806
patch=190416
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1812 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object testDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
_FOAM_API $FOAM_API;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -318,6 +318,9 @@ Foam::vtkPVFoam::vtkPVFoam
fullCasePath = cwd();
}
// OPENFOAM API
setEnv("FOAM_API", std::to_string(OPENFOAM), true);
// The name of the executable, unless already present in the environment
setEnv("FOAM_EXECUTABLE", "paraview", false);
......
......@@ -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.
......@@ -206,6 +206,9 @@ Foam::vtkPVblockMesh::vtkPVblockMesh
fullCasePath = cwd();
}
// OPENFOAM API
setEnv("FOAM_API", std::to_string(OPENFOAM), true);
// The name of the executable, unless already present in the environment
setEnv("FOAM_EXECUTABLE", "paraview", false);
......
......@@ -3,9 +3,11 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd.
# \\ / A nd | Copyright (C) 2008-2011, 2017-2018 OpenCFD Ltd.
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# | Copyright (C) 2011-2016 OpenFOAM Foundation
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
......@@ -63,6 +65,8 @@ options:
-config Add config directory prefix for shell type:
with -csh* for a config.csh/ prefix
with -sh* for a config.sh/ prefix
-show-api Print api value from wmake/rules, or meta-info and exit
-show-patch Print patch value from meta-info and exit
-quiet (-q) Suppress all normal output
-silent (-s) Suppress stderr, except -csh-verbose, -sh-verbose output
-help Print the usage
......@@ -184,6 +188,62 @@ setVersion()
}
#-------------------------------------------------------------------------------
# The API locations. See wmake/wmakeBuildInfo
rulesFile="$projectDir/wmake/rules/General/general"
metaInfoDir="$projectDir/META-INFO"
# Get api from rules/General/general
#
# Failure modes:
# - No api information (can't find file etc).
# -> Fatal for building, but could be OK for a stripped down version
#
# Fallback. Get from api-info
#
getApi()
{
local value
value="$(sed -ne '/^ *#/!{ /WM_VERSION.*OPENFOAM=/{ s@^.*OPENFOAM= *\([0-9][0-9]*\).*@\1@p; q }}' $rulesFile 2>/dev/null)"
if [ -z "$value" ] && [ -f "$metaInfoDir/api-info" ]
then
# Fallback. Get from api-info
value="$(sed -ne 's@^ *api *= *\([0-9][0-9]*\).*@\1@p' $metaInfoDir/api-info 2>/dev/null)"
fi
if [ -n "$value" ]
then
echo "$value"
else
return 1
fi
}
# Get patch from meta-info / api-info
#
# Failure modes:
# - No patch information (can't find file etc).
#
getPatchLevel()
{
local value
# Fallback. Get from api-info
value="$(sed -ne 's@^ *patch *= *\([0-9][0-9]*\).*@\1@p' $metaInfoDir/api-info 2>/dev/null)"
if [ -n "$value" ]
then
echo "$value"
else
return 1
fi
}
#-------------------------------------------------------------------------------
optMode=ugo # Default mode is always 'ugo'
unset shellOutput verboseOutput
unset optAll optConfig optList optVersion
......@@ -195,6 +255,16 @@ do
-h | -help*)
printHelp
;;
-show-api)
# Show API and exit
getApi
exit $?
;;
-show-patch)
# Show patch level and exit
getPatchLevel
exit $?
;;
-a | -all)
optAll=true
unset shellOutput verboseOutput
......
......@@ -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) 2016-2017 OpenCFD Ltd.
# \\/ M anipulation | Copyright (C) 2016-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
......@@ -71,6 +71,7 @@ unsetenv WM_THIRD_PARTY_DIR
#------------------------------------------------------------------------------
# Unset FOAM_* environment variables
unsetenv FOAM_API
unsetenv FOAM_APPBIN
unsetenv FOAM_APP
unsetenv FOAM_CODE_TEMPLATES
......
......@@ -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) 2016-2018 OpenCFD Ltd.
# \\/ M anipulation | Copyright (C) 2016-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
......@@ -62,6 +62,7 @@ unset WM_THIRD_PARTY_DIR
#------------------------------------------------------------------------------
# Unset FOAM_* environment variables
unset FOAM_API
unset FOAM_APPBIN
unset FOAM_APP
unset FOAM_CODE_TEMPLATES
......
......@@ -660,6 +660,9 @@ void Foam::argList::getRootCase()
// The name of the executable, unless already present in the environment
setEnv("FOAM_EXECUTABLE", executable_, false);
// OPENFOAM API
setEnv("FOAM_API", std::to_string(OPENFOAM), true);
// Set the case and case-name as an environment variable
if (rootPath_.isAbsolute())
{
......
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2016-2019 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -57,6 +57,8 @@ Description
may be present for some solvers or utilities.
Environment variables set by argList or by Time:
- \par FOAM_API
The value of the OPENFOAM compiler define
- \par FOAM_CASE
The path of the global case.
It is the same for serial and parallel jobs.
......
......@@ -466,8 +466,6 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::usesSf() const
case opSum:
case opSumMag:
case opAverage:
case opSumDirection:
case opSumDirectionBalance:
{
return false;
}
......
......@@ -157,8 +157,10 @@ bool Foam::functionObjects::runTimePostProcessing::write()
auto renderWindow = vtkSmartPointer<vtkRenderWindow>::New();
renderWindow->OffScreenRenderingOn();
renderWindow->SetSize(output_.width_, output_.height_);
#if (VTK_MAJOR_VERSION < 9)
renderWindow->SetAAFrames(10); // Legacy rendering
// Legacy rendering - was deprecated for 8.1.0
#if (VTK_MAJOR_VERSION < 8) || \
((VTK_MAJOR_VERSION == 8) && (VTK_MINOR_VERSION < 2))
renderWindow->SetAAFrames(10);
#endif
renderWindow->SetAlphaBitPlanes(true);
renderWindow->SetMultiSamples(0);
......
......@@ -76,7 +76,7 @@ Foam::injectedParticle::injectedParticle
}
else
{
is.read(reinterpret_cast<char*>(&soi_), sizeofFields);
is.read(reinterpret_cast<char*>(&tag_), sizeofFields);
}
}
......
......@@ -532,6 +532,8 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::reduceRegions
// Buffer for swapping boundary information
labelList nbrRegion(mesh().nFaces()-mesh().nInternalFaces());
bool emitWarning = true;
do
{
if (debug)
......@@ -597,9 +599,22 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::reduceRegions
const label sent = localToGlobal[orig];
const label recv = patchNbrRegion[patchFacei];
// Record the minimum value seen
if (recv < sent)
if (recv == UNASSIGNED)
{
if (emitWarning)
{
Pout<<"Warning in regionSplit:"
" received unassigned on "
<< pp.name() << " at patchFace "
<< patchFacei
<< ". Check synchronisation in caller"
<< nl;
}
}
else if (recv < sent)
{
// Record the minimum value seen
auto fnd = updateLookup.find(sent);
if (!fnd.found())
{
......@@ -644,6 +659,7 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::reduceRegions
<< " local regions" << endl;
}
emitWarning = false;
// Continue until there are no further changes
}
while (returnReduce(!updateLookup.empty(), orOp<bool>()));
......