forked from hystrath/hyStrath
-
Notifications
You must be signed in to change notification settings - Fork 0
/
resync-hybridPICDSMC.sh
executable file
·45 lines (32 loc) · 1.35 KB
/
resync-hybridPICDSMC.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
set -e
userName=`whoami`
currentDir=`pwd`
sendingDir="$WM_PROJECT_USER_DIR"
nProcs=1
if [ $# -ne 0 ]
then nProcs=$1;
fi
mkdir -p $sendingDir
# synchronize folders and compile new libraries -------------------------------
rsync -rtvuc $currentDir/src/lagrangian/regionsAndInterfaces/ $sendingDir/src/lagrangian/regionsAndInterfaces/
cd $sendingDir/src/lagrangian/regionsAndInterfaces/
wmake -j$nProcs libso
rsync -rtvuc $currentDir/src/lagrangian/pic/ $sendingDir/src/lagrangian/pic/
cd $sendingDir/src/lagrangian/pic/
wmake -j$nProcs libso
# compile new executables ------------------------------------------------------
#---- solver ----
rsync -rtvuc $currentDir/applications/solvers/hybridMethods/pdFoam/ $sendingDir/applications/solvers/hybridMethods/pdFoam/
cd $sendingDir/applications/solvers/hybridMethods/pdFoam
wmake -j$nProcs
#---- utilities ----
rsync -rtvuc $currentDir/applications/utilities/preProcessing/hybrid/pdInitialise/ $sendingDir/applications/utilities/preProcessing/hybrid/pdInitialise/
cd $sendingDir/applications/utilities/preProcessing/hybrid/pdInitialise/
wmake -j$nProcs all
# re-set to the initial directory ---------------------------------------------
cd $currentDir
echo "
Hybrid module PIC-DSMC $WM_PROJECT_VERSION compiled successfully. Hope you'll enjoy it, $userName :)
"