diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake b/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake
index 99d54fef06ce3092fab99f146c0e1653e9c7d9c5..a165c8d474926c36a2a70530a3560b8300737b3d 100755
--- a/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake
@@ -2,7 +2,7 @@
 cd ${0%/*} || exit 1    # run from this directory
 #set -x
 
-if [ "$ParaView_VERSION" == "4.0.1" ]
+if [ "$ParaView_VERSION" == "4.0.1" -o "$ParaView_VERSION" == "4.1.0" ]
     then
     if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
     then
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt
index ed835d3b4792212bc964f00e68481699023110e0..a587d33f346e6c2e8c06a899b5280275cd8c0fa0 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt
@@ -49,32 +49,26 @@ ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS
   XML_GROUP sources
 )
 
-ADD_PARAVIEW_PLUGIN(
-    PV4FoamReader_SM "1.0"
-    SERVER_MANAGER_XML PV4FoamReader_SM.xml
-    SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx
-    GUI_INTERFACES ${IFACES}
-    GUI_SOURCES pqPV4FoamReaderPanel.cxx
-        ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
-    GUI_RESOURCE_FILES PV4FoamReader.xml
-)
-
-# #
-# # Define the server-side portion of the reader plugin
-# #
-# ADD_PARAVIEW_PLUGIN(
-#     PV4FoamReader_SM "1.0"
-#     SERVER_MANAGER_XML PV4FoamReader_SM.xml
-#     SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx
-# )
-# #
-# # Define the client-side portion of the reader plugin
-# #
-# ADD_PARAVIEW_PLUGIN(
-#     PV4FoamReader "1.0"
-#     GUI_RESOURCES PV3FoamReader.qrc
-# )
-#
+IF("${PARAVIEW_VERSION_MINOR}" EQUAL 0)
+    ADD_PARAVIEW_PLUGIN(
+        PV4FoamReader_SM "1.0"
+        SERVER_MANAGER_XML PV4FoamReader_SM.xml
+        SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx
+        GUI_INTERFACES ${IFACES}
+        GUI_SOURCES pqPV4FoamReaderPanel.cxx
+            ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
+        GUI_RESOURCE_FILES PV4FoamReader.xml
+    )
+ELSE("${PARAVIEW_VERSION_MINOR}" EQUAL 0)
+    ADD_PARAVIEW_PLUGIN(
+        PV4FoamReader_SM "1.0"
+        SERVER_MANAGER_XML PV4FoamReader_SM.xml
+        SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx
+        GUI_INTERFACES ${IFACES}
+        GUI_SOURCES pqPV4FoamReaderPanel.cxx
+            ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
+    )
+ENDIF("${PARAVIEW_VERSION_MINOR}" EQUAL 0)
 
 TARGET_LINK_LIBRARIES(
     PV4FoamReader_SM
@@ -82,4 +76,5 @@ TARGET_LINK_LIBRARIES(
     finiteVolume
     vtkPV4Foam
 )
+
 #-----------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader_SM.xml b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader_SM.xml
index 8f39ac67b7051f45813a4cf3ac3e6105d6f03e15..d2856ad46d3e5a2591884552cb21262e64485387 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader_SM.xml
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader_SM.xml
@@ -167,19 +167,6 @@
       </Documentation>
     </IntVectorProperty>
 
-    <!-- Force GUI update check box -->
-    <IntVectorProperty
-      name="UpdateGUI"
-      command="SetUpdateGUI"
-      number_of_elements="1"
-      default_values="0"
-      animateable="0">
-      <BooleanDomain name="bool"/>
-      <Documentation>
-        A simple way to cause a reader GUI modification.
-      </Documentation>
-    </IntVectorProperty>
-
     <!--
        | Selections
        -->
@@ -298,6 +285,8 @@
     <Property name="UiShowGroupsOnly" show="0"/>
     <Property name="UiIncludeSets" show="0"/>
     <Property name="UiIncludeZones" show="0"/>
+    <ReaderFactory extensions="OpenFOAM"
+                   file_description="OpenFOAM"/>
   </Hints>
 
 
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt
index 4f4a810d5ca936af5a35f121dde9b1a92e05d433..21ee1a3f791f33db87017063157e8c92a149d24b 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt
@@ -48,32 +48,26 @@ ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS
   XML_GROUP sources
 )
 
-ADD_PARAVIEW_PLUGIN(
-    PV4blockMeshReader_SM "1.0"
-    SERVER_MANAGER_XML PV4blockMeshReader_SM.xml
-    SERVER_MANAGER_SOURCES  vtkPV4blockMeshReader.cxx
-    GUI_INTERFACES ${IFACES}
-    GUI_SOURCES pqPV4blockMeshReaderPanel.cxx
-        ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
-    GUI_RESOURCE_FILES PV4blockMeshReader.xml
-)
-
-
-# #
-# # Define the server-side portion of the reader plugin
-# #
-# ADD_PARAVIEW_PLUGIN(PV4blockMeshReader_SM "1.0"
-#   SERVER_MANAGER_XML PV4blockMeshReader_SM.xml
-#   SERVER_MANAGER_SOURCES vtkPV4blockMeshReader.cxx
-# )
-# #
-# # Define the client-side portion of the reader plugin
-# #
-# ADD_PARAVIEW_PLUGIN(
-#     PV4blockMeshReader "1.0"
-#     GUI_RESOURCES PV4blockMeshReader.qrc
-# )
-
+IF("${PARAVIEW_VERSION_MINOR}" EQUAL 0)
+        ADD_PARAVIEW_PLUGIN(
+            PV4blockMeshReader_SM "1.0"
+        SERVER_MANAGER_XML PV4blockMeshReader_SM.xml
+        SERVER_MANAGER_SOURCES  vtkPV4blockMeshReader.cxx
+        GUI_INTERFACES ${IFACES}
+        GUI_SOURCES pqPV4blockMeshReaderPanel.cxx
+            ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
+        GUI_RESOURCE_FILES PV4blockMeshReader.xml
+    )
+ELSE("${PARAVIEW_VERSION_MINOR}" EQUAL 0)
+        ADD_PARAVIEW_PLUGIN(
+            PV4blockMeshReader_SM "1.0"
+        SERVER_MANAGER_XML PV4blockMeshReader_SM.xml
+        SERVER_MANAGER_SOURCES  vtkPV4blockMeshReader.cxx
+        GUI_INTERFACES ${IFACES}
+        GUI_SOURCES pqPV4blockMeshReaderPanel.cxx
+            ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
+    )
+ENDIF("${PARAVIEW_VERSION_MINOR}" EQUAL 0)
 
 # Build the client-side plugin
 
@@ -83,4 +77,5 @@ TARGET_LINK_LIBRARIES(
     blockMesh
     vtkPV4blockMesh
 )
+
 #-----------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader_SM.xml b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader_SM.xml
index cc288ac7cac0bf3357276279d416c6c4e795daa1..09f962d32f595e9963deb75d53832f835c06349a 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader_SM.xml
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader_SM.xml
@@ -103,6 +103,8 @@
   <Hints>
     <Property name="FileName" show="0"/>
     <Property name="UiShowPointNumbers" show="0"/>
+    <ReaderFactory extensions="blockMesh"
+                   file_description="OpenFOAM blockMesh"/>
   </Hints>
 
   </SourceProxy>
diff --git a/bin/paraFoam b/bin/paraFoam
index d288e3fb909d8d4d4684bdd6990099989c59fa5c..a902d218de85009e7035a509c7671f1b4182de58 100755
--- a/bin/paraFoam
+++ b/bin/paraFoam
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -121,18 +121,18 @@ do
     esac
 done
 
+# Get the ParaView major version to select the appropriate readers
+version=`echo $ParaView_VERSION | sed -e 's/^\([0-9][0-9]*\).*$/\1/'`
 
-#
 # check that reader module has been built
-#
-if [ $requirePV -eq 1 -a ! -f $PV_PLUGIN_PATH/libPV3FoamReader_SM.so ]
+if [ $requirePV -eq 1 -a ! -f $PV_PLUGIN_PATH/libPV${version}FoamReader_SM.so ]
 then
     cat<< BUILDREADER
 
 FATAL ERROR: ParaView reader module libraries do not exist
 
 Please build the reader module before continuing:
-cd \$FOAM_UTILITIES/postProcessing/graphics/PV3Readers
+cd \$FOAM_UTILITIES/postProcessing/graphics/PV${version}Readers
 ./Allwclean
 ./Allwmake
 
@@ -140,9 +140,7 @@ BUILDREADER
     exit 1
 fi
 
-#
 # check for --data=... argument
-#
 hasDataArg()
 {
     hasData=false
@@ -264,7 +262,8 @@ else
     }
 
     # For now filter out any ld.so errors. Caused by non-system compiler?
-    paraview --data="$caseFile" "$@" 2>&1 | fgrep -v 'Inconsistency detected by ld.so'
+    paraview --data="$caseFile" "$@" 2>&1 \
+        | fgrep -v 'Inconsistency detected by ld.so'
 fi
 
 
diff --git a/bin/paraFoam398 b/bin/paraFoam398
deleted file mode 100755
index 95cf1cc88dbdda850334469315f299df0968bf40..0000000000000000000000000000000000000000
--- a/bin/paraFoam398
+++ /dev/null
@@ -1,271 +0,0 @@
-#!/bin/sh
-#------------------------------------------------------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
-#    \\/     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 <http://www.gnu.org/licenses/>.
-#
-# Script
-#     paraFoam
-#
-# Description
-#     start paraview with the OpenFOAM libraries
-#
-# Note
-#     combining -block or -builtin options with the -region option yields
-#     undefined behaviour
-#------------------------------------------------------------------------------
-usage() {
-    exec 1>&2
-    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
-    cat<<USAGE
-
-Usage: ${0##*/} [OPTION] [PARAVIEW_OPTION]
-options:
-  -block            use blockMesh reader  (uses .blockMesh extension)
-  -builtin          use VTK builtin OpenFOAM reader  (uses .foam extension)
-  -case <dir>       specify alternative case directory, default is the cwd
-  -region <name>    specify alternative mesh region
-  -touch            only create the file  (eg, .blockMesh, .OpenFOAM, etc)
-  -touchAll         create .blockMesh, .OpenFOAM files (and for all regions)
-  -help             print the usage
-
-
-paraview options start with a double dashes
-
-* start paraview $ParaView_VERSION with the OpenFOAM libraries
-
-USAGE
-    exit 1
-}
-
-# We want to do nice exit when running paraview to give paraview opportunity
-# to clean up
-unset FOAM_ABORT
-
-unset regionName optTouch
-
-# Hack: change all locale to 'C' i.e. using '.' for decimal point. This is
-# only needed temporarily until paraview is locale aware. (git version is
-# already 2010-07)
-export LC_ALL=C
-
-# reader extension
-extension=OpenFOAM
-
-requirePV=1
-
-# parse options
-while [ "$#" -gt 0 ]
-do
-    case "$1" in
-    -h | -help)
-        usage
-        ;;
-    -block | -blockMesh)
-        extension=blockMesh
-        shift
-        ;;
-    -builtin)
-        extension=foam
-        requirePV=0
-        shift
-        ;;
-    -case)
-        [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
-        cd "$2" 2>/dev/null || usage "directory does not exist:  '$2'"
-        shift 2
-        ;;
-    -region)
-        [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
-        regionName=$2
-        shift 2
-        ;;
-    -touch)
-        optTouch=true
-        requirePV=0
-        shift
-        ;;
-    -touchAll)
-        optTouch=all
-        requirePV=0
-        shift
-        ;;
-    --)
-        shift
-        break    # stop here, treat balance as paraview options
-        ;;
-    --*)
-        break    # stop here, treat this and balance as paraview options
-        ;;
-    *)
-        usage "unknown option/argument: '$*'"
-        ;;
-    esac
-done
-
-
-#
-# check that reader module has been built
-#
-if [ $requirePV -eq 1 -a ! -f $PV_PLUGIN_PATH/libPV398FoamReader_SM.so ]
-then
-    cat<< BUILDREADER
-
-FATAL ERROR: ParaView reader module libraries do not exist
-
-Please build the reader module before continuing:
-cd \$FOAM_UTILITIES/postProcessing/graphics/PV398Readers
-./Allwclean
-./Allwmake
-
-BUILDREADER
-    exit 1
-fi
-
-#
-# check for --data=... argument
-#
-hasDataArg()
-{
-    hasData=false
-    while [ "$#" -gt 0 ]
-    do
-        case "$1" in
-        (--data=*)
-            hasData=true
-            break
-            ;;
-        esac
-        shift
-    done
-}
-
-hasDataArg $@
-
-
-# get a sensible caseName from the directory name
-caseName=${PWD##*/}
-caseFile="$caseName.$extension"
-fvControls="system"
-
-if [ -n "$regionName" ]
-then
-    if [ ! -d constant/$regionName ]
-    then
-        echo "FATAL ERROR: Region $regionName does not exist"
-        exit 1
-    else
-        caseFile="$caseName{$regionName}.$extension"
-        fvControls="$fvControls/$regionName"
-    fi
-fi
-
-case "${optTouch:-false}" in
-all)
-    extension=OpenFOAM
-    if [ -f constant/polyMesh/blockMeshDict ]
-    then
-        touch "$caseName.blockMesh"
-        echo "created '$caseName.blockMesh'"
-    fi
-    touch "$caseName.$extension"
-    echo "created '$caseName.$extension'"
-    # discover probable regions
-    for region in constant/*
-    do
-        if [ -d $region -a -d $region/polyMesh ]
-        then
-            regionName=${region##*/}
-            touch "$caseName{$regionName}.$extension"
-            echo "created '$caseName{$regionName}.$extension'"
-        fi
-    done
-    exit 0
-    ;;
-true)
-    touch "$caseFile"
-    echo "created '$caseFile'"
-    exit 0
-    ;;
-esac
-
-
-# parent directory for normal or parallel results
-case "$caseName" in
-    processor*) parentDir=".." ;;
-    *)          parentDir="."  ;;
-esac
-
-
-if [ "${hasData:-false}" = true ]
-then
-
-    # has --data=.., send directly to paraview
-    exec paraview "$@"
-
-else
-
-    # check existence of essential files
-    warn="WARN file does not exist:"
-    case $extension in
-    blockMesh)
-        for check in \
-            system/controlDict \
-            constant/polyMesh/blockMeshDict \
-            ;
-        do
-            [ -s "$parentDir/$check" ] || {
-                [ -n "$warn" ] && echo "$warn" 1>&2
-                echo "    $parentDir/$check" 1>&2
-                unset warn
-            }
-        done
-        ;;
-
-    builtin | OpenFOAM)
-        for check in \
-            system/controlDict \
-            $fvControls/fvSchemes \
-            $fvControls/fvSolution \
-            ;
-        do
-            [ -s "$parentDir/$check" ] || {
-                [ -n "$warn" ] && echo "$warn" 1>&2
-                echo "    $parentDir/$check" 1>&2
-                unset warn
-            }
-        done
-        ;;
-    esac
-
-    # only create/remove caseFile if it didn't already exist
-    [ -e $caseFile ] || {
-        trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT
-        touch "$caseFile"
-        echo "created temporary '$caseFile'"
-    }
-
-    # For now filter out any ld.so errors. Caused by non-system compiler?
-    paraview --data="$caseFile" "$@" 2>&1 | fgrep -v 'Inconsistency detected by ld.so'
-fi
-
-
-#------------------------------------------------------------------------------
diff --git a/bin/paraFoam4 b/bin/paraFoam4
deleted file mode 100755
index 56faaa913b7ce49ce5956763ea1d8a4bf4cddb39..0000000000000000000000000000000000000000
--- a/bin/paraFoam4
+++ /dev/null
@@ -1,271 +0,0 @@
-#!/bin/sh
-#------------------------------------------------------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
-#    \\/     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 <http://www.gnu.org/licenses/>.
-#
-# Script
-#     paraFoam
-#
-# Description
-#     start paraview with the OpenFOAM libraries
-#
-# Note
-#     combining -block or -builtin options with the -region option yields
-#     undefined behaviour
-#------------------------------------------------------------------------------
-usage() {
-    exec 1>&2
-    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
-    cat<<USAGE
-
-Usage: ${0##*/} [OPTION] [PARAVIEW_OPTION]
-options:
-  -block            use blockMesh reader  (uses .blockMesh extension)
-  -builtin          use VTK builtin OpenFOAM reader  (uses .foam extension)
-  -case <dir>       specify alternative case directory, default is the cwd
-  -region <name>    specify alternative mesh region
-  -touch            only create the file  (eg, .blockMesh, .OpenFOAM, etc)
-  -touchAll         create .blockMesh, .OpenFOAM files (and for all regions)
-  -help             print the usage
-
-
-paraview options start with a double dashes
-
-* start paraview $ParaView_VERSION with the OpenFOAM libraries
-
-USAGE
-    exit 1
-}
-
-# We want to do nice exit when running paraview to give paraview opportunity
-# to clean up
-unset FOAM_ABORT
-
-unset regionName optTouch
-
-# Hack: change all locale to 'C' i.e. using '.' for decimal point. This is
-# only needed temporarily until paraview is locale aware. (git version is
-# already 2010-07)
-export LC_ALL=C
-
-# reader extension
-extension=OpenFOAM
-
-requirePV=1
-
-# parse options
-while [ "$#" -gt 0 ]
-do
-    case "$1" in
-    -h | -help)
-        usage
-        ;;
-    -block | -blockMesh)
-        extension=blockMesh
-        shift
-        ;;
-    -builtin)
-        extension=foam
-        requirePV=0
-        shift
-        ;;
-    -case)
-        [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
-        cd "$2" 2>/dev/null || usage "directory does not exist:  '$2'"
-        shift 2
-        ;;
-    -region)
-        [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
-        regionName=$2
-        shift 2
-        ;;
-    -touch)
-        optTouch=true
-        requirePV=0
-        shift
-        ;;
-    -touchAll)
-        optTouch=all
-        requirePV=0
-        shift
-        ;;
-    --)
-        shift
-        break    # stop here, treat balance as paraview options
-        ;;
-    --*)
-        break    # stop here, treat this and balance as paraview options
-        ;;
-    *)
-        usage "unknown option/argument: '$*'"
-        ;;
-    esac
-done
-
-
-#
-# check that reader module has been built
-#
-if [ $requirePV -eq 1 -a ! -f $PV_PLUGIN_PATH/libPV4FoamReader_SM.so ]
-then
-    cat<< BUILDREADER
-
-FATAL ERROR: ParaView reader module libraries do not exist
-
-Please build the reader module before continuing:
-cd \$FOAM_UTILITIES/postProcessing/graphics/PV4Readers
-./Allwclean
-./Allwmake
-
-BUILDREADER
-    exit 1
-fi
-
-#
-# check for --data=... argument
-#
-hasDataArg()
-{
-    hasData=false
-    while [ "$#" -gt 0 ]
-    do
-        case "$1" in
-        (--data=*)
-            hasData=true
-            break
-            ;;
-        esac
-        shift
-    done
-}
-
-hasDataArg $@
-
-
-# get a sensible caseName from the directory name
-caseName=${PWD##*/}
-caseFile="$caseName.$extension"
-fvControls="system"
-
-if [ -n "$regionName" ]
-then
-    if [ ! -d constant/$regionName ]
-    then
-        echo "FATAL ERROR: Region $regionName does not exist"
-        exit 1
-    else
-        caseFile="$caseName{$regionName}.$extension"
-        fvControls="$fvControls/$regionName"
-    fi
-fi
-
-case "${optTouch:-false}" in
-all)
-    extension=OpenFOAM
-    if [ -f constant/polyMesh/blockMeshDict ]
-    then
-        touch "$caseName.blockMesh"
-        echo "created '$caseName.blockMesh'"
-    fi
-    touch "$caseName.$extension"
-    echo "created '$caseName.$extension'"
-    # discover probable regions
-    for region in constant/*
-    do
-        if [ -d $region -a -d $region/polyMesh ]
-        then
-            regionName=${region##*/}
-            touch "$caseName{$regionName}.$extension"
-            echo "created '$caseName{$regionName}.$extension'"
-        fi
-    done
-    exit 0
-    ;;
-true)
-    touch "$caseFile"
-    echo "created '$caseFile'"
-    exit 0
-    ;;
-esac
-
-
-# parent directory for normal or parallel results
-case "$caseName" in
-    processor*) parentDir=".." ;;
-    *)          parentDir="."  ;;
-esac
-
-
-if [ "${hasData:-false}" = true ]
-then
-
-    # has --data=.., send directly to paraview
-    exec paraview "$@"
-
-else
-
-    # check existence of essential files
-    warn="WARN file does not exist:"
-    case $extension in
-    blockMesh)
-        for check in \
-            system/controlDict \
-            constant/polyMesh/blockMeshDict \
-            ;
-        do
-            [ -s "$parentDir/$check" ] || {
-                [ -n "$warn" ] && echo "$warn" 1>&2
-                echo "    $parentDir/$check" 1>&2
-                unset warn
-            }
-        done
-        ;;
-
-    builtin | OpenFOAM)
-        for check in \
-            system/controlDict \
-            $fvControls/fvSchemes \
-            $fvControls/fvSolution \
-            ;
-        do
-            [ -s "$parentDir/$check" ] || {
-                [ -n "$warn" ] && echo "$warn" 1>&2
-                echo "    $parentDir/$check" 1>&2
-                unset warn
-            }
-        done
-        ;;
-    esac
-
-    # only create/remove caseFile if it didn't already exist
-    [ -e $caseFile ] || {
-        trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT
-        touch "$caseFile"
-        echo "created temporary '$caseFile'"
-    }
-
-    # For now filter out any ld.so errors. Caused by non-system compiler?
-    paraview --data="$caseFile" "$@" 2>&1 | fgrep -v 'Inconsistency detected by ld.so'
-fi
-
-
-#------------------------------------------------------------------------------
diff --git a/etc/bashrc b/etc/bashrc
index 8e6e6304718a5f2bcea0f99b3b2f5259bf0ceafe..0a3f216d5122d9eb8e29d55799ee5804b5a069e2 100644
--- a/etc/bashrc
+++ b/etc/bashrc
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
diff --git a/etc/config/paraview.csh b/etc/config/paraview.csh
index 9fca0cd887c5c802d7256b8a9e12ff41cd64bef0..59ddba26979d94b0a1880e1e73c9b001b95655ca 100644
--- a/etc/config/paraview.csh
+++ b/etc/config/paraview.csh
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -25,7 +25,7 @@
 #     config/paraview.csh
 #
 # Description
