STYLE: remove unnecessary stdout, stderr /dev/null redirects

- no stderr redirect needed:
    * 'command -v'

- no stdout/stderr redirect needed:
    * 'rm -f'

STYLE: consistent spacing after redirects
This commit is contained in:
Mark Olesen
2019-11-06 10:44:36 +01:00
committed by Andrew Heather
parent ec7e3c88e4
commit e6dfb39c66
131 changed files with 281 additions and 282 deletions

View File

@ -7,7 +7,7 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2015-2016 OpenFOAM Foundation
# Copyright (C) 2018 OpenCFD Ltd.
# Copyright (C) 2018-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
@ -138,7 +138,7 @@ do
-webm)
# webm - needs avconv
outputFormat=webm
command -v avconv >/dev/null 2>&1 || \
command -v avconv >/dev/null || \
die "webm format requires avconv, which was not found."
;;
-*)
@ -168,7 +168,7 @@ echo
if [ "$outputFormat" = webm ]
then
if command -v avconv >/dev/null 2>&1
if command -v avconv >/dev/null
then
echo "Creating video with avconv..."
avconv \
@ -180,7 +180,7 @@ then
die "webm format requires avconv, which was not found."
fi
else
if command -v avconv >/dev/null 2>&1
if command -v avconv >/dev/null
then
echo "Creating video with avconv..."
avconv \
@ -189,7 +189,7 @@ else
-c:v libx264 -pix_fmt yuv420p \
"$outputPrefix.$outputFormat"
elif command -v mencoder >/dev/null 2>&1
elif command -v mencoder >/dev/null
then
echo "Creating video with mencoder..."
mencoder \

View File

@ -296,7 +296,7 @@ say
# Generate Awk program
#-----------------------------
rm -f $AWKFILE 2> /dev/null
rm -f $AWKFILE
cat << AWK_CONTENTS > $AWKFILE
# Awk script for OpenFOAM log file extraction
BEGIN {

View File

@ -6,7 +6,7 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2015-2018 OpenCFD Ltd.
# Copyright (C) 2015-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
@ -27,14 +27,14 @@ cleanTimeDirectories()
while [ ${#zeros} -lt 8 ]
do
timeDir="0.${zeros}[1-9]*"
rm -rf ./${timeDir} ./-${timeDir} > /dev/null 2>&1
rm -rf ./${timeDir} ./-${timeDir}
zeros="0$zeros"
done
rm -rf \
./[1-9]* ./-[1-9]* ./log ./log.* ./log-* ./logSummary.* \
./.fxLock ./*.xml ./ParaView* ./paraFoam* \
./*.blockMesh ./*.foam ./*.OpenFOAM \
./.setSet > /dev/null 2>&1
./.setSet
}
@ -42,7 +42,7 @@ cleanAdiosOutput()
{
if [ -d adiosData ] && [ -d system ]
then
rm -rf adiosData > /dev/null 2>&1
rm -rf adiosData
fi
}
@ -51,7 +51,7 @@ cleanDynamicCode()
{
if [ -d dynamicCode ] && [ -d system ]
then
rm -rf dynamicCode > /dev/null 2>&1
rm -rf dynamicCode
fi
}
@ -63,23 +63,23 @@ cleanSnappyFiles()
constant/polyMesh/pointLevel \
constant/polyMesh/refinementHistory \
constant/polyMesh/level0Edge \
constant/polyMesh/surfaceIndex > /dev/null 2>&1
constant/polyMesh/surfaceIndex
rm -f \
processor*/constant/polyMesh/cellLevel \
processor*/constant/polyMesh/pointLevel \
processor*/constant/polyMesh/refinementHistory \
processor*/constant/polyMesh/level0Edge \
processor*/constant/polyMesh/surfaceIndex > /dev/null 2>&1
processor*/constant/polyMesh/surfaceIndex
rm -f \
constant/cellLevel \
constant/pointLevel \
0/cellLevel \
0/pointLevel > /dev/null 2>&1
0/pointLevel
rm -f \
processor*/constant/cellLevel \
processor*/constant/pointLevel \
processor*/0/cellLevel \
processor*/0/pointLevel > /dev/null 2>&1
processor*/0/pointLevel
}
@ -92,11 +92,11 @@ cleanOptimisation()
cleanPostProcessing()
{
rm -rf Ensight EnSight ensightWrite insitu VTK > /dev/null 2>&1
rm -rf postProcessing > /dev/null 2>&1
rm -rf postProcessing-dry-run > /dev/null 2>&1
rm -rf cuttingPlane > /dev/null 2>&1
rm -rf surfaceSampling > /dev/null 2>&1
rm -rf Ensight EnSight ensightWrite insitu VTK
rm -rf postProcessing
rm -rf postProcessing-*
rm -rf cuttingPlane
rm -rf surfaceSampling
}
@ -108,19 +108,19 @@ cleanCase()
cleanDynamicCode
cleanOptimisation
rm -rf processor* > /dev/null 2>&1
rm -rf TDAC > /dev/null 2>&1
rm -rf probes* > /dev/null 2>&1
rm -rf forces* > /dev/null 2>&1
rm -rf graphs* > /dev/null 2>&1
rm -rf sets > /dev/null 2>&1
rm -rf system/machines > /dev/null 2>&1
rm -rf processor*
rm -rf TDAC
rm -rf probes*
rm -rf forces*
rm -rf graphs*
rm -rf sets
rm -rf system/machines
# From mpirunDebug
rm -f gdbCommands mpirun.schema
cleanSnappyFiles
rm -f 0/cellDist > /dev/null 2>&1
rm -f 0/cellDist
(
cd constant 2>/dev/null || exit 0
@ -128,13 +128,13 @@ cleanCase()
rm -rf \
cellDecomposition cellToRegion cellLevel* pointLevel* \
tetDualMesh \
> /dev/null 2>&1
;
# Old constant/polyMesh location for blockMeshDict still in use?
# - emit a gentle warning
if [ -e polyMesh/blockMeshDict.m4 ]
then
rm -f polyMesh/blockMeshDict > /dev/null 2>&1
rm -f polyMesh/blockMeshDict
echo
echo "Warning: not removing constant/polyMesh/ "
echo " it contains a blockMeshDict, which should normally be under system/ instead"
@ -147,13 +147,13 @@ cleanCase()
echo
else
# Remove polyMesh entirely if there is no blockMeshDict
rm -rf polyMesh > /dev/null 2>&1
rm -rf polyMesh
fi
)
if [ -e system/blockMeshDict.m4 ]
then
rm -f system/blockMeshDict > /dev/null 2>&1
rm -f system/blockMeshDict
fi
}
@ -175,24 +175,22 @@ removeCase()
cleanSamples()
{
rm -rf sets samples sampleSurfaces > /dev/null 2>&1
rm -rf sets samples sampleSurfaces
}
cleanUcomponents()
{
rm -rf 0/Ux 0/Uy 0/Uz > /dev/null 2>&1
rm -rf 0/Ux 0/Uy 0/Uz
}
cleanFaMesh ()
{
(
cd constant/faMesh 2>/dev/null && \
rm -rf \
faceLabels* faBoundary* \
> /dev/null 2>&1 \
)
constant/faMesh/faceLabels* \
constant/faMesh/faBoundary* \
;
}

View File

@ -5,7 +5,7 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2017 OpenCFD Ltd.
# Copyright (C) 2017-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
@ -73,7 +73,7 @@ logReport()
collectLogs()
{
echo "Collecting log files..." 1>&2
rm -f logs testLoopReport > /dev/null 2>&1
rm -f logs testLoopReport
touch logs testLoopReport
local appDir log logFiles
@ -115,7 +115,7 @@ removeLogs()
-name '*.pvs' -o -name '*.foam' -o -name '*.OpenFOAM' \
\) -type f -delete
rm -f logs testLoopReport > /dev/null 2>&1
rm -f logs testLoopReport
}

