diff --git a/applications/test/objectRegistry/Make/files b/applications/test/objectRegistry/Make/files
new file mode 100644
index 0000000000..b7c477f791
--- /dev/null
+++ b/applications/test/objectRegistry/Make/files
@@ -0,0 +1,3 @@
+Test-objectRegistry.C
+
+EXE = $(FOAM_USER_APPBIN)/Test-objectRegistry
diff --git a/applications/test/objectRegistry/Make/options b/applications/test/objectRegistry/Make/options
new file mode 100644
index 0000000000..6a9e9810b3
--- /dev/null
+++ b/applications/test/objectRegistry/Make/options
@@ -0,0 +1,2 @@
+/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */
+/* EXE_LIBS = -lfiniteVolume */
diff --git a/applications/test/objectRegistry/Test-objectRegistry.C b/applications/test/objectRegistry/Test-objectRegistry.C
new file mode 100644
index 0000000000..c807ba9c04
--- /dev/null
+++ b/applications/test/objectRegistry/Test-objectRegistry.C
@@ -0,0 +1,278 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+Application
+ Test-objectRegistry
+
+Description
+ Simple test of objectRegistry functionality.
+ Particular focus on the behaviour of subRegistry.
+
+\*---------------------------------------------------------------------------*/
+
+#include "argList.H"
+#include "Time.H"
+#include "polyMesh.H"
+#include "IOstreams.H"
+#include "objectRegistry.H"
+#include "hashedWordList.H"
+
+using namespace Foam;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// file variable, needed for switching the default in lookupObject etc.
+bool recursive = false;
+
+
+template
+Foam::Ostream& printList(Foam::Ostream& os, const UList& list)
+{
+ // list with out any linebreaks
+ os << '(';
+ forAll(list, i)
+ {
+ if (i) os << ' ';
+ os << list[i];
+ }
+ os << ')';
+
+ return os;
+}
+
+
+void printRegistry
+(
+ Foam::Ostream& os,
+ const Foam::objectRegistry& obr,
+ Foam::label indent = 4
+);
+
+
+void printRegistry
+(
+ Foam::Ostream& os,
+ const Foam::objectRegistry& obr,
+ Foam::label indent
+)
+{
+ hashedWordList regs = obr.names();
+ regs.sort();
+ wordList names = obr.sortedNames();
+
+ std::string prefix;
+ for (label i=indent; i; --i)
+ {
+ prefix += ' ';
+ }
+
+ os << '#' << prefix.c_str() << obr.name()
+ << " parent:" << obr.parent().name() << nl;
+
+ // all names
+ {
+ os << ' ' << prefix.c_str() << "objects: ";
+ printList(os, names) << nl;
+ }
+
+ // sub-registry names
+ {
+ os << ' ' << prefix.c_str() << "registries: ";
+ printList(os, regs) << nl;
+ }
+
+ // Print, but skip expansion of sub-registries for now
+ forAll(names, i)
+ {
+ const word& name = names[i];
+
+ os << (regs.found(name) ? '-' : ' ')
+ << prefix.c_str() << name << " => " << obr[name]->type() << nl;
+ }
+ for (label i=indent; i; --i)
+ {
+ os << '-'; // divider
+ }
+ os << '\n';
+
+ // Now descend into the sub-registries
+ forAll(regs, i)
+ {
+ const word& name = regs[i];
+ const objectRegistry& next = obr.lookupObject
+ (
+ name
+ );
+
+ os << prefix.c_str()
+ << "current:" << obr.name() << " next:"
+ << next.name() << " next-parent:" << next.parent().name() << nl;
+
+ os << prefix.c_str() << name << " => " << obr[name]->type();
+
+ if ("dictionary" == obr[name]->type())
+ {
+ os << " (skip dictionary)" << nl;
+ }
+ else
+ {
+ os << nl;
+ printRegistry(os, next, indent + 4);
+ }
+ }
+}
+
+// Main program:
+
+int main(int argc, char *argv[])
+{
+ argList::noBanner();
+ argList::noParallel();
+ argList::addBoolOption
+ (
+ "mesh",
+ "test with polyMesh objectRegistry instead of runTime"
+ );
+ argList::addBoolOption
+ (
+ "skip",
+ "skip some parts"
+ );
+ // argList::validArgs.append("recursive (true|false)");
+
+ #include "setRootCase.H"
+ #include "createTime.H"
+ #include "createPolyMesh.H"
+
+ // recursive = Switch(args[1]);
+
+ const bool optMesh = args.optionFound("mesh");
+ const bool optSkip = args.optionFound("skip");
+ const objectRegistry& db = (optMesh ? mesh.thisDb() : runTime);
+
+ Info<<"## start ##" << nl;
+ printRegistry(Info, db);
+ Info<< nl;
+
+ const label nRegs = 3;
+
+ // Add some items
+ for (label j = 0; j < 3; ++j)
+ {
+ word entryName = "entry" + name(j);
+ db.subRegistry
+ (
+ entryName,
+ true
+ );
+ }
+
+ Info<<"## initally populated ##" << nl;
+ printRegistry(Info, db);
+ Info<< nl;
+
+
+ // create a few sub-registries
+ for (label i = 0; i < nRegs; ++i)
+ {
+ word regName = "subreg" + name(i);
+
+ const objectRegistry& subreg = db.subRegistry
+ (
+ regName,
+ true
+ );
+
+ for (label j = 0; j < 3; ++j)
+ {
+ word entryName = "entry" + name(j);
+
+ subreg.subRegistry
+ (
+ entryName,
+ true
+ );
+ subreg.subRegistry
+ (
+ "$" + entryName, // qualified to avoid collisions
+ true
+ );
+ }
+ }
+
+ Info<<"## after adding sub-registries" << nl;
+ printRegistry(Info, db);
+ Info<< nl;
+
+ // Add further items into top-level
+ for (label j = 0; j < 6; ++j)
+ {
+ word entryName = "entry" + name(j);
+ db.subRegistry
+ (
+ entryName,
+ true
+ );
+ }
+
+ Info<< "after adding some entries, top-level now contains: ";
+ printList(Info, db.names()) << endl;
+
+ Info<<"## Now attempt to add a few more entries ##" << nl;
+
+ // Try adding the same items into sub registry
+ // create a few sub-registries
+ for (label i = 0; i < nRegs; ++i)
+ {
+ word regName = "subreg" + name(i);
+
+ const objectRegistry& subreg = db.subRegistry
+ (
+ regName,
+ false
+ );
+
+ if (!optSkip)
+ {
+ for (label j = 0; j < 6; ++j)
+ {
+ word entryName = "entry" + name(j);
+
+ subreg.subRegistry
+ (
+ entryName,
+ true
+ );
+ }
+ }
+ }
+
+ Info<<"## Complete picture ##" << nl;
+ printRegistry(Info, db);
+ Info<< nl;
+
+ return 0;
+}
+
+
+// ************************************************************************* //
diff --git a/applications/utilities/mesh/generation/blockMesh/blockMesh.C b/applications/utilities/mesh/generation/blockMesh/blockMesh.C
index 4441f15e49..d48980cb8c 100644
--- a/applications/utilities/mesh/generation/blockMesh/blockMesh.C
+++ b/applications/utilities/mesh/generation/blockMesh/blockMesh.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 |
+ \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@@ -148,6 +148,15 @@ int main(int argc, char *argv[])
dictPath =
runTime.constant()
/regionPath/polyMesh::meshSubDir/dictName;
+
+ // Warn that constant/polyMesh/blockMesh was selected instead of
+ // system/blockMesh
+ WarningIn(args[0])
+ << "Using the old blockMeshDict location: "
+ << dictPath << nl
+ << " instead of the default location: "
+ << runTime.system()/regionPath/dictName << nl
+ << endl;
}
// Otherwise assume the dictionary is present in the system directory
else
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/Allwclean b/applications/utilities/postProcessing/graphics/PVReaders/Allwclean
index c8d0f03e86..89cadd3040 100755
--- a/applications/utilities/postProcessing/graphics/PVReaders/Allwclean
+++ b/applications/utilities/postProcessing/graphics/PVReaders/Allwclean
@@ -1,6 +1,6 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
-set -x
+#set -x
wclean libso vtkPVReaders
PVblockMeshReader/Allwclean
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwclean b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwclean
index 914ce6dd4e..f0cd56dee2 100755
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwclean
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwclean
@@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source the wmake functions
. $WM_DIR/scripts/wmakeFunctions
-set -x
+#set -x
# deal with client/server vs combined plugins
rm -f $FOAM_LIBBIN/libPVFoamReader* 2>/dev/null
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwmake b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwmake
index 296767f4a8..7788998933 100755
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwmake
@@ -7,29 +7,49 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source the wmake functions
. $WM_DIR/scripts/wmakeFunctions
-# ensure CMake gets the correct C/C++ compilers
+# Ensure CMake gets the correct C/C++ compilers
[ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
-set -x
-if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
+
+# CMake into objectsDir,
+# with an additional attempt if (possibly incorrect) CMakeCache.txt existed
+doCmake()
+{
+ local sourceDir="$1"
+
+ findObjectDir $sourceDir # Where are generated files stored?
+ test -f "$objectsDir/CMakeCache.txt"
+ retry=$? # CMakeCache.txt exists, but sources may have moved
+
+ mkdir -p $objectsDir && \
+ (
+ cd $objectsDir || exit 1
+
+ cmake $sourceDir || {
+ if [ $retry -eq 0 ]
+ then
+ echo "Removing CMakeCache.txt and attempt again"
+ rm -f CMakeCache.txt
+ cmake $sourceDir
+ else
+ exit 1
+ fi
+ } && make
+ )
+}
+
+
+if [ -d "$ParaView_DIR" ]
then
wmake $targetType vtkPVFoam
- if [ "$targetType" != "objects" ]
+ if [ "$targetType" != objects ]
then
- sourceDir=$PWD/PVFoamReader
-
- # Where are any generated files stored?
- findObjectDir $sourceDir
- (
- mkdir -p $objectsDir \
- && cd $objectsDir \
- && cmake $sourceDir \
- && make
- ) || {
+ doCmake $PWD/PVFoamReader || {
+ echo
+ echo " WARNING: incomplete build of ParaView OpenFOAM plugin"
echo
- echo "WARNING: incomplete build of ParaView OpenFOAM plugin"
}
fi
fi
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/Make/options b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/Make/options
index 9f63402d64..0154a3bcba 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/Make/options
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/Make/options
@@ -1,4 +1,5 @@
EXE_INC = \
+ ${c++LESSWARN} \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwclean b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwclean
index afce206c8b..3a81901a0b 100755
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwclean
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwclean
@@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source the wmake functions
. $WM_DIR/scripts/wmakeFunctions
-set -x
+#set -x
# deal with client/server vs combined plugins
rm -f $FOAM_LIBBIN/libPVblockMeshReader* 2>/dev/null
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwmake b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwmake
index 5959a30fbb..607a6cb8e3 100755
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwmake
@@ -11,25 +11,45 @@ cd ${0%/*} || exit 1 # Run from this directory
[ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
-set -x
-if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
+
+# CMake into objectsDir,
+# with an additional attempt if (possibly incorrect) CMakeCache.txt existed
+doCmake()
+{
+ local sourceDir="$1"
+
+ findObjectDir $sourceDir # Where are generated files stored?
+ test -f "$objectsDir/CMakeCache.txt"
+ retry=$? # CMakeCache.txt exists, but sources may have moved
+
+ mkdir -p $objectsDir && \
+ (
+ cd $objectsDir || exit 1
+
+ cmake $sourceDir || {
+ if [ $retry -eq 0 ]
+ then
+ echo "Removing CMakeCache.txt and attempt again"
+ rm -f CMakeCache.txt
+ cmake $sourceDir
+ else
+ exit 1
+ fi
+ } && make
+ )
+}
+
+
+if [ -d "$ParaView_DIR" ]
then
wmake $targetType vtkPVblockMesh
- if [ "$targetType" != "objects" ]
+ if [ "$targetType" != objects ]
then
- sourceDir=$PWD/PVblockMeshReader
-
- # Where are any generated files stored?
- findObjectDir $sourceDir
- (
- mkdir -p $objectsDir \
- && cd $objectsDir \
- && cmake $sourceDir \
- && make
- ) || {
+ doCmake $PWD/PVblockMeshReader || {
+ echo
+ echo " WARNING: incomplete build of ParaView BlockMesh plugin"
echo
- echo "WARNING: incomplete build of ParaView BlockMesh plugin"
}
fi
fi
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/Make/options b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/Make/options
index 9dcba4b39b..79abf2d7fc 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/Make/options
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/Make/options
@@ -1,4 +1,5 @@
EXE_INC = \
+ ${c++LESSWARN} \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/mesh/blockMesh/lnInclude \
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/Make/options b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/Make/options
index 8a80ee1497..d84fae1560 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/Make/options
+++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/Make/options
@@ -1,4 +1,5 @@
EXE_INC = \
+ ${c++LESSWARN} \
-I$(ParaView_INCLUDE_DIR) \
-I$(ParaView_INCLUDE_DIR)/vtkkwiml
diff --git a/etc/config.csh/example/paraview b/etc/config.csh/example/paraview
index 47747cafad..b65dd6a07d 100644
--- a/etc/config.csh/example/paraview
+++ b/etc/config.csh/example/paraview
@@ -35,7 +35,7 @@
#------------------------------------------------------------------------------
#
-# Use other (shipped) paraview.csh with a different ParaView_VERSION
+# Use other (shipped) paraview with a different ParaView_VERSION
#
set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o config.csh/paraview`
diff --git a/etc/config.csh/mpi b/etc/config.csh/mpi
index 876357d435..c56bbab3f9 100644
--- a/etc/config.csh/mpi
+++ b/etc/config.csh/mpi
@@ -60,6 +60,12 @@ case OPENMPI:
# Tell OpenMPI where to find its install directory
setenv OPAL_PREFIX $MPI_ARCH_PATH
+ if ($?FOAM_VERBOSE && $?prompt) then
+ echo "Using OPENMPI:"
+ echo " OPAL_PREFIX : $OPAL_PREFIX"
+ echo " FOAM_MPI : $FOAM_MPI"
+ endif
+
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
_foamAddMan $MPI_ARCH_PATH/share/man
@@ -111,8 +117,8 @@ case SYSTEMMPI:
case MPICH:
setenv FOAM_MPI mpich2-1.1.1p1
- setenv MPI_HOME $WM_THIRD_PARTY_DIR/$FOAM_MPI
setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
+ setenv MPI_HOME $MPI_ARCH_PATH
_foamAddPath $MPI_ARCH_PATH/bin
diff --git a/etc/config.csh/paraview b/etc/config.csh/paraview
index 50973a93d4..d768864f30 100644
--- a/etc/config.csh/paraview
+++ b/etc/config.csh/paraview
@@ -41,17 +41,17 @@
# If using a central installation not located under ThirdParty, you will
# need to set some environment values directly. For example,
#
-# setenv ParaView_DIR /opt/paraview/paraview-5.2.0
-# setenv ParaView_INCLUDE_DIR $ParaView_DIR/include/paraview-5.2
-# setenv PV_PLUGIN_PATH $FOAM_LIBBIN/paraview-5.2
+# setenv ParaView_DIR /opt/paraview/paraview-5.0.1
+# setenv ParaView_INCLUDE_DIR $ParaView_DIR/include/paraview-5.0
+# setenv PV_PLUGIN_PATH $FOAM_LIBBIN/paraview-5.0
#
# setenv PATH ${ParaView_DIR}/bin:${PATH}
-# setenv LD_LIBRARY_PATH ${ParaView_DIR}/lib/paraview-5.2:${LD_LIBRARY_PATH}
+# setenv LD_LIBRARY_PATH ${ParaView_DIR}/lib/paraview-5.0:${LD_LIBRARY_PATH}
# unsetenv ParaView_VERSION # avoid using ThirdParty settings
#
#------------------------------------------------------------------------------
-setenv ParaView_VERSION 5.2.0
+setenv ParaView_VERSION 5.0.1
setenv ParaView_MAJOR detect # Automatically determine major version
set cmake_version=cmake-system
@@ -66,7 +66,8 @@ if ( $status == 0 ) setenv PATH $cleaned
# ThirdParty cmake
set cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake_version
if ( -r $cmake/bin/cmake ) then
- _foamAddPath $cmake/bin
+ # _foamAddPath not available when foamPV alias is used
+ setenv PATH $cmake/bin:${PATH}
endif
# Evaluate command-line parameters for ParaView
@@ -101,12 +102,11 @@ if ( $?ParaView_VERSION ) then
set pvName=ParaView-$ParaView_VERSION
set pvMajor=paraview-$ParaView_MAJOR
- set pvSrcDir=$WM_THIRD_PARTY_DIR/$pvName
setenv ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$pvName
- # Set paths if binaries or source are present
- if ( -r $ParaView_DIR || -r $pvSrcDir ) then
+ # Set paths if binaries are present
+ if ( -r $ParaView_DIR ) then
set pvLibDir=${ParaView_DIR}/lib/$pvMajor
set pvPython=$ParaView_DIR/Utilities/VTKPythonWrapping
@@ -132,13 +132,18 @@ if ( $?ParaView_VERSION ) then
echo " PV_PLUGIN_PATH : $PV_PLUGIN_PATH"
endif
else
+ if ($?FOAM_VERBOSE && $?prompt) then
+ echo "No paraview found"
+ echo " ParaView_DIR : $ParaView_DIR"
+ endif
+
unsetenv ParaView_INCLUDE_DIR PV_PLUGIN_PATH
setenv ParaView_DIR # Defined but empty (used by foamPV alias)
endif
endif
-unset cleaned cmake cmake_version pvName pvMajor pvSrcDir pvLibDir pvPython
-unsetenv ParaView_VERSION ParaView_MAJOR
+unset cleaned cmake cmake_version pvName pvMajor pvLibDir pvPython
+unsetenv ParaView_MAJOR ParaView_VERSION
#------------------------------------------------------------------------------
diff --git a/etc/config.sh/mpi b/etc/config.sh/mpi
index d887268588..757aef05ee 100644
--- a/etc/config.sh/mpi
+++ b/etc/config.sh/mpi
@@ -63,6 +63,13 @@ OPENMPI)
# Tell OpenMPI where to find its install directory
export OPAL_PREFIX=$MPI_ARCH_PATH
+ if [ "$FOAM_VERBOSE" -a "$PS1" ]
+ then
+ echo "Using OPENMPI:" 1>&2
+ echo " OPAL_PREFIX : $OPAL_PREFIX" 1>&2
+ echo " FOAM_MPI : $FOAM_MPI" 1>&2
+ fi
+
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
_foamAddMan $MPI_ARCH_PATH/share/man
@@ -118,8 +125,8 @@ SYSTEMMPI)
MPICH)
export FOAM_MPI=mpich2-1.1.1p1
- export MPI_HOME=$WM_THIRD_PARTY_DIR/$FOAM_MPI
export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
+ export MPI_HOME=$MPI_ARCH_PATH
_foamAddPath $MPI_ARCH_PATH/bin
diff --git a/etc/config.sh/paraview b/etc/config.sh/paraview
index 99a379422c..a8df5e7d9c 100644
--- a/etc/config.sh/paraview
+++ b/etc/config.sh/paraview
@@ -41,17 +41,20 @@
# If using a central installation not located under ThirdParty, you will
# need to set some environment values directly. For example,
#
-# export ParaView_DIR=/opt/paraview/paraview-5.2.0
-# export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview-5.2
-# export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-5.2
+# export ParaView_DIR=/opt/paraview/paraview-5.0.1
+# export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview-5.0
+# export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-5.0
#
# export PATH=$ParaView_DIR/bin:$PATH
-# export LD_LIBRARY_PATH=$ParaView_DIR/lib/paraview-5.2:$LD_LIBRARY_PATH
+# export LD_LIBRARY_PATH=$ParaView_DIR/lib/paraview-5.0:$LD_LIBRARY_PATH
# unset ParaView_VERSION # avoid using ThirdParty settings
#
+# Note
+# When _foamAddLib is unset (eg, called from makeParaView or from foamPV):
+# - the ParaView_VERSION variable is retained.
#------------------------------------------------------------------------------
-ParaView_VERSION=5.2.0
+ParaView_VERSION=5.0.1
ParaView_MAJOR=detect # Automatically determine major version
cmake_version=cmake-system
@@ -70,7 +73,8 @@ cleaned=$($WM_PROJECT_DIR/bin/foamCleanPath "$PATH" \
cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake_version
if [ -r $cmake/bin/cmake ]
then
- _foamAddPath $cmake/bin
+ # _foamAddPath not available when foamPV function is used
+ PATH=$cmake/bin:$PATH
fi
# Evaluate command-line parameters for ParaView
@@ -112,12 +116,11 @@ then
pvName=ParaView-$ParaView_VERSION
pvMajor=paraview-$ParaView_MAJOR
- pvSrcDir=$WM_THIRD_PARTY_DIR/$pvName
export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$pvName
# Set paths if binaries or source are present
- if [ -r $ParaView_DIR -o -r $pvSrcDir ]
+ if [ -r $ParaView_DIR ]
then
pvLibDir=$ParaView_DIR/lib/$pvMajor
pvPython=$ParaView_DIR/Utilities/VTKPythonWrapping
@@ -147,13 +150,24 @@ then
echo " PV_PLUGIN_PATH : $PV_PLUGIN_PATH"
fi
else
+ if [ "$FOAM_VERBOSE" -a "$PS1" ]
+ then
+ echo "No paraview found"
+ echo " ParaView_DIR : $ParaView_DIR"
+ fi
+
unset ParaView_DIR ParaView_INCLUDE_DIR PV_PLUGIN_PATH
fi
fi
unset -f _foamParaviewEval
-unset cleaned cmake cmake_version pvName pvMajor pvSrcDir pvLibDir pvPython
-unset ParaView_VERSION ParaView_MAJOR
+unset cleaned cmake cmake_version pvName pvMajor pvLibDir pvPython
+unset ParaView_MAJOR
+
+if type _foamAddLib > /dev/null 2>&1 # normal sourcing
+then
+ unset ParaView_VERSION
+fi
#------------------------------------------------------------------------------
diff --git a/src/OpenFOAM/containers/Lists/List/List.H b/src/OpenFOAM/containers/Lists/List/List.H
index 448e4604ae..fdb4559bf7 100644
--- a/src/OpenFOAM/containers/Lists/List/List.H
+++ b/src/OpenFOAM/containers/Lists/List/List.H
@@ -76,8 +76,6 @@ template class IndirectList;
template class UIndirectList;
template class BiIndirectList;
-typedef UList