diff --git a/etc/bashrc b/etc/bashrc index 16fb959c460bd56dde203209f5193315d7cf2f2d..0a3f216d5122d9eb8e29d55799ee5804b5a069e2 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -211,7 +211,7 @@ _foamSource $WM_PROJECT_DIR/etc/config/aliases.sh # Source user setup files for optional packages # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview4.sh` +_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.sh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.sh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/gperftools.sh` 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 56180d99406af140a3763091345e91b6dbca86c9..0000000000000000000000000000000000000000 --- a/etc/config/paraview4.csh +++ /dev/null @@ -1,128 +0,0 @@ -#----------------------------------*-sh-*-------------------------------------- -# ========= | -# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox -# \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2014 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.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 - setenv PATH ${CMAKE_HOME}/bin:${PATH} - break - endif -end - -#- ParaView version, automatically determine major version: -setenv ParaView_VERSION 4.0.1 -#setenv ParaView_VERSION 4.1.0 -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 eaeeb84a5d5fa0b7b59134dcac16cc85e2f859d3..0000000000000000000000000000000000000000 --- a/etc/config/paraview4.sh +++ /dev/null @@ -1,141 +0,0 @@ -#----------------------------------*-sh-*-------------------------------------- -# ========= | -# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox -# \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2014 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.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 ] - 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_VERSION=4.1.0 -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 bbbcfed6057d42ed6ed524548acfb223023d317a..bb232b22bec9a8aa458e7f668dc89b974d39c9ac 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -201,7 +201,7 @@ _foamSource $WM_PROJECT_DIR/etc/config/aliases.csh # Source user setup files for optional packages # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview4.csh` +_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.csh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.csh`