-#     Setup file for paraview-3.x
+#     Setup file for paraview-[3-4].x
 #     Sourced from OpenFOAM-<VERSION>/etc/cshrc or from foamPV alias
 #
 # Note
@@ -39,7 +39,7 @@ if ( $status == 0 ) setenv PATH $cleaned
 
 # determine the cmake to be used
 unsetenv CMAKE_HOME
-foreach cmake ( cmake-2.8.4 cmake-2.8.3 cmake-2.8.1 )
+foreach cmake ( cmake-2.8.12.1 cmake-2.8.8 cmake-2.8.4 cmake-2.8.3 cmake-2.8.1 )
     set cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
     if ( -r $cmake ) then
         setenv CMAKE_HOME $cmake
@@ -49,7 +49,9 @@ foreach cmake ( cmake-2.8.4 cmake-2.8.3 cmake-2.8.1 )
 end
 
 #- ParaView version, automatically determine major version:
-setenv ParaView_VERSION 3.12.0
+#setenv ParaView_VERSION 3.12.0
+#setenv ParaView_VERSION 4.0.1
+setenv ParaView_VERSION 4.1.0
 setenv ParaView_MAJOR detect
 
 
@@ -81,7 +83,14 @@ endsw
 
 
 set paraviewInstDir=$WM_THIRD_PARTY_DIR/ParaView-${ParaView_VERSION}
