mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop
This commit is contained in:
@ -97,29 +97,24 @@ cleanCase()
|
|||||||
rm -rf surfaceSampling > /dev/null 2>&1
|
rm -rf surfaceSampling > /dev/null 2>&1
|
||||||
rm -rf cuttingPlane > /dev/null 2>&1
|
rm -rf cuttingPlane > /dev/null 2>&1
|
||||||
rm -rf system/machines > /dev/null 2>&1
|
rm -rf system/machines > /dev/null 2>&1
|
||||||
|
rm -rf Ensight EnSight ensightWrite VTK > /dev/null 2>&1
|
||||||
|
|
||||||
# From mpirunDebug
|
# From mpirunDebug
|
||||||
rm -f gdbCommands mpirun.schema
|
rm -f gdbCommands mpirun.schema
|
||||||
|
|
||||||
cleanSnappyFiles
|
cleanSnappyFiles
|
||||||
if [ -d constant/polyMesh ]
|
rm -f 0/cellDist > /dev/null 2>&1
|
||||||
then
|
|
||||||
rm -rf constant/polyMesh > /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
if [ -d constant ]
|
if [ -d constant ]
|
||||||
then
|
then
|
||||||
(cd constant && \
|
(cd constant && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
cellToRegion cellLevel* pointLevel* \
|
cellDecomposition cellToRegion cellLevel* pointLevel* \
|
||||||
|
polyMesh tetDualMesh \
|
||||||
> /dev/null 2>&1 \
|
> /dev/null 2>&1 \
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf constant/tetDualMesh > /dev/null 2>&1
|
|
||||||
|
|
||||||
rm -rf VTK > /dev/null 2>&1
|
|
||||||
rm -f 0/cellLevel 0/pointLevel 0/cellDist constant/cellDecomposition
|
|
||||||
|
|
||||||
if [ -e system/blockMeshDict.m4 ]
|
if [ -e system/blockMeshDict.m4 ]
|
||||||
then
|
then
|
||||||
rm -f system/blockMeshDict > /dev/null 2>&1
|
rm -f system/blockMeshDict > /dev/null 2>&1
|
||||||
@ -130,7 +125,7 @@ cleanCase()
|
|||||||
removeCase()
|
removeCase()
|
||||||
{
|
{
|
||||||
echo "Removing ${1:-unknown} case"
|
echo "Removing ${1:-unknown} case"
|
||||||
rm -rf $1
|
[ "$#" -ge 1 ] && rm -rf "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -42,23 +42,54 @@ isParallel()
|
|||||||
#
|
#
|
||||||
isTest()
|
isTest()
|
||||||
{
|
{
|
||||||
for i in "$@"; do
|
for i; do [ "$i" = "-test" ] && return 0; done
|
||||||
if [ "$i" = "-test" ]
|
|
||||||
then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Extract 'numberOfSubdomains' from system/decomposeParDict
|
||||||
|
# (or alternative location).
|
||||||
|
#
|
||||||
|
# On failure:
|
||||||
|
# return '1'
|
||||||
|
# exit status 1
|
||||||
|
#
|
||||||
getNumberOfProcessors()
|
getNumberOfProcessors()
|
||||||
{
|
{
|
||||||
foamDictionary -entry numberOfSubdomains -value system/decomposeParDict
|
# Re-use positional parameters for automatic whitespace elimination
|
||||||
|
set -- $(foamDictionary -entry numberOfSubdomains -value "${1:-system/decomposeParDict}")
|
||||||
|
|
||||||
|
if [ "$#" -eq 1 ]
|
||||||
|
then
|
||||||
|
echo "$1"
|
||||||
|
else
|
||||||
|
echo "Error retrieving 'numberOfSubdomains' from decomposeParDict" 1>&2
|
||||||
|
echo 1
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Extract 'application' from system/controlDict
|
||||||
|
#
|
||||||
|
# On failure:
|
||||||
|
# return 'false' which is also a command (ie, shell builtin or /bin/false)
|
||||||
|
# exit status 1
|
||||||
|
#
|
||||||
getApplication()
|
getApplication()
|
||||||
{
|
{
|
||||||
sed -ne 's/^ *application\s*\([a-zA-Z]*\)\s*;.*$/\1/p' system/controlDict
|
# Re-use positional parameters for automatic whitespace elimination
|
||||||
|
set -- $(foamDictionary -entry application -value system/controlDict)
|
||||||
|
|
||||||
|
if [ "$#" -eq 1 ]
|
||||||
|
then
|
||||||
|
echo "$1"
|
||||||
|
else
|
||||||
|
echo "Error retrieving 'application' from controlDict" 1>&2
|
||||||
|
echo false
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
runApplication()
|
runApplication()
|
||||||
|
|||||||
Reference in New Issue
Block a user