Merge branch 'master' of github.com:OpenCFD/OpenFOAM-2.0.x
[OpenFOAM-2.0.x.git] / etc / config / aliases.sh
blob188159745c185b1d43244ca4f027e7716d402e45
1 #----------------------------------*-sh-*--------------------------------------
2 # ========= |
3 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 # \\ / O peration |
5 # \\ / A nd | Copyright (C) 2004-2011 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 # etc/config/aliases.sh
27 # Description
28 # Aliases for working with OpenFOAM
29 # Sourced from OpenFOAM-<VERSION>/etc/bashrc and/or ~/.bashrc
31 #------------------------------------------------------------------------------
33 # Change compiled version aliases
34 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 alias wmSET='. $WM_PROJECT_DIR/etc/bashrc'
36 alias wm64='wmSET WM_ARCH_OPTION=64'
37 alias wm32='wmSET WM_ARCH_OPTION=32'
38 alias wmSP='wmSET WM_PRECISION_OPTION=SP'
39 alias wmDP='wmSET WM_PRECISION_OPTION=DP'
41 # clear env
42 alias wmUNSET='. $WM_PROJECT_DIR/etc/config/unset.sh'
44 # Toggle wmakeScheduler on/off
45 # - also need to set WM_HOSTS
46 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47 alias wmSchedON='export WM_SCHEDULER=$WM_PROJECT_DIR/wmake/wmakeScheduler'
48 alias wmSchedOFF='unset WM_SCHEDULER'
50 # Change ParaView version
51 # ~~~~~~~~~~~~~~~~~~~~~~~
52 unset foamPV
53 foamPV()
55 . $WM_PROJECT_DIR/etc/config/paraview.sh ParaView_VERSION=$1
56 echo "paraview-$ParaView_VERSION (major: $ParaView_MAJOR)"
60 # Change directory aliases
61 # ~~~~~~~~~~~~~~~~~~~~~~~~
62 alias src='cd $FOAM_SRC'
63 alias lib='cd $FOAM_LIBBIN'
64 alias run='cd $FOAM_RUN'
65 alias foam='cd $WM_PROJECT_DIR'
66 alias foamsrc='cd $FOAM_SRC/$WM_PROJECT'
67 alias foamfv='cd $FOAM_SRC/finiteVolume'
68 alias app='cd $FOAM_APP'
69 alias util='cd $FOAM_UTILITIES'
70 alias sol='cd $FOAM_SOLVERS'
71 alias tut='cd $FOAM_TUTORIALS'
73 alias foamApps='cd $FOAM_APP'
74 alias foamSol='cd $FOAM_SOLVERS'
75 alias foamTuts='cd $FOAM_TUTORIALS'
76 alias foamUtils='cd $FOAM_UTILITIES'
77 alias foam3rdParty='cd $WM_THIRD_PARTY_DIR'
79 if [ -n "$WM_PROJECT_SITE" ]
80 then
81 alias foamSite='cd $WM_PROJECT_SITE'
82 else
83 alias foamSite='cd $WM_PROJECT_INST_DIR/site'
86 # -----------------------------------------------------------------------------