snowBedFoam/exampleCase/Allrunp

30 lines
702 B
Bash

#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
rm -r log.*
rm -r *.obj
# Get application directory
application=`getApplication`
echo $application
## Get the number of processors to run on from system/decomposeParDict
nProc=$(getNumberOfProcessors)
echo "the number of processors to run on from system/decomposeParDict: $nProc"
# Create mesh
runApplication fluent3DMeshToFoam MOSAiC_seaice.msh
# Re-assign the patches
runApplication createPatch -overwrite
# Distribute domain among processors
runApplication decomposePar
# Run snow transport model
runApplication mpirun -np $nProc $application -parallel