-setenv ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-${ParaView_VERSION}
+set paraviewArchName=ParaView-$ParaView_VERSION
+
+# Reset the name of the binary install directory for version 3
+if ( `echo $ParaView_VERSION | sed -e 's/^\([0-9][0-9]*\).*$/\1/'` == 3) then
+    set paraviewArchName=paraview-$ParaView_VERSION
+endif
+
+setenv ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$paraviewArchName
 
 # set paths if binaries or source are present
 if ( -r $ParaView_DIR || -r $paraviewInstDir ) then
diff --git a/etc/config/paraview.sh b/etc/config/paraview.sh
index 88d0f91555166240b69666c47208b672ab5c1396..f883f3902ad7c7b5418c684480df3c4e8aafa6e4 100644
--- a/etc/config/paraview.sh
+++ b/etc/config/paraview.sh
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -25,7 +25,7 @@
 #     config/paraview.sh
 #
 # Description
-#     Setup file for paraview-3.x
+#     Setup file for paraview-[3-4].x
 #     Sourced from OpenFOAM-<VERSION>/etc/bashrc or from foamPV alias
 #
 # Note
@@ -38,7 +38,7 @@ cleaned=`$WM_PROJECT_DIR/bin/foamCleanPath "$PATH" "$WM_THIRD_PARTY_DIR/platform
 
 # determine the cmake to be used
 unset CMAKE_HOME
-for cmake in cmake-2.8.4 cmake-2.8.3 cmake-2.8.1
+for cmake in cmake-2.8.12.1 cmake-2.8.8 cmake-2.8.4 cmake-2.8.3 cmake-2.8.1
 do
     cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
     if [ -r $cmake ]
@@ -51,7 +51,9 @@ done
 
 
 #- ParaView version, automatically determine major version
-export ParaView_VERSION=3.12.0
+#export ParaView_VERSION=3.12.0
+#export ParaView_VERSION=4.0.1
+export ParaView_VERSION=4.1.0
 export ParaView_MAJOR=detect
 
 
@@ -89,7 +91,15 @@ esac
 export ParaView_VERSION ParaView_MAJOR
 
 paraviewInstDir=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
-export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION
+paraviewArchName=ParaView-$ParaView_VERSION
+
+# Reset the name of the binary install directory for version 3
+if [ `echo $ParaView_VERSION | sed -e 's/^\([0-9][0-9]*\).*$/\1/'` -eq 3 ]
+then
+    paraviewArchName=paraview-$ParaView_VERSION
+fi
+
+export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$paraviewArchName
 
 # set paths if binaries or source are present
 if [ -r $ParaView_DIR -o -r $paraviewInstDir ]
diff --git a/etc/config/paraview4.csh b/etc/config/paraview4.csh
deleted file mode 100644
index 03b41bb9b795efb9e79059f31b3dbdd1a03b50ff..0000000000000000000000000000000000000000
--- a/etc/config/paraview4.csh
+++ /dev/null
@@ -1,127 +0,0 @@
-#----------------------------------*-sh-*--------------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
-#    \\/     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 <http://www.gnu.org/licenses/>.
-#
-# File
-#     config/paraview.csh
-#
-# Description
-#     Setup file for paraview-4.x
-#     Sourced from OpenFOAM-<VERSION>/etc/cshrc or from foamPV alias
-#
-# Note
-#     The env. variables 'ParaView_DIR' and 'ParaView_MAJOR'
-#     are required for building plugins
-#------------------------------------------------------------------------------
-
-# clean the PATH
-set cleaned=`$WM_PROJECT_DIR/bin/foamCleanPath "$PATH" "$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/cmake- $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-"`
-if ( $status == 0 ) setenv PATH $cleaned
-
-# determine the cmake to be used
-unsetenv CMAKE_HOME
-foreach cmake ( cmake-2.8.4 cmake-2.8.3 cmake-2.8.1 )
-    set cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
-    if ( -r $cmake ) then
-        setenv CMAKE_HOME $cmake
-        setenv PATH ${CMAKE_HOME}/bin:${PATH}
-        break
-    endif
-end
-
-#- ParaView version, automatically determine major version:
-setenv ParaView_VERSION 4.0.1
-setenv ParaView_MAJOR detect
-
-
-# Evaluate command-line parameters for ParaView
-while ( $#argv > 0 )
-    switch ($argv[1])
-    case ParaView*=*:
-        # name=value  -> setenv name value
-        eval "setenv $argv[1]:s/=/ /"
-        breaksw
-    endsw
-    shift
-end
-
-
-# set MAJOR version to correspond to VERSION
-# ParaView_MAJOR is "<digits>.<digits>" from ParaView_VERSION
-switch ("$ParaView_VERSION")
-case "$ParaView_MAJOR".*:
-    # version and major appear to correspond
-    breaksw
-
-case [0-9]*:
-    # extract major from the version
-    setenv ParaView_MAJOR `echo ${ParaView_VERSION} | \
-        sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
-    breaksw
-endsw
-
-
-set paraviewInstDir=$WM_THIRD_PARTY_DIR/ParaView-${ParaView_VERSION}
-setenv ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/ParaView-${ParaView_VERSION}
-
-# set paths if binaries or source are present
-if ( -r $ParaView_DIR || -r $paraviewInstDir ) then
-    setenv ParaView_INCLUDE_DIR $ParaView_DIR/include/paraview-${ParaView_MAJOR}
-    if (! -r $ParaView_INCLUDE_DIR && -r $ParaView_DIR/include/paraview) then
-        setenv ParaView_INCLUDE_DIR $ParaView_DIR/include/paraview
-    endif
-
-    set ParaView_LIB_DIR=${ParaView_DIR}/lib/paraview-${ParaView_MAJOR}
-    if (! -r $ParaView_LIB_DIR && -r ${ParaView_DIR}/lib/paraview) then
-        set ParaView_LIB_DIR=${ParaView_DIR}/lib/paraview
-    endif
-
-    setenv PATH ${ParaView_DIR}/bin:${PATH}
-    setenv LD_LIBRARY_PATH "${ParaView_LIB_DIR}:${LD_LIBRARY_PATH}"
-    setenv PV_PLUGIN_PATH $FOAM_LIBBIN/paraview-${ParaView_MAJOR}
-
-    if ($?FOAM_VERBOSE && $?prompt) then
-        echo "Using paraview"
-        echo "    ParaView_DIR         : $ParaView_DIR"
-        echo "    ParaView_LIB_DIR     : $ParaView_LIB_DIR"
-        echo "    ParaView_INCLUDE_DIR : $ParaView_INCLUDE_DIR"
-        echo "    PV_PLUGIN_PATH       : $PV_PLUGIN_PATH"
-    endif
-
-
-    # add in python libraries if required
-    set paraviewPython=$ParaView_DIR/Utilities/VTKPythonWrapping
-    if ( -r $paraviewPython ) then
-        if ($?PYTHONPATH) then
-            setenv PYTHONPATH ${PYTHONPATH}:${paraviewPython}:$ParaView_LIB_DIR
-        else
-            setenv PYTHONPATH ${paraviewPython}:$ParaView_LIB_DIR
-        endif
-    endif
-else
-    unsetenv PV_PLUGIN_PATH
-endif
-
-
-unset cleaned cmake paraviewInstDir paraviewPython
-
-# -----------------------------------------------------------------------------
diff --git a/etc/config/paraview4.sh b/etc/config/paraview4.sh
deleted file mode 100644
index c497fa6d76c96f5be80a8be3ca8c5f3b4f2c9018..0000000000000000000000000000000000000000
--- a/etc/config/paraview4.sh
+++ /dev/null
@@ -1,140 +0,0 @@
-#----------------------------------*-sh-*--------------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
-#    \\/     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 <http://www.gnu.org/licenses/>.
-#
-# File
-#     config/paraview.sh
-#
-# Description
-#     Setup file for paraview-4.x
-#     Sourced from OpenFOAM-<VERSION>/etc/bashrc or from foamPV alias
-#
-# Note
-#     The env. variables 'ParaView_DIR' and 'ParaView_MAJOR'
-#     are required for building plugins
-#------------------------------------------------------------------------------
-
-# clean the PATH
-cleaned=`$WM_PROJECT_DIR/bin/foamCleanPath "$PATH" "$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/cmake- $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-"` && PATH="$cleaned"
-
-# determine the cmake to be used
-unset CMAKE_HOME
-for cmake in cmake-2.8.4 cmake-2.8.3 cmake-2.8.1
-do
-    cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
-    if [ -r $cmake ]
-    then
-        export CMAKE_HOME=$cmake
-        export PATH=$CMAKE_HOME/bin:$PATH
-        break
-    fi
-done
-
-
-#- ParaView version, automatically determine major version
-export ParaView_VERSION=4.0.1
-export ParaView_MAJOR=detect
-
-
-# Evaluate command-line parameters for ParaView
-_foamParaviewEval()
-{
-    while [ $# -gt 0 ]
-    do
-        case "$1" in
-        ParaView*=*)
-            # name=value  -> export name=value
-            eval "export $1"
-            ;;
-        esac
-        shift
-    done
-}
-
-# Evaluate command-line parameters
-_foamParaviewEval $@
-
-
-# set MAJOR version to correspond to VERSION
-# ParaView_MAJOR is "<digits>.<digits>" from ParaView_VERSION
-case "$ParaView_VERSION" in
-"$ParaView_MAJOR".* )
-    # version and major appear to correspond
-    ;;
-
-[0-9]*)
-    # extract major from the version
-    ParaView_MAJOR=`echo $ParaView_VERSION | sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
-    ;;
-esac
-export ParaView_VERSION ParaView_MAJOR
-
-paraviewInstDir=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
-export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/ParaView-$ParaView_VERSION
-
-# set paths if binaries or source are present
-if [ -r $ParaView_DIR -o -r $paraviewInstDir ]
-then
-    export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview-$ParaView_MAJOR
-    if [ ! -d $ParaView_INCLUDE_DIR -a -d $ParaView_DIR/include/paraview ]
-    then
-        export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview
-    fi
-
-    ParaView_LIB_DIR=$ParaView_DIR/lib/paraview-$ParaView_MAJOR
-    if [ ! -d $ParaView_LIB_DIR -a -d $ParaView_DIR/lib/paraview ]
-    then
-        ParaView_LIB_DIR=$ParaView_DIR/lib/paraview
-    fi
-
-    export PATH=$ParaView_DIR/bin:$PATH
-    export LD_LIBRARY_PATH=$ParaView_LIB_DIR:$LD_LIBRARY_PATH
-    export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-$ParaView_MAJOR
-
-    if [ "$FOAM_VERBOSE" -a "$PS1" ]
-    then
-        echo "Using paraview"
-        echo "    ParaView_DIR         : $ParaView_DIR"
-        echo "    ParaView_LIB_DIR     : $ParaView_LIB_DIR"
-        echo "    ParaView_INCLUDE_DIR : $ParaView_INCLUDE_DIR"
-        echo "    PV_PLUGIN_PATH       : $PV_PLUGIN_PATH"
-    fi
-
-    # add in python libraries if required
-    paraviewPython=$ParaView_DIR/Utilities/VTKPythonWrapping
-    if [ -r $paraviewPython ]
-    then
-        if [ "$PYTHONPATH" ]
-        then
-            export PYTHONPATH=$PYTHONPATH:$paraviewPython:$ParaView_LIB_DIR
-        else
-            export PYTHONPATH=$paraviewPython:$ParaView_LIB_DIR
-        fi
-    fi
-else
-    unset PV_PLUGIN_PATH
-fi
-
-unset _foamParaviewEval
-unset cleaned cmake paraviewInstDir paraviewPython
-
-# -----------------------------------------------------------------------------
diff --git a/etc/cshrc b/etc/cshrc
index af3a34d21ba7a4a14c6f9831cfebe7a278e6c3d9..bb232b22bec9a8aa458e7f668dc89b974d39c9ac 100644
--- a/etc/cshrc
+++ b/etc/cshrc
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License