インストールされている OpenFOAM を確認するには以下を実行します。
$ update-alternatives --display OpenFOAM OpenFOAM - status is auto. link currently points to /usr/osxws/OpenFOAM/OpenFOAM-2.0.0/etc/bashrc /usr/osxws/OpenFOAM/OpenFOAM-1.7.1/etc/bashrc - priority 20 slave OpenFOAM-csh: /usr/osxws/OpenFOAM/OpenFOAM-1.7.1/etc/cshrc /usr/osxws/OpenFOAM/OpenFOAM-2.0.0/etc/bashrc - priority 30 slave OpenFOAM-csh: /usr/osxws/OpenFOAM/OpenFOAM-2.0.0/etc/cshrc Current `best' version is /usr/osxws/OpenFOAM/OpenFOAM-2.0.0/etc/bashrc.
$ which blockMesh /usr/osxws/OpenFOAM/OpenFOAM-2.0.0/platforms/darwinIntelDPOpt/bin/blockMesh
OpenFOAM のバージョンを切り替えるには以下を実行します。
ここでは 1.7.1 への変更を例にします。
$ sudo update-alternatives --config OpenFOAM Password: There are 2 alternatives which provide `OpenFOAM'. Selection Alternative ----------------------------------------------- 1 /usr/osxws/OpenFOAM/OpenFOAM-1.7.1/etc/bashrc *+ 2 /usr/osxws/OpenFOAM/OpenFOAM-2.0.0/etc/bashrc Press enter to keep the default[*], or type selection number: 1 Using `/usr/osxws/OpenFOAM/OpenFOAM-1.7.1/etc/bashrc' to provide `OpenFOAM'. $ <re-login> $ which blockMesh /usr/osxws/OpenFOAM/OpenFOAM-1.7.1/applications/bin/darwinIntel64DPOpt/blockMesh