Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-2.0

This commit is contained in:
Henry
2011-06-08 16:29:26 +01:00
5 changed files with 36 additions and 40 deletions

View File

@ -9,4 +9,5 @@ EXE_LIBS = \
-llagrangianIntermediate \ -llagrangianIntermediate \
-lradiationModels \ -lradiationModels \
-lthermophysicalFunctions \ -lthermophysicalFunctions \
-lregionModels -lregionModels \
-lsampling

View File

@ -1 +1 @@
EXE_LIBS = $(FOAM_EXT_LIBBIN)/libfbsdmalloc.o EXE_LIBS = /* $(FOAM_EXT_LIBBIN)/libfbsdmalloc.o */

View File

@ -38,29 +38,29 @@
# normally use "make" # normally use "make"
make="make" make="make"
# set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set ## set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set
if [ -z "$WM_NCOMPPROCS" -a -n "$WM_HOSTS" -a -n "$WM_SCHEDULER" ] #if [ -z "$WM_NCOMPPROCS" -a -n "$WM_HOSTS" -a -n "$WM_SCHEDULER" ]
then #then
WM_NCOMPPROCS=$(wmakeScheduler -count) # WM_NCOMPPROCS=$(wmakeScheduler -count)
[ $? -eq 0 ] || unset WM_NCOMPPROCS # [ $? -eq 0 ] || unset WM_NCOMPPROCS
fi #fi
#
if [ "$WM_NCOMPPROCS" ] #if [ "$WM_NCOMPPROCS" ]
then #then
if [ "$WM_NCOMPPROCS" -gt 1 -a ! "$MAKEFLAGS" ] # if [ "$WM_NCOMPPROCS" -gt 1 -a ! "$MAKEFLAGS" ]
then # then
lockDir=$HOME/.$WM_PROJECT/.wmake # lockDir=$HOME/.$WM_PROJECT/.wmake
#
if [ -d $lockDir ] # if [ -d $lockDir ]
then # then
rm -f $lockDir/* # rm -f $lockDir/*
else # else
mkdir -p $lockDir # mkdir -p $lockDir
fi # fi
#
make="make --no-print-directory -j "$WM_NCOMPPROCS # make="make --no-print-directory -j "$WM_NCOMPPROCS
fi # fi
fi #fi
@ -103,7 +103,8 @@ else
# fi # fi
#done #done
FOAM_TARGETS=$(for d in *; do [ -d "$d" ] && echo "$d"; done | xargs) FOAM_TARGETS=$(for d in *; do [ -d "$d" ] && echo "$d"; done | xargs)
$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs FOAM_TARGETS="$FOAM_TARGETS" FOAM_APP="$WM_SCHEDULER $thisScript" #$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs FOAM_TARGETS="$FOAM_TARGETS" FOAM_APP="$WM_SCHEDULER $thisScript"
$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs FOAM_TARGETS="$FOAM_TARGETS" FOAM_APP="$thisScript"
fi fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -2,7 +2,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) 2004-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -65,7 +65,7 @@ public:
//- Construct null //- Construct null
pointHitSort() pointHitSort()
: :
inter_(false, vector::zero, GREAT), inter_(false, vector::zero, GREAT, false),
index_(-1) index_(-1)
{} {}
@ -96,9 +96,9 @@ public:
return inter_.distance() == rhs.inter().distance(); return inter_.distance() == rhs.inter().distance();
} }
bool operator>(const pointHitSort& rhs) const bool operator<(const pointHitSort& rhs) const
{ {
return inter_.distance() > rhs.inter().distance(); return inter_.distance() < rhs.inter().distance();
} }
}; };

View File

@ -12,24 +12,18 @@ application=`getApplication`
MAIN_CONTROL_DICT=`foamEtcFile controlDict` MAIN_CONTROL_DICT=`foamEtcFile controlDict`
if [ -f "$MAIN_CONTROL_DICT" ] if [ -f "$MAIN_CONTROL_DICT" ]
then then
echo "Modifying ${MAIN_CONTROL_DICT}" echo "Modifying ${MAIN_CONTROL_DICT} to enable allowSystemOperations"
if [ -e ${MAIN_CONTROL_DICT}.org ]
then
echo "File ${MAIN_CONTROL_DICT}.org already exists"
echo "Did Allrun fail in some way and then run again?"
exit 1
fi
# Clean up on termination and on Ctrl-C # Clean up on termination and on Ctrl-C
trap 'mv ${MAIN_CONTROL_DICT}.org ${MAIN_CONTROL_DICT} 2>/dev/null; exit 0' \ trap 'mv ${MAIN_CONTROL_DICT}.$$ ${MAIN_CONTROL_DICT} 2>/dev/null; exit 0' \
EXIT TERM INT EXIT TERM INT
cp ${MAIN_CONTROL_DICT} ${MAIN_CONTROL_DICT}.org cp ${MAIN_CONTROL_DICT} ${MAIN_CONTROL_DICT}.$$
echo "Enabling allowSystemOperations in ${MAIN_CONTROL_DICT}." echo "Enabling allowSystemOperations in ${MAIN_CONTROL_DICT}."
sed \ sed \
-e s/"\(allowSystemOperations[ \t]*\)\([0-9]\);"/"\1 1;"/g \ -e s/"\(allowSystemOperations[ \t]*\)\([0-9]\);"/"\1 1;"/g \
${MAIN_CONTROL_DICT}.org > ${MAIN_CONTROL_DICT} ${MAIN_CONTROL_DICT}.$$ > ${MAIN_CONTROL_DICT}
fi fi
cp -r 0.org 0 > /dev/null 2>&1 cp -r 0.org 0 > /dev/null 2>&1