#!/bin/bash -e

processors=8 
 
cd background

rm -r 0
cp -r 0_org 0

setFields > log.setFields

setFields -dict system/setFieldsDict_init > log.setFields_init

decomposePar -force > log.decomposePar

mpirun -np $processors renumberMesh -overwrite -parallel > log.renumberMesh
mpirun -np $processors overPimpleDyMFoam -parallel > log.solver
#mpirun -np $processors moveMesh -parallel -noFunctionObjects | tee log.solver

rm -r processor*