openfoam/etc/config.csh/aliases
Mark Olesen 831a47b81e CONFIG: eliminate most occurances of outdated FOAM_INST_DIR (issue #444)
- since 1612, FOAM_INST_DIR and foamInstDir longer have any
  special meanings when sourcing the bashrc or cshrc files.
  Thus no need for special treatment in any of the dispatch wrappers.

  Retained FOAM_INST_DIR as (unexported) variable in etc/bashrc,
  just in case people are using patched versions of etc/bashrc
  as part of their installation.

ENH: relax prefix restrictions on foamCreateVideo (issue #904)

- shift the implicit '.' to be part of the default prefix. This allows
  things like "-image myimages_00" to work as might be expected.
2018-06-25 09:56:34 +02:00

76 lines
2.4 KiB
Bash

#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
#
# File
# etc/config.csh/aliases
# - sourced by OpenFOAM-*/etc/cshrc (or from the user's ~/.cshrc)
#
# Description
# Aliases for working with OpenFOAM
#
#------------------------------------------------------------------------------
# Change compiled version aliases
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias wmSet 'source $WM_PROJECT_DIR/etc/cshrc'
alias wmInt32 'wmSet WM_LABEL_SIZE=32'
alias wmInt64 'wmSet WM_LABEL_SIZE=64'
alias wmSP 'wmSet WM_PRECISION_OPTION=SP'
alias wmDP 'wmSet WM_PRECISION_OPTION=DP'
# Clear env
alias wmUnset 'source $WM_PROJECT_DIR/etc/config.csh/unset'
# Toggle wmakeScheduler on/off
# - also need to set WM_HOSTS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias wmSchedOn 'setenv WM_SCHEDULER $WM_PROJECT_DIR/wmake/wmakeScheduler'
alias wmSchedOff 'unsetenv WM_SCHEDULER'
# Change directory aliases
# ~~~~~~~~~~~~~~~~~~~~~~~~
alias foam 'cd $WM_PROJECT_DIR'
alias src 'cd $FOAM_SRC'
alias lib 'cd $FOAM_LIBBIN'
alias app 'cd $FOAM_APP'
alias sol 'cd $FOAM_SOLVERS'
alias util 'cd $FOAM_UTILITIES'
alias tut 'cd $FOAM_TUTORIALS'
alias run 'cd $FOAM_RUN'
alias ufoam 'cd $WM_PROJECT_USER_DIR'
alias uapp 'cd $WM_PROJECT_USER_DIR/applications'
alias usol 'cd $WM_PROJECT_USER_DIR/applications/solvers'
alias uutil 'cd $WM_PROJECT_USER_DIR/applications/utilities'
# Refresh the environment
# ~~~~~~~~~~~~~~~~~~~~~~~
alias wmRefresh 'set projectDir=$WM_PROJECT_DIR; set foamSettings=$FOAM_SETTINGS; wmUnset; source $projectDir/etc/cshrc $foamSettings'
# Change OpenFOAM version
# ~~~~~~~~~~~~~~~~~~~~~~~
alias foamVersion \
'if ( "\!*" != "" ) source ${WM_PROJECT_DIR:h}/OpenFOAM-\!*/etc/cshrc; foam; echo OpenFOAM-$WM_PROJECT_VERSION'
# Change ParaView version
# ~~~~~~~~~~~~~~~~~~~~~~~
alias foamPV \
'source $WM_PROJECT_DIR/etc/config.csh/paraview ParaView_VERSION=\!*; echo ${ParaView_DIR:t}'
#------------------------------------------------------------------------------