View File

@ -204,7 +204,7 @@ do
do
extractOptions $appName
done
elif command -v "$item" > /dev/null 2>&1
elif command -v "$item" >/dev/null
then
extractOptions $item
else

View File

@ -138,7 +138,7 @@ echo 1>&2
# Use a tmp file so that we confirm that the content was
# generated and looks somewhat like a manpage (has a SYNOPSIS)
tmpFile="$outputDir/${0##*/}-tmp$$"
trap "rm -fv $tmpFile >/dev/null; exit 0" EXIT TERM INT
trap "rm -fv $tmpFile 2>/dev/null; exit 0" EXIT TERM INT
# Any special filter requirements?
@ -212,7 +212,7 @@ do
do
process $appName
done
elif command -v "$item" > /dev/null 2>&1
elif command -v "$item" >/dev/null
then
process $item
else

View File

@ -114,7 +114,7 @@ rm -rf latex man
# Remove html directory in background
mv html html-stagedRemove$$ 2>/dev/null
rm -rf html-stagedRemove$$ >/dev/null 2>&1 &
rm -rf html-stagedRemove$$ 2>/dev/null &
# Ensure that created files are readable by everyone
umask 22

View File

@ -58,7 +58,7 @@ then
echo "Using CGAL ($cgal_version) -> $CGAL_ARCH_PATH" 1>&2
fi
if command -v _foamAddLibAuto > /dev/null 2>&1 # Normal sourcing (not makeCGAL)
if command -v _foamAddLibAuto >/dev/null # Normal sourcing (not makeCGAL)
then
_foamAddLibAuto $BOOST_ARCH_PATH lib$WM_COMPILER_LIB_ARCH
_foamAddLibAuto $CGAL_ARCH_PATH lib$WM_COMPILER_LIB_ARCH

View File

@ -45,7 +45,7 @@ then
echo "Using fftw ($fftw_version) -> $FFTW_ARCH_PATH" 1>&2
fi
if command -v _foamAddLibAuto > /dev/null 2>&1 # Normal sourcing (not makeFFTW)
if command -v _foamAddLibAuto >/dev/null # Normal sourcing (not makeFFTW)
then
_foamAddLibAuto $FFTW_ARCH_PATH lib$WM_COMPILER_LIB_ARCH

