forked from hystrath/hyStrath
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-MHD.sh
executable file
·42 lines (29 loc) · 940 Bytes
/
install-MHD.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
#!/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
# copy new files --------------------------------------------------------------
cp -r $currentDir/src $sendingDir/
cp -r $currentDir/applications $sendingDir/
cp -r $currentDir/run $sendingDir/
# compile new libraries -------------------------------------------------------
cd $sendingDir/src/mhdModel/
wclean libso
wmake -j$nProcs libso
# compile new executables ------------------------------------------------------
#---- solver ----
cd $sendingDir/applications/solvers/compressible/hy2MhdFoam
wclean
wmake -j$nProcs
# re-set to the initial directory ---------------------------------------------
cd $currentDir
echo "
Hybrid module CFD-MHD $WM_PROJECT_VERSION compiled successfully. Hope you'll enjoy it, $userName :)
"