mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
31 lines
635 B
Bash
Executable File
31 lines
635 B
Bash
Executable File
#!/bin/sh
|
|
# Source run functions
|
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
|
|
|
# to be executed from one level above the source directory
|
|
|
|
if [ $# -eq 0 ]
|
|
then
|
|
sourceName="dataBase"
|
|
targetName="dataBaseCoarse"
|
|
else
|
|
sourceName=$1
|
|
targetName=$2
|
|
fi
|
|
|
|
cd $sourceName
|
|
|
|
for time in *
|
|
do
|
|
if [ $time != "system" ] && [ $time != "constant" ];
|
|
then
|
|
cd ../$targetName
|
|
echo "Found $time."
|
|
sed -i "/^startTime/c\startTime \t$time;" ./system/controlDict
|
|
grep 'startTime' ./system/controlDict
|
|
mapFields ../$sourceName -sourceTime $time -consistent
|
|
cd ../$sourceName
|
|
fi
|
|
done
|
|
|