View File

@ -32,7 +32,7 @@ then
echo "Using adios ($adios2_version) -> $ADIOS2_ARCH_PATH" 1>&2
fi
if command -v _foamAddLibAuto > /dev/null 2>&1
if command -v _foamAddLibAuto >/dev/null
then
# Normal sourcing (not makeAdios2)
# Only add to PATH if the directory really exists

View File

@ -78,7 +78,7 @@ foamAddCompletion()
# echo "complete ${appName##*/}" 1>&2
done
elif command -v "$appName" > /dev/null 2>&1
elif command -v "$appName" >/dev/null
then
complete -o filenames -F _of_complete_ "${appName##*/}"
# echo "complete ${appName##*/}" 1>&2

View File

@ -48,7 +48,7 @@ then
echo "Using gperftools ($gperftools_version) -> $GPERFTOOLS_ARCH_PATH" 1>&2
fi
if command -v _foamAddLib > /dev/null 2>&1 # Normal sourcing
if command -v _foamAddLib >/dev/null # Normal sourcing
then
# If GPERFTOOLS_ARCH_PATH does not end with '-system' or '-none',

View File

@ -38,9 +38,9 @@ then
echo "Using hypre ($hypre_version) -> $HYPRE_ARCH_PATH" 1>&2
fi
if command -v _foamAddLibAuto > /dev/null 2>&1 # Normal sourcing (not makeHYPRE)
if command -v _foamAddLibAuto >/dev/null
then
# Normal sourcing (not makeHYPRE)
_foamAddLibAuto $HYPRE_ARCH_PATH
unset hypre_version

View File

@ -82,7 +82,7 @@ OPENMPI)
fi
# Could be sourced from ThirdParty with incomplete environment
if command -v _foamAddLibAuto > /dev/null 2>&1 # Normal sourcing
if command -v _foamAddLibAuto >/dev/null # Normal sourcing
then
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddMan $MPI_ARCH_PATH/share/man
@ -151,7 +151,7 @@ MPICH)
export MPI_HOME=$MPI_ARCH_PATH
# Could be sourced from ThirdParty with incomplete environment
if command -v _foamAddLibAuto > /dev/null 2>&1 # Normal sourcing
if command -v _foamAddLibAuto >/dev/null # Normal sourcing
then
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddMan $MPI_ARCH_PATH/share/man
@ -175,7 +175,7 @@ MVA2MPI) # MVAMPICH2
export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
# Could be sourced from ThirdParty with incomplete environment
if command -v _foamAddLibAuto > /dev/null 2>&1 # Normal sourcing
if command -v _foamAddLibAuto >/dev/null # Normal sourcing
then
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddMan $MPI_ARCH_PATH/share/man
@ -341,7 +341,7 @@ esac
# Add (non-dummy) MPI implementation
# - dummy MPI already in lib-path and has no external libraries
if [ "$FOAM_MPI" != dummy ] && type _foamAddLib > /dev/null 2>&1
if [ "$FOAM_MPI" != dummy ] && command -v _foamAddLib >/dev/null
then
if [ -n "$FOAM_EXT_LIBBIN" ] # External libraries (allowed to be unset)
then

View File

@ -201,7 +201,7 @@ esac
#------------------------------------------------------------------------------
if command -v _foamAddLib > /dev/null 2>&1 # normal sourcing
if command -v _foamAddLib >/dev/null # normal sourcing
then
unset ParaView_VERSION ParaView_QT
fi

View File

@ -85,7 +85,7 @@ fi
#------------------------------------------------------------------------------
if command -v _foamAddLib > /dev/null 2>&1 # normal sourcing
if command -v _foamAddLib >/dev/null # normal sourcing
then
unset ParaView_VERSION
else

View File

@ -38,7 +38,7 @@ then
echo "Using petsc ($petsc_version) -> $PETSC_ARCH_PATH" 1>&2
fi
if command -v _foamAddLibAuto > /dev/null 2>&1
if command -v _foamAddLibAuto >/dev/null
then
# Normal sourcing (not makePETSC)

View File

@ -51,7 +51,7 @@ then
echo " llvm ($mesa_llvm) $LLVM_ARCH_PATH" 1>&2
fi
if command -v _foamAddLib > /dev/null 2>&1 # normal sourcing
if command -v _foamAddLib >/dev/null # normal sourcing
then
# Set paths if binaries are present

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# This cleanup handles both cmake runTimePostProcessing and the dummy version
# Cleanup library files with .so version endings
rm -f $FOAM_LIBBIN/librunTimePostProcessing* 2>/dev/null
rm -f $FOAM_LIBBIN/librunTimePostProcessing*
# Cleanup generated files - remove entire top-level
removeObjectDir "$PWD"

View File

