New: kill process function
This commit is contained in:
parent
8e1e14217a
commit
893250d35f
@ -11,6 +11,7 @@ anisotropy-help()
|
|||||||
echo " clean Clean project directory via git (.gitignore)."
|
echo " clean Clean project directory via git (.gitignore)."
|
||||||
echo " init Activate environment and install dependencies."
|
echo " init Activate environment and install dependencies."
|
||||||
echo " run Start calculations and etc."
|
echo " run Start calculations and etc."
|
||||||
|
echo " kill Kill current process by pid"
|
||||||
echo " help Show help for commands."
|
echo " help Show help for commands."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
@ -35,10 +36,19 @@ case $1 in
|
|||||||
run)
|
run)
|
||||||
source ${OPENFOAM}
|
source ${OPENFOAM}
|
||||||
source env/bin/activate
|
source env/bin/activate
|
||||||
|
|
||||||
|
mkdir ${DIR}/build && echo $$ >${DIR}/build/anisotropy.pid
|
||||||
|
|
||||||
python ${DIR}/anisotropy/anisotropy.py ${@:2}
|
python ${DIR}/anisotropy/anisotropy.py ${@:2}
|
||||||
deactivate
|
deactivate
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
kill)
|
||||||
|
pid="${DIR}/build/anisotropy.pid"
|
||||||
|
kill -9 $(cat $pid)
|
||||||
|
rm $pid
|
||||||
|
;;
|
||||||
|
|
||||||
help)
|
help)
|
||||||
anisotropy-help
|
anisotropy-help
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -12,7 +12,7 @@ format = "%(levelname)s: %(message)s"
|
|||||||
|
|
||||||
[base]
|
[base]
|
||||||
simple = true
|
simple = true
|
||||||
bodyCentered = false
|
bodyCentered = true
|
||||||
faceCentered = true
|
faceCentered = true
|
||||||
|
|
||||||
###
|
###
|
||||||
@ -30,7 +30,7 @@ directions = [
|
|||||||
fillet = true
|
fillet = true
|
||||||
|
|
||||||
[simple.mesh]
|
[simple.mesh]
|
||||||
fineness = 3
|
fineness = 1
|
||||||
minSize = 0.01
|
minSize = 0.01
|
||||||
maxSize = 0.1
|
maxSize = 0.1
|
||||||
growthRate = 0.5
|
growthRate = 0.5
|
||||||
@ -65,7 +65,7 @@ directions = [
|
|||||||
fillet = true
|
fillet = true
|
||||||
|
|
||||||
[bodyCentered.mesh]
|
[bodyCentered.mesh]
|
||||||
fineness = 2
|
fineness = 1
|
||||||
minSize = 0.005
|
minSize = 0.005
|
||||||
maxSize = 0.05
|
maxSize = 0.05
|
||||||
growthRate = 0.5
|
growthRate = 0.5
|
||||||
@ -100,7 +100,7 @@ directions = [
|
|||||||
fillet = true
|
fillet = true
|
||||||
|
|
||||||
[faceCentered.mesh]
|
[faceCentered.mesh]
|
||||||
fineness = 2
|
fineness = 1
|
||||||
minSize = 0.005
|
minSize = 0.005
|
||||||
maxSize = 0.05
|
maxSize = 0.05
|
||||||
growthRate = 0.5
|
growthRate = 0.5
|
||||||
|
Loading…
Reference in New Issue
Block a user