#!/bin/sh
cd “${0%/*}” || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#——————————————————————————./Allrun.pre
unset coupling parallel testCreate
isTrue -dict controls -entry coupling && coupling=true
isTrue -dict controls -entry parallel && parallel=true
# isTrue -dict controls -entry testCreate && testCreate=true# Remove lock file on interrupt
trap ‘
m -f comms/OpenFOAM.lock 2>/dev/null’ INT# Decompose
if [ “$parallel” = true ]
thenrunApplication decomposePar
# ## Can verify parallel operation of createExternalCoupledPatchGeometry
if [ “$coupling” = true ] && [ “$testCreate” = true ]
thenrm -f log.createExternalCoupledPatchGeometry
runParallel createExternalCoupledPatchGeometry \r
coupleGroup \r
-commsDir $PWD/commsfi
fi
if [ “$coupling” = true ]
thenecho “Running with external coupling”
# Controls
cat | externalCoupled.control
//- Overrides for externalCoupled
enabled true;
CONTROLS# Run OpenFOAM, with externalCoupled enabled
if [ “$parallel” = true ]
thenrunParallel $(getApplication) &
else
runApplication $(getApplication) &
fi
# Simulated external solver
runApplication ./externalSolverelse
echo “Running without external coupling”
# Controls
cat | externalCoupled.control
//- Overrides for externalCoupled
enabled false;
CONTROLS# Run OpenFOAM, with externalCoupled disabled
if [ “$parallel” = true ]
thenrunParallel $(getApplication)
else
runApplication $(getApplication)
fi
fi
# Reconstruct
if [ “$parallel” = true ]
thenrunApplication reconstructPar
fi
#——————————————————————————
実行年月:08/02/2024