mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
foamCleanPolyMesh: No need to warn about missing 'polyMesh' directories
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -50,7 +50,7 @@ USAGE
|
|||||||
|
|
||||||
unset caseDir regionName
|
unset caseDir regionName
|
||||||
|
|
||||||
# parse a single option
|
# Parse a single option
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@ -81,12 +81,12 @@ else
|
|||||||
meshDir=polyMesh
|
meshDir=polyMesh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if -case was specified: insist upon 'constant/polyMesh'
|
# If -case was specified: insist upon 'constant/polyMesh'
|
||||||
if [ -n "$caseDir" ]
|
if [ -n "$caseDir" ]
|
||||||
then
|
then
|
||||||
if [ -d constant/$meshDir ]
|
if [ -d constant/$meshDir ]
|
||||||
then
|
then
|
||||||
# use constant/polyMesh
|
# Use constant/polyMesh
|
||||||
meshDir=constant/$meshDir
|
meshDir=constant/$meshDir
|
||||||
else
|
else
|
||||||
echo "Error: no 'constant/$meshDir' in $caseDir" 1>&2
|
echo "Error: no 'constant/$meshDir' in $caseDir" 1>&2
|
||||||
@ -95,27 +95,22 @@ then
|
|||||||
else
|
else
|
||||||
if [ -d constant/$meshDir ]
|
if [ -d constant/$meshDir ]
|
||||||
then
|
then
|
||||||
# use constant/polyMesh
|
# Use constant/polyMesh
|
||||||
meshDir=constant/$meshDir
|
meshDir=constant/$meshDir
|
||||||
elif [ -d $meshDir ]
|
elif [ -d $meshDir ]
|
||||||
then
|
then
|
||||||
# likely already in constant/ - do not adjust anything
|
# Likely already in constant/ - do not adjust anything
|
||||||
:
|
:
|
||||||
elif [ "${PWD##*/}" = polyMesh -a -z "$regionName" ]
|
elif [ "${PWD##*/}" = polyMesh -a -z "$regionName" ]
|
||||||
then
|
then
|
||||||
# apparently already within polyMesh/
|
# Apparently already within polyMesh/
|
||||||
meshDir=.
|
meshDir=.
|
||||||
else
|
|
||||||
echo "Error: no appropriate 'polyMesh/' directory found" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#
|
# Remove files (mesh itself, modifiers, snappyHexMesh ones) and subdirectories
|
||||||
# remove files (mesh itself, modifiers, snappyHexMesh ones) and subdirectories
|
|
||||||
# also remove .gz versions of the same files
|
# also remove .gz versions of the same files
|
||||||
#
|
|
||||||
echo "Cleaning ${caseDir:-.}/$meshDir" 1>&2
|
echo "Cleaning ${caseDir:-.}/$meshDir" 1>&2
|
||||||
|
|
||||||
for i in \
|
for i in \
|
||||||
|
|||||||
Reference in New Issue
Block a user