#!/bin/sh
cd ${0%/*} || exit 1  # Run script from its own directory

. $WM_PROJECT_DIR/bin/tools/RunFunctions  # Load OpenFOAM run functions

# Create mesh
runApplication blockMesh



# Decompose domain for parallel execution (4 cores)
runApplication checkMesh 

runApplication decomposePar 
 
# Run solver in parallel with PyFoam
 pyFoamPlotRunner.py mpirun -np 4 $(getApplication) -parallel | tee log.$(getApplication)

# Reconstruct results after parallel run
runApplication reconstructPar







