forked from hystrath/hyStrath
-
Notifications
You must be signed in to change notification settings - Fork 0
/
resync-CFD.sh
executable file
·67 lines (48 loc) · 2.16 KB
/
resync-CFD.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
set -e
userName=`whoami`
currentDir=`pwd`
sendingDir="$WM_PROJECT_USER_DIR"
nProcs=1
if [ $# -ne 0 ]
then nProcs=$1;
fi
# synchronize folders and compile new libraries -------------------------------
rsync -rtvuc $currentDir/src/thermophysicalModels/strath/ $sendingDir/src/thermophysicalModels/strath/
cd $sendingDir/src/thermophysicalModels/strath/
./Allwmake -j$nProcs
rsync -rtvuc $currentDir/src/TurbulenceModels/ $sendingDir/src/TurbulenceModels/
cd $sendingDir/src/TurbulenceModels/
./Allwmake -j$nProcs
cd $sendingDir/src/thermophysicalModels/strath/
./AllwmakeBis -j$nProcs
rsync -rtvuc $currentDir/src/hTCModels/ $sendingDir/src/hTCModels/
cd $sendingDir/src/hTCModels
wmake -j$nProcs libso
rsync -rtvuc $currentDir/src/finiteVolume/ $sendingDir/src/finiteVolume/
cd $sendingDir/src/finiteVolume
wmake -j$nProcs libso
rsync -rtvuc $currentDir/src/functionObjects/forces $sendingDir/src/functionObjects/forces
rsync -rtvuc $currentDir/src/functionObjects/field-cfdStrath $sendingDir/src/functionObjects/field-cfdStrath
cd $sendingDir/src/functionObjects
./Allwmake-cfdStrath -j$nProcs
rsync -rtvuc $currentDir/src/fvOptions/ $sendingDir/src/fvOptions/
cd $sendingDir/src/fvOptions
wmake -j$nProcs libso
# compile new executables ------------------------------------------------------
#---- solvers ----
rsync -rtvuc $currentDir/applications/solvers/compressible/hy2Foam/ $sendingDir/applications/solvers/compressible/hy2Foam/
cd $sendingDir/applications/solvers/compressible/hy2Foam/
./Allwmake -j$nProcs
#---- utilities ----
rsync -rtvuc $currentDir/applications/utilities/mesh/generation/makeAxialMesh $sendingDir/applications/utilities/mesh/generation/makeAxialMesh
cd $sendingDir/applications/utilities/mesh/generation/makeAxialMesh
wmake -j$nProcs
rsync -rtvuc $currentDir/applications/utilities/mesh/generation/blockMeshDG $sendingDir/applications/utilities/mesh/generation/blockMeshDG
cd $sendingDir/applications/utilities/mesh/generation/blockMeshDG
./Allwmake -j$nProcs
# re-set to the initial directory ---------------------------------------------
cd $currentDir
echo "
CFD module $WM_PROJECT_VERSION updated successfully. Hope you'll enjoy it, $userName :)
"