ENH: partialWrite: support regions
[OpenFOAM-1.7.x.git] / etc / apps / paraview3 / cshrc
blobe2209af06a0f31c1c3b0585cf63a5e09d73839d0
1 #----------------------------------*-sh-*--------------------------------------
2 # =========                 |
3 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4 #  \\    /   O peration     |
5 #   \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
6 #    \\/     M anipulation  |
7 #------------------------------------------------------------------------------
8 # License
9 #     This file is part of OpenFOAM.
11 #     OpenFOAM is free software: you can redistribute it and/or modify it
12 #     under the terms of the GNU General Public License as published by
13 #     the Free Software Foundation, either version 3 of the License, or
14 #     (at your option) any later version.
16 #     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 #     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 #     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19 #     for more details.
21 #     You should have received a copy of the GNU General Public License
22 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
24 # File
25 #     paraview3/cshrc
27 # Description
28 #     Setup file for paraview-3.x
29 #     Sourced from OpenFOAM-*/etc/cshrc or from foamPV alias
31 # Note
32 #     The env. variables 'ParaView_DIR' and 'ParaView_MAJOR'
33 #     are required for building plugins
34 #------------------------------------------------------------------------------
36 # clean the PATH
37 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-"`
38 if ( $status == 0 ) setenv PATH $cleaned
40 # determine the cmake to be used
41 unsetenv CMAKE_HOME
42 foreach cmake ( cmake-2.8.1 cmake-2.8.0 cmake-2.6.4 )
43     set cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
44     if ( -r $cmake ) then
45         setenv CMAKE_HOME $cmake
46         setenv PATH ${CMAKE_HOME}/bin:${PATH}
47         break
48     endif
49 end
51 # set VERSION and MAJOR (version) variables
52 setenv ParaView_VERSION 3.8.0
53 setenv ParaView_MAJOR unknown
55 # if needed, set MAJOR version to correspond to VERSION
56 # ParaView_MAJOR is "<digits>.<digits>" from ParaView_VERSION
57 switch ("$ParaView_VERSION")
58 case "$ParaView_MAJOR".*:
59     # version and major appear to correspond
60     breaksw
62 case [0-9]*:
63     # extract major from the version
64     setenv ParaView_MAJOR `echo ${ParaView_VERSION} | \
65         sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
66     breaksw
67 endsw
70 set paraviewInstDir=$WM_THIRD_PARTY_DIR/paraview-${ParaView_VERSION}
71 setenv ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-${ParaView_VERSION}
73 # set paths if binaries or source are present
74 if ( -r $ParaView_DIR || -r $paraviewInstDir ) then
75     setenv PATH ${ParaView_DIR}/bin:${PATH}
76     setenv PV_PLUGIN_PATH $FOAM_LIBBIN/paraview-${ParaView_MAJOR}
78     # add in python libraries if required
79     set paraviewPython=$ParaView_DIR/Utilities/VTKPythonWrapping
80     if ( -r $paraviewPython ) then
81         if ($?PYTHONPATH) then
82             setenv PYTHONPATH ${PYTHONPATH}:${paraviewPython}:$ParaView_DIR/lib/paraview-${ParaView_MAJOR}
83         else
84             setenv PYTHONPATH ${paraviewPython}:$ParaView_DIR/lib/paraview-${ParaView_MAJOR}
85         endif
86     endif
87 else
88     unsetenv PV_PLUGIN_PATH
89 endif
92 unset cleaned cmake paraviewInstDir paraviewPython
93 # -----------------------------------------------------------------------------