@ -27,7 +27,7 @@ then
depend=ignore
elif [ -n "$depend" ]
then
if command -v cmake > /dev/null 2>&1
if command -v cmake >/dev/null
then
cmakeVersioned "$depend" $PWD || {
echo

View File

@ -1,6 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
rm log.* 2>/dev/null # No application, clean manually
rm -f log.* # No application, clean manually
#------------------------------------------------------------------------------

View File

@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
cleanCase
rm -rf Fieldview > /dev/null 2>&1
rm -rf Fieldview
#------------------------------------------------------------------------------

View File

@ -11,7 +11,7 @@ runApplication decomposePar -force
runParallel potentialFoam -pName pPotential -initialiseUBCs
\rm -f processor*/0/phi
rm -f processor*/0/phi
runParallel XiDyMFoam

View File

@ -6,8 +6,8 @@ cd ${0%/*} || exit 1 # Run from this directory
mv ./-180 temp180
cleanCase
rm -rf 0 > /dev/null 2>&1
rm -f constant/polyMesh/boundary > /dev/null 2>&1
rm -rf 0
rm -f constant/polyMesh/boundary
mv temp180 ./-180

View File

@ -1,6 +1,7 @@
#!/bin/sh
command -v gnuplot >/dev/null 2>&1 || {
# Require gnuplot
command -v gnuplot >/dev/null || {
echo "gnuplot not found - skipping graph creation" 1>&2
exit 1
}
@ -21,4 +22,3 @@ gnuplot<<EOF
EOF
#------------------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
#!/bin/sh
# Test if gnuplot exists on the system
command -v gnuplot >/dev/null 2>&1 || {
# Require gnuplot
command -v gnuplot >/dev/null || {
echo "gnuplot not found - skipping graph creation" 1>&2
exit 1
}
@ -22,4 +22,3 @@ gnuplot<<EOF
EOF
#------------------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
#!/bin/sh
# Test if gnuplot exists on the system
command -v gnuplot >/dev/null 2>&1 || {
# Require gnuplot
command -v gnuplot >/dev/null || {
echo "gnuplot not found - skipping graph creation" 1>&2
exit 1
}
@ -22,4 +22,3 @@ gnuplot<<EOF
EOF
#------------------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
#!/bin/sh
# Test if gnuplot exists on the system
command -v gnuplot >/dev/null 2>&1 || {
# Require gnuplot
command -v gnuplot >/dev/null || {
echo "gnuplot not found - skipping graph creation" 1>&2
exit 1
}

View File

@ -1,7 +1,7 @@
#!/bin/sh
# Test if gnuplot exists on the system
command -v gnuplot >/dev/null 2>&1 || {
# Require gnuplot
command -v gnuplot >/dev/null || {
echo "gnuplot not found - skipping graph creation" 1>&2
exit 1
}
@ -22,4 +22,3 @@ gnuplot<<EOF
EOF
#------------------------------------------------------------------------------

View File

@ -55,8 +55,8 @@ EOF
}
# Test if gnuplot exists on the system
command -v gnuplot >/dev/null 2>&1 || {
# Require gnuplot
command -v gnuplot >/dev/null || {
echo "gnuplot not found - skipping graph creation" 1>&2
exit 1
}

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
rm constant/triSurface/membrane-*.stl.gz 2> /dev/null
rm -f constant/triSurface/membrane-*.stl.gz
#------------------------------------------------------------------------------

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
rm constant/geometry/boundaryLayer.obj > /dev/null 2>&1
rm -f constant/geometry/boundaryLayer.obj
#------------------------------------------------------------------------------

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh
#------------------------------------------------------------------------------

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
rm externalCoupled.control 2> /dev/null
rm -f externalCoupled.control
rm -rf comms
### rm -rf VTK

View File

@ -22,7 +22,7 @@ then
# ## Can verify parallel operation of createExternalCoupledPatchGeometry
if [ "$coupling" = true ] && [ "$testCreate" = true ]
then
\rm -f log.createExternalCoupledPatchGeometry
rm -f log.createExternalCoupledPatchGeometry
runParallel createExternalCoupledPatchGeometry \
coupleGroup \
-commsDir $PWD/comms

View File

@ -36,7 +36,7 @@ refGrad=0
valueFraction=1
# Remove any old junk
\rm -f $lockFile 2>/dev/null
rm -f "$lockFile"
log()
{
@ -208,7 +208,7 @@ case "$action" in
log "done"
# Cleanup. Remove the lock file
\rm -f $lockFile 2>/dev/null
rm -f "$lockFile"
;;
esac

View File

@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
# Remove copies of common files
\rm -rf constant
rm -rf constant
#------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
echo "Use common files for 0/, constant/ and blockMeshDict"
\rm -rf 0 constant
rm -rf 0 constant
\cp -r ../common/0.orig 0
\cp -r ../common/constant constant

View File

@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
# Remove copies of common files
\rm -rf constant
rm -rf constant
#------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
echo "Use common files for 0/, constant/ and blockMeshDict"
\rm -rf 0 constant
rm -rf 0 constant
\cp -r ../common/0.orig 0
\cp -r ../common/constant constant

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
rm constant/geometry/boundaryLayer.obj > /dev/null 2>&1
rm -f constant/geometry/boundaryLayer.obj
#------------------------------------------------------------------------------

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/*.eMesh*
rm -rf constant/extendedFeatureEdgeMesh
#------------------------------------------------------------------------------

View File

@ -10,6 +10,7 @@ rm -f \
constant/cellTable \
constant/polyMesh/cellTableId \
constant/polyMesh/interfaces \
constant/polyMesh/origCellId > /dev/null 2>&1
constant/polyMesh/origCellId \
;
#------------------------------------------------------------------------------

View File

@ -15,8 +15,8 @@ rm -f \
constant/cellTable \
constant/polyMesh/cellTableId \
constant/polyMesh/interfaces \
constant/polyMesh/origCellId > /dev/null 2>&1
constant/polyMesh/origCellId \
;
if isParallel "$@"
then

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform
#------------------------------------------------------------------------------

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform
#------------------------------------------------------------------------------

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform
#------------------------------------------------------------------------------

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform
#------------------------------------------------------------------------------

View File

@ -87,8 +87,8 @@ EOF
echo "createGraphs:"
# Test if gnuplot exists on the system
command -v gnuplot >/dev/null 2>&1 || {
# Require gnuplot
command -v gnuplot >/dev/null || {
echo "FOAM FATAL ERROR: gnuplot not found - skipping graph creation" 1>&2
exit 1
}

View File

@ -17,7 +17,7 @@ trap '\rm -f comms/OpenFOAM.lock 2>/dev/null' INT
runApplication decomposePar -allRegions
## Can verify parallel operation of createExternalCoupledPatchGeometry
# \rm -f log.createExternalCoupledPatchGeometry
# rm -f log.createExternalCoupledPatchGeometry
# runParallel createExternalCoupledPatchGeometry \
# -regions '(topAir heater)' coupleGroup \
# -commsDir $PWD/comms

View File

@ -32,7 +32,7 @@ refGrad=0
valueFraction=1
# Remove any old junk
\rm -f $lockFile 2>/dev/null
rm -f "$lockFile"
log()
{
@ -168,7 +168,7 @@ done
log "done"
# Remove the lock file too
\rm -f $lockFile 2>/dev/null
rm -f "$lockFile"
# For log collector:
echo "End"

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
cleanCase0
\rm allVisibleFaces.obj 2>/dev/null
rm -f allVisibleFaces.obj
rm -rf constant/cellToRegion
rm -rf constant/*/polyMesh # region meshes

View File

@ -5,8 +5,8 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/*.eMesh > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh
rm -f constant/triSurface/*.eMesh
rm -rf VTK
rm -rf constant/cellToRegion

View File

@ -17,7 +17,7 @@ trap '\rm -f comms/OpenFOAM.lock 2>/dev/null' INT
runApplication decomposePar -allRegions
## Can verify parallel operation of createExternalCoupledPatchGeometry
# \rm -f log.createExternalCoupledPatchGeometry
# rm -f log.createExternalCoupledPatchGeometry
# runParallel createExternalCoupledPatchGeometry \
# -regions '(topAir heater)' coupleGroup \
# -commsDir $PWD/comms

View File

@ -32,7 +32,7 @@ refGrad=0
valueFraction=1
# Remove any old junk
\rm -f $lockFile 2>/dev/null
rm -f "$lockFile"
log()
{
@ -169,7 +169,7 @@ done
log "done"
# Remove the lock file too
\rm -f $lockFile 2>/dev/null
rm -f "$lockFile"
# For log collector:
echo "End"

View File

@ -37,8 +37,8 @@ cd ${0%/*} || exit 1 # Run from this directory
# Stop on first error
set -e
# Test if gnuplot exists on the system
command -v gnuplot >/dev/null 2>&1 || {
# Require gnuplot
command -v gnuplot >/dev/null || {
echo "FOAM FATAL ERROR: gnuplot not found - skipping graph creation" 1>&2
exit 1
}

View File

@ -6,8 +6,8 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
# Remove surface and features
rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
rm -f constant/triSurface/motorBike.eMesh > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/motorBike.obj.gz
rm -f constant/triSurface/motorBike.eMesh
rm -rf constant/extendedFeatureEdgeMesh
#------------------------------------------------------------------------------

View File

@ -1,5 +1,6 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
# Clean time directories and processors
rm -rf *[1-9]* processor*
@ -8,6 +9,6 @@ rm -rf *[1-9]* processor*
rm -rf optimisation constant/controlPoints
# Clean logs
rm -f log.* 2>/dev/null
rm -f log.*
#------------------------------------------------------------------------------

View File

@ -36,8 +36,9 @@ done
if notTest $@
then
# create validation plot
# Test if gnuplot exists on the system
command -v gnuplot >/dev/null 2>&1 || {
# Require gnuplot
command -v gnuplot >/dev/null || {
echo "gnuplot not found - skipping graph creation" 1>&2
exit 1
}

View File

@ -62,7 +62,7 @@ copyParallelPointDisplacement()
if [ -d "$proc/$latestTime" -a ! -d "$proc/$deltaT" ]
then
mv $proc/$latestTime $proc/$deltaT
\rm -rf $proc/$deltaT/uniform
rm -rf "$proc/$deltaT/uniform"
fi
done
)

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
# Cleanup old junk that may prevent things from starting
\rm -f comms/OpenFOAM.lock
rm -f comms/OpenFOAM.lock
# If OpenFOAM stops prematurely, trigger the external solver to stop
trap '[ -e comms/OpenFOAM.lock ] && echo "status=done" > comms/OpenFOAM.lock' EXIT TERM INT

View File

@ -10,7 +10,7 @@ cp $FOAM_TUTORIALS/resources/geometry/building_wtc2.obj constant/triSurface/
# runApplication surfaceFeatureExtract
runApplication blockMesh
\rm -f constant/polyMesh/*Level
rm -f constant/polyMesh/*Level
unset parallel
parallel=true
@ -23,7 +23,7 @@ then
# Serial
runApplication snappyHexMesh -overwrite
\rm -f constant/polyMesh/refinementHistory*
rm -f constant/polyMesh/refinementHistory*
restore0Dir

View File

@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
cleanCase
\rm -rf constant/boundaryData *.png
rm -rf constant/boundaryData *.png
# -----------------------------------------------------------------------------

View File

@ -29,8 +29,9 @@ runParallel $(getApplication)
if notTest $@
then
# create validation plot
# Test if gnuplot exists on the system
command -v gnuplot >/dev/null 2>&1 || {
# Require gnuplot
command -v gnuplot >/dev/null || {
echo "gnuplot not found - skipping graph creation" 1>&2
exit 1
}

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
rm -f ppGeometry.vtp 2>/dev/null
rm -f ppGeometry.vtp
#------------------------------------------------------------------------------

View File

@ -6,8 +6,8 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
# Remove surfaces and features
rm -f constant/triSurface/propellerTip.obj.gz > /dev/null 2>&1
rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/propellerTip.obj.gz
rm -f constant/triSurface/*.eMesh*
rm -rf constant/extendedFeatureEdgeMesh
#------------------------------------------------------------------------------

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
# Remove surfaces and features
rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/*.eMesh*
rm -rf constant/extendedFeatureEdgeMesh
#------------------------------------------------------------------------------

View File

@ -26,7 +26,7 @@ cd ${0%/*} || exit 1 # Run from this directory
(
cd wingMotion2D_pimpleFoam || exit 1
\rm -rf constant/polyMesh
rm -rf constant/polyMesh
\cp -r ../wingMotion2D_simpleFoam/constant/polyMesh constant
restore0Dir
runApplication mapFields ../wingMotion2D_simpleFoam -sourceTime latestTime -consistent

View File

@ -3,8 +3,8 @@
tail -n +4 ../postProcessing/probes/0/U | \
tr -s " " | tr -d '(' | cut -d " " -f2-3 > ../Numerical.dat
# Test if gnuplot exists on the system
command -v gnuplot >/dev/null 2>&1 || {
# Require gnuplot
command -v gnuplot >/dev/null || {
echo "gnuplot not found - skipping graph creation" 1>&2
exit 1
}

View File

@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
# Remove copies of common files
\rm -rf constant
rm -rf constant
#------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
echo "Use common files for 0/, constant/ and blockMeshDict"
\rm -rf 0 constant
rm -rf 0 constant
\cp -r ../common/0.orig 0
\cp -r ../common/constant constant

View File

@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
# Remove copies of common files
\rm -rf constant
rm -rf constant
#------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
echo "Use common files for 0/, constant/ and blockMeshDict"
\rm -rf 0 constant
rm -rf 0 constant
\cp -r ../common/0.orig 0
\cp -r ../common/constant constant

View File

@ -5,8 +5,8 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
rm *.obj > /dev/null 2>&1
rm -r constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm constant/triSurface/boundaryAndFaceZones.eMesh > /dev/null 2>&1
rm -f *.obj
rm -rf constant/extendedFeatureEdgeMesh
rm -f constant/triSurface/boundaryAndFaceZones.eMesh
#------------------------------------------------------------------------------

View File

@ -1,8 +1,9 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
# Test if gnuplot exists on the system
command -v gnuplot >/dev/null 2>&1 || {
# Require gnuplot
command -v gnuplot >/dev/null || {
echo "gnuplot not found - skipping graph creation" 1>&2
exit 1
}

View File

@ -1,9 +1,9 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
# Clean time directories only
rm -rf *[1-9]*
rm -f log.* 2>/dev/null
rm -f log.*
#------------------------------------------------------------------------------

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
\rm -rf *.dat *.png
rm -rf *.dat *.png
# -----------------------------------------------------------------------------

View File

@ -10,8 +10,8 @@ if notTest $@
then
# Create validation plots
# Test if gnuplot exists on the system
command -v gnuplot >/dev/null 2>&1 || {
# Require gnuplot
command -v gnuplot >/dev/null || {
echo "gnuplot not found - skipping graph creation" 1>&2
exit 1
}
@ -25,8 +25,8 @@ then
exit 1
}
# Test if awk exists on the system
command -v awk >/dev/null 2>&1 || {
# Require awk
command -v awk >/dev/null || {
echo "awk not found - skipping graph creation" 1>&2
exit 1
}
@ -71,7 +71,7 @@ EOF1
foamDictionary -entry boundaryField.lowerWall.value -value $timeDir/wallShearStress | \
sed -n '/(/,/)/p' | sed -e 's/[()]//g;/^\s*$/d' > tau.$$
paste -d ' ' Cx.$$ tau.$$ >> tauw.dat
\rm -f Cx.$$ tau.$$
rm -f Cx.$$ tau.$$
graphNameTau="backwardStep2D_tau.png"
echo "Creating wallshear stress graph to $graphNameTau"

View File

@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
cleanCase
\rm -f *.png
rm -rf *.png
#------------------------------------------------------------------------------

View File

@ -92,14 +92,14 @@ if notTest $@
then
# Create validation plots
# Test if gnuplot exists on the system
command -v gnuplot >/dev/null 2>&1 || {
# Require gnuplot
command -v gnuplot >/dev/null || {
echo "gnuplot not found - skipping graph creation" 1>&2
exit 1
}
# Test if awk exists on the system
command -v awk >/dev/null 2>&1 || {
# Require awk
command -v awk >/dev/null || {
echo "awk not found - skipping graph creation" 1>&2
exit 1
}

View File

@ -6,8 +6,8 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
# Remove surface and features
rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
rm -f constant/triSurface/motorBike.eMesh > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/motorBike.obj.gz
rm -f constant/triSurface/motorBike.eMesh
rm -rf constant/extendedFeatureEdgeMesh
#------------------------------------------------------------------------------

View File

@ -6,10 +6,10 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
# Remove surface and features
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/rotatingZone.eMesh > /dev/null 2>&1
rm -f constant/triSurface/fixed.eMesh > /dev/null 2>&1
rm -f 0/pointLevel > /dev/null 2>&1
rm -f 0/cellLevel > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh
rm -f constant/triSurface/rotatingZone.eMesh
rm -f constant/triSurface/fixed.eMesh
rm -f 0/pointLevel
rm -f 0/cellLevel
#------------------------------------------------------------------------------

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
\rm -rf 0 postProcessing-*
\rm -f *.dat *.png constant/turbulenceProperties
rm -rf 0 postProcessing-*
rm -f *.dat *.png constant/turbulenceProperties
#------------------------------------------------------------------------------

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/buildings.eMesh > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh
rm -f constant/triSurface/buildings.eMesh
#------------------------------------------------------------------------------

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
# rm -f constant/triSurface/cyclone.stl.gz > /dev/null 2>&1
# rm -f constant/triSurface/cyclone.stl*
#------------------------------------------------------------------------------

View File

@ -10,7 +10,7 @@ cd ${0%/*} || exit 1 # Run from this directory
runApplication decomposePar
runParallel $(getApplication)
runApplication reconstructPar -latestTime
rm log.reconstructPar
rm -f log.reconstructPar
runApplication reconstructPar -lagrangianFields \
'(collisionRecordsPairAccessed collisionRecordsPairData \
collisionRecordsPairOrigIdOfOther \

View File

@ -25,7 +25,7 @@ nz=2
tmpSetSet='patchify.setSet'
rm -f patchify.setSet >/dev/null 2>&1
rm -f patchify.setSet
initialiseFaceSet()

View File

@ -11,7 +11,7 @@ restore0Dir
# initialise with potentialFoam solution
runApplication potentialFoam
\rm -f 0/phi
rm -f 0/phi
# run the solver
runApplication $(getApplication)

View File

@ -11,7 +11,7 @@ restore0Dir
# initialise with potentialFoam solution
runApplication potentialFoam
\rm -f 0/phi
rm -f 0/phi
# run the solver
runApplication $(getApplication)

View File

@ -10,7 +10,7 @@ runApplication blockMesh
runApplication potentialFoam
# Remove incompatible (volumetric) flux field
\rm -f 0/phi 2>/dev/null
rm -f 0/phi
runApplication $(getApplication)

View File

@ -10,7 +10,7 @@ runApplication blockMesh
runApplication potentialFoam
# Remove incompatible (volumetric) flux field
\rm -f 0/phi 2>/dev/null
rm -f 0/phi
runApplication decomposePar

View File

@ -5,19 +5,18 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
rm -rf constant/triSurface/blob.stl.gz > /dev/null 2>&1
rm -rf constant/triSurface/blob.stl.gz
rm -rf constant/cellAlignments > /dev/null 2>&1
rm -rf constant/targetCellSize > /dev/null 2>&1
rm -rf constant/internalDelaunayVertices > /dev/null 2>&1
rm -rf constant/cellAlignments
rm -rf constant/targetCellSize
rm -rf constant/internalDelaunayVertices
rm -rf constant/backgroundMeshDecomposition/polyMesh/boundary > /dev/null 2>&1
rm -rf constant/backgroundMeshDecomposition/polyMesh/faces > /dev/null 2>&1
rm -rf constant/backgroundMeshDecomposition/polyMesh/neighbour > /dev/null 2>&1
rm -rf constant/backgroundMeshDecomposition/polyMesh/owner > /dev/null 2>&1
rm -rf constant/backgroundMeshDecomposition/polyMesh/points > /dev/null 2>&1
(
cd constant/backgroundMeshDecomposition/polyMesh 2>/dev/null || exit 1
rm -f boundary faces neighbour owner points
)
rm -rf snapToSurface?.obj > /dev/null 2>&1
rm -rf tetsToSnapTo.obj > /dev/null 2>&1
rm -rf snapToSurface?.obj
rm -rf tetsToSnapTo.obj
#------------------------------------------------------------------------------

View File

@ -5,18 +5,17 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
rm -r constant/triSurface/flange.stl.gz > /dev/null 2>&1
rm -r constant/triSurface/flange.stl.gz
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -r constant/ccx constant/ccy constant/ccz > /dev/null 2>&1
rm -r constant/internalDelaunayVertices constant/targetCellSize > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh
rm -r constant/ccx constant/ccy constant/ccz
rm -r constant/internalDelaunayVertices constant/targetCellSize
rm -rf constant/backgroundMeshDecomposition/polyMesh/boundary > /dev/null 2>&1
rm -rf constant/backgroundMeshDecomposition/polyMesh/faces > /dev/null 2>&1
rm -rf constant/backgroundMeshDecomposition/polyMesh/neighbour > /dev/null 2>&1
rm -rf constant/backgroundMeshDecomposition/polyMesh/owner > /dev/null 2>&1
rm -rf constant/backgroundMeshDecomposition/polyMesh/points > /dev/null 2>&1
(
cd constant/backgroundMeshDecomposition/polyMesh 2>/dev/null && \
rm -f faces neighbour owner points
)
rm -r *.obj > /dev/null 2>&1
rm -r *.obj
#------------------------------------------------------------------------------

View File

@ -16,7 +16,7 @@ intersectSurfaces()
}
\rm -rf 0
rm -rf 0
# Run the surface preparation script
@ -76,7 +76,7 @@ then
runApplication reconstructParMesh -latestTime
\cp -r $latestTime/polyMesh constant
\rm -rf $latestTime
rm -rf $latestTime
fi

View File

@ -5,13 +5,12 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
rm -r constant/extendedFeatureEdgeMesh constant/internalDelaunayVertices > /dev/null 2>&1
rm -f constant/triSurface/*.eMesh > /dev/null 2>&1
rm -f constant/triSurface/*_orient* > /dev/null 2>&1
rm -r constant/tetDualMesh > /dev/null 2>&1
rm -r constant/extendedFeatureEdgeMesh constant/internalDelaunayVertices
rm -f constant/triSurface/*.eMesh
rm -f constant/triSurface/*_orient*
rm -r constant/tetDualMesh
rm -r snapToSurface?.obj tetsToSnapTo.obj > /dev/null 2>&1
rm domain coneAndSphere > /dev/null 2>&1
rm -r snapToSurface?.obj tetsToSnapTo.obj
rm -f domain coneAndSphere
#------------------------------------------------------------------------------

View File

@ -5,8 +5,8 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -rf constant/triSurface/*.eMesh > /dev/null 2>&1
rm -rf MeshedSurface.obj > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh
rm -rf constant/triSurface/*.eMesh
rm -rf MeshedSurface.obj
#------------------------------------------------------------------------------

View File

@ -5,8 +5,8 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -rf constant/triSurface/jaggedBoundary.eMesh > /dev/null 2>&1
rm -rf MeshedSurface.obj > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh
rm -rf constant/triSurface/jaggedBoundary.eMesh
rm -rf MeshedSurface.obj
#------------------------------------------------------------------------------

View File

@ -5,8 +5,8 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -rf constant/triSurface/unit_cube.eMesh > /dev/null 2>&1
rm -rf MeshedSurface*.obj > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh
rm -rf constant/triSurface/unit_cube.eMesh
rm -rf MeshedSurface*.obj
#------------------------------------------------------------------------------

View File

@ -5,11 +5,11 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
rm -f ./flange ./*.obj > /dev/null 2>&1
rm -f ./flange ./*.obj
# Remove surface and features
rm -f constant/triSurface/flange.stl.gz > /dev/null 2>&1
rm -f constant/triSurface/flange.eMesh > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/flange.stl.gz
rm -f constant/triSurface/flange.eMesh
rm -rf constant/extendedFeatureEdgeMesh
#------------------------------------------------------------------------------

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
# Remove surface and features
rm -f constant/triSurface/*.eMesh > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/*.eMesh
rm -rf constant/extendedFeatureEdgeMesh
#------------------------------------------------------------------------------

Some files were not shown because too many files have changed in this diff Show More