forked from hystrath/hyStrath
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresync-DSMC.sh
executable file
·85 lines (61 loc) · 3.5 KB
/
resync-DSMC.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/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/lagrangian/ $sendingDir/src/lagrangian/
cd $sendingDir/src/lagrangian/
./Allwmake -j$nProcs
rsync -rtvuc $currentDir/src/parallel/decompose/decompose/ $sendingDir/src/parallel/decompose/decompose/
cd $sendingDir/src/parallel/decompose/decompose/
wmake -j$nProcs libso
rsync -rtvuc $currentDir/src/parallel/reconstruct/ $sendingDir/src/parallel/reconstruct/
cd $sendingDir/src/parallel/reconstruct/
./Allwmake -j$nProcs
rsync -rtvuc $currentDir/src/functionObjects/field-dsmcStrath $sendingDir/src/functionObjects/field-dsmcStrath
rsync -rtvuc $currentDir/src/functionObjects/lagrangian $sendingDir/src/functionObjects/lagrangian
cd $sendingDir/src/functionObjects/
./Allwmake-dsmcStrath -j$nProcs
# compile new executables ------------------------------------------------------
#---- solvers ----
rsync -rtvuc $currentDir/applications/solvers/discreteMethods/dsmc/ $sendingDir/applications/solvers/discreteMethods/dsmc/
cd $sendingDir/applications/solvers/discreteMethods/dsmc/
./wmakeAll -j$nProcs
rsync -rtvuc $currentDir/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/ $sendingDir/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/
cd $sendingDir/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/
wmake -j$nProcs
rsync -rtvuc $currentDir/applications/solvers/discreteMethods/molecularDynamics/mdFoam/ $sendingDir/applications/solvers/discreteMethods/molecularDynamics/mdFoam/
cd $sendingDir/applications/solvers/discreteMethods/molecularDynamics/mdFoam/
wmake -j$nProcs
#---- utilities ----
rsync -rtvuc $currentDir/applications/utilities/preProcessing/mapFields $sendingDir/applications/utilities/preProcessing/mapFields
cd $sendingDir/applications/utilities/preProcessing/mapFields
wmake -j$nProcs
rsync -rtvuc $currentDir/applications/utilities/preProcessing/mapFieldsPar $sendingDir/applications/utilities/preProcessing/mapFieldsPar
cd $sendingDir/applications/utilities/preProcessing/mapFieldsPar
wmake -j$nProcs
rsync -rtvuc $currentDir/applications/utilities/preProcessing/dsmc/ $sendingDir/applications/utilities/preProcessing/dsmc/
cd $sendingDir/applications/utilities/preProcessing/dsmc/
./wmakeAll -j$nProcs
rsync -rtvuc $currentDir/applications/utilities/parallelProcessing/ $sendingDir/applications/utilities/parallelProcessing/
cd $sendingDir/applications/utilities/parallelProcessing/
wmake -j$nProcs all
rsync -rtvuc $currentDir/applications/utilities/postProcessing/miscellaneous/foamListTimes/ $sendingDir/applications/utilities/postProcessing/miscellaneous/foamListTimes/
cd $sendingDir/applications/utilities/postProcessing/miscellaneous/foamListTimes/
wmake -j$nProcs
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 "
DSMC module $WM_PROJECT_VERSION updated successfully. Hope you'll enjoy it, $userName :)
"