-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathremesh
executable file
·28 lines (27 loc) · 945 Bytes
/
remesh
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
#!/bin/bash
options=$1
machinefile=$2
if [ -d "constant" ]; then
rm -rf constant/polyMesh/*
blockMesh 2>&1 | tee meshlog.log
surfaceFeatureExtract 2>&1 | tee -a meshlog.log
sed -i.bak s/empty/wall/g constant/polyMesh/boundary
if [ "$options" == "-par" ]
then
rm -rf processor*
decomposePar -force 2>&1 | tee -a meshlog.log
foamJob -parallel -screen snappyHexMesh -overwrite 2>&1 | tee -a meshlog.log
reconstructParMesh -noZero -constant 2>&1 | tee -a meshlog.log
elif [ "$options" == "-mpar" ]; then
rm -rf processor*
decomposePar -force 2>&1 | tee -a meshlog.log
mpirun -np 8 -machinefile $2 snappyHexMesh -parallel -overwrite 2>&1 | tee -a meshlog.log
reconstructParMesh -noZero -constant 2>&1 | tee -a meshlog.log
else
snappyHexMesh -overwrite 2>&1 | tee -a meshlog.log
fi
checkMesh | tee checkMesh.log
sed -i.bak s/empty/wall/g constant/polyMesh/boundary
else
echo "you are not in a case directory"
fi