#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions

# Get application name
application=`getApplication`

runApplication blockMesh

cp -r 0.org 0

runApplication decomposePar

for proc in processor*
do
    cp -r 0.org/baffle3DRegion $proc/0/
done

# Create 1D and 3D baffles in parallel
runParallel createBaffles 2 -overwrite

# Run the case in parallel
runParallel $application 2

# Note: You must use the built-in reader for seeing the two regions in parallel
paraFoam -touch -builtin
