Last active
May 28, 2016 13:39
-
-
Save petebachant/29163ef98ba9c2e63db63883c2d7dbba to your computer and use it in GitHub Desktop.
Function in my bashrc for activating OpenFOAM envs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function openfoam() { | |
| OF_VERSION=$1 | |
| # echo "Activating OpenFOAM-$OF_VERSION environment" | |
| source /home/pete/OpenFOAM/OpenFOAM-$OF_VERSION/etc/bashrc | |
| if [[ "$OF_VERSION" == "2"* ]] | |
| then | |
| export ParaView_DIR=/home/pete/OpenFOAM/ThirdParty-$OF_VERSION/platforms/linux64Gcc/ParaView-4.1.0 | |
| export PATH=$ParaView_DIR/bin:$PATH | |
| export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-4.1 | |
| else | |
| export ParaView_DIR=/home/pete/OpenFOAM/ThirdParty-$OF_VERSION/platforms/linux64Gcc/ParaView-4.4.0 | |
| export PATH=$ParaView_DIR/bin:$PATH | |
| export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-4.4 | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment