#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allrun.pre
runApplication decomposePar
runParallel `getApplication`
runApplication reconstructPar
At first we set the working directory.
Using RunFunctions we introduce the functions from file $WM_PROJECT_DIR/bin/tools/RunFunctions , which will be auxiliary functions in the script (e.g. getApplication, runApplication and runParallel).
Running script Allrun.pre makes the mesh and runs other necessary initializations (see the next section).
We distribute the computation to multiple processors using decomposePar, do the parallel computation using mpiexec and in the end reconstruct the results and mesh using reconstructPar.