mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Lots of changes from Mark and my changes to ddtPhiCorr all mixed together
because I failed to work out how to merge Mark's stuff -- HELP!!!
This commit is contained in:
@ -72,6 +72,7 @@ find -H $newDir \
|
||||
! -type d -type f \
|
||||
! -name "*~" \
|
||||
-a ! -name ".*~" \
|
||||
-a ! -name ".#*" \
|
||||
-a ! -name "*.orig" \
|
||||
-a ! -name "*.dep" \
|
||||
-a ! -name "*.o" \
|
||||
@ -83,10 +84,11 @@ find -H $newDir \
|
||||
-a ! -name "log[0-9]*" \
|
||||
| sed \
|
||||
-e "\@$newDir/lib/@d" \
|
||||
-e "\@$newDir/src/mico-[0-9.]*/platforms@d" \
|
||||
-e "\@$newDir/src/mpich-[0-9.]*/platforms@d" \
|
||||
-e "\@$newDir/src/mpich-[0-9.]*/lib@d" \
|
||||
-e "\@$newDir/src/lam-[0-9.]*/platforms@d" \
|
||||
-e "\@$newDir/src/other/mico-*/platforms@d" \
|
||||
-e "\@$newDir/src/other/mpich-*/platforms@d" \
|
||||
-e "\@$newDir/src/other/mpich-*/lib@d" \
|
||||
-e "\@$newDir/src/other/lam-*/platforms@d" \
|
||||
-e "\@$newDir/src/other/openmpi-*/platforms@d" \
|
||||
-e '\@applications/bin/@d' \
|
||||
-e '\@/t/@d' \
|
||||
-e '\@Make[.A-Za-z]*/[^/]*/@d' \
|
||||
@ -118,7 +120,7 @@ find -H $newDir \
|
||||
done
|
||||
)
|
||||
|
||||
# file fileCount
|
||||
# file fileCount
|
||||
fileCount=$(cat $tmpFile | wc -l)
|
||||
echo "----------------------------------------------------------------------"
|
||||
echo "pack $fileCount changed/new files"
|
||||
|
||||
@ -86,10 +86,11 @@ find -H $packDir \
|
||||
-a ! -name "so_locations" \
|
||||
| sed \
|
||||
-e "\@$packDir/lib/@d" \
|
||||
-e "\@$packDir/src/mico-[0-9.]*/platforms@d" \
|
||||
-e "\@$packDir/src/mpich-[0-9.]*/platforms@d" \
|
||||
-e "\@$packDir/src/mpich-[0-9.]*/lib@d" \
|
||||
-e "\@$packDir/src/lam-[0-9.]*/platforms@d" \
|
||||
-e "\@$packDir/src/other/mico-*/platforms@d" \
|
||||
-e "\@$packDir/src/other/mpich-*/platforms@d" \
|
||||
-e "\@$packDir/src/other/mpich-*/lib@d" \
|
||||
-e "\@$packDir/src/other/lam-*/platforms@d" \
|
||||
-e "\@$packDir/src/other/openmpi-*/platforms@d" \
|
||||
-e '\@applications/bin/@d' \
|
||||
-e '\@/t/@d' \
|
||||
-e '\@Make[.A-Za-z]*/[^/]*/@d' \
|
||||
|
||||
@ -75,11 +75,11 @@ find -H $packDir \
|
||||
-a ! -name "log[0-9]*" \
|
||||
| sed \
|
||||
-e "\@$packDir/lib/@d" \
|
||||
-e "\@$packDir/src/other/mico-[0-9.]*/platforms@d" \
|
||||
-e "\@$packDir/src/other/mpich-[0-9.]*/platforms@d" \
|
||||
-e "\@$packDir/src/other/mpich-[0-9.]*/lib@d" \
|
||||
-e "\@$packDir/src/other/lam-[0-9.]*/platforms@d" \
|
||||
-e "\@$packDir/src/other/openmpi-[0-9.]*/platforms@d" \
|
||||
-e "\@$packDir/src/other/mico-*/platforms@d" \
|
||||
-e "\@$packDir/src/other/mpich-*/platforms@d" \
|
||||
-e "\@$packDir/src/other/mpich-*/lib@d" \
|
||||
-e "\@$packDir/src/other/lam-*/platforms@d" \
|
||||
-e "\@$packDir/src/other/openmpi-*/platforms@d" \
|
||||
-e '\@applications/bin/@d' \
|
||||
-e '\@/t/@d' \
|
||||
-e '\@Make[.A-Za-z]*/[^/]*/@d' \
|
||||
|
||||
81
bin/paraFoam
81
bin/paraFoam
@ -33,33 +33,33 @@
|
||||
Script=${0##*/}
|
||||
|
||||
usage() {
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: $Script [-case dir]
|
||||
|
||||
* start paraview $ParaView_VERSION with the OpenFOAM libraries
|
||||
|
||||
USAGE
|
||||
exit 1
|
||||
exit 1
|
||||
}
|
||||
|
||||
# parse options
|
||||
if [ "$#" -gt 0 ]; then
|
||||
case "$1" in
|
||||
-h | -help)
|
||||
usage
|
||||
;;
|
||||
-case)
|
||||
shift
|
||||
caseDir=$1
|
||||
[ "$#" -ge 1 ] || usage "'-case' option requires an argument"
|
||||
cd "$caseDir" 2>/dev/null || usage "directory does not exist: '$caseDir'"
|
||||
;;
|
||||
*)
|
||||
usage "unknown option/argument: '$*'"
|
||||
;;
|
||||
esac
|
||||
case "$1" in
|
||||
-h | -help)
|
||||
usage
|
||||
;;
|
||||
-case)
|
||||
shift
|
||||
caseDir=$1
|
||||
[ "$#" -ge 1 ] || usage "'-case' option requires an argument"
|
||||
cd "$caseDir" 2>/dev/null || usage "directory does not exist: '$caseDir'"
|
||||
;;
|
||||
*)
|
||||
usage "unknown option/argument: '$*'"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# get a sensible caseName
|
||||
@ -67,41 +67,38 @@ caseName=${PWD##*/}
|
||||
|
||||
# parent directory for normal or parallel results
|
||||
case "$caseName" in
|
||||
processor*) parentDir=".." ;;
|
||||
*) parentDir="." ;;
|
||||
processor*) parentDir=".." ;;
|
||||
*) parentDir="." ;;
|
||||
esac
|
||||
|
||||
# check existence of essential files
|
||||
for check in system/controlDict system/fvSchemes system/fvSolution
|
||||
do
|
||||
[ -s "$parentDir/$check" ] || usage "file does not exist: '$parentDir/$check'"
|
||||
[ -s "$parentDir/$check" ] || usage "file does not exist: '$parentDir/$check'"
|
||||
done
|
||||
|
||||
OpenFoamExt="foam"
|
||||
# OpenFoamExt="OpenFOAM"
|
||||
caseFile="$caseName.foam"
|
||||
# caseFile="$caseName.OpenFOAM"
|
||||
|
||||
if [ "$ParaView_VERSION" = "3" ]; then
|
||||
case "$ParaView_VERSION" in
|
||||
2*)
|
||||
# Clean up on termination and on Ctrl-C
|
||||
trap "rm -f paraFoam.pvs $caseFile 2>/dev/null; exit 0" EXIT TERM INT
|
||||
touch $caseFile
|
||||
|
||||
# check existence of essential files
|
||||
for check in system/controlDict system/fvSchemes system/fvSolution
|
||||
do
|
||||
[ -s "$parentDir/$check" ] || usage "file does not exist: '$parentDir/$check'"
|
||||
done
|
||||
# since we are now in the cwd, %CASE% is '$PWD/$caseFile'
|
||||
sed -e s@%CASE%@$PWD/$caseFile@g \
|
||||
$WM_PROJECT_DIR/bin/paraFoam.pvs > paraFoam.pvs
|
||||
|
||||
touch $caseName.$OpenFoamExt
|
||||
paraview --data=$caseName.$OpenFoamExt
|
||||
rm $caseName.$OpenFoamExt 2>/dev/null
|
||||
paraview paraFoam.pvs
|
||||
;;
|
||||
|
||||
else
|
||||
|
||||
# since we are now in the cwd, FOAM_ROOT/FOAM_CASE is '$PWD'
|
||||
sed -e s%FOAM_ROOT/FOAM_CASE%$PWD%g \
|
||||
-e s%FOAM_CASE%$caseName%g $WM_PROJECT_DIR/bin/paraFoam.pvs > paraFoam.pvs
|
||||
|
||||
touch $caseName.$OpenFoamExt
|
||||
paraview paraFoam.pvs
|
||||
rm paraFoam.pvs $caseName.$OpenFoamExt 2>/dev/null
|
||||
|
||||
fi
|
||||
*)
|
||||
# Clean up on termination and on Ctrl-C
|
||||
trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT
|
||||
touch $caseFile
|
||||
paraview --data=$caseFile
|
||||
;;
|
||||
|
||||
esac
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user