mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
2
COPYING
2
COPYING
@ -1,6 +1,6 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
OpenFOAM(R) is Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
OpenFOAM(R) is Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
Contact: OpenCFD (enquiries@OpenCFD.co.uk)
|
||||
|
||||
You may use, distribute and copy the OpenFOAM CFD Toolbox under the terms
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
label nAlphaCorr(readLabel(piso.lookup("nAlphaCorr")));
|
||||
|
||||
label nAlphaSubCycles(readLabel(piso.lookup("nAlphaSubCycles"))));
|
||||
label nAlphaSubCycles(readLabel(piso.lookup("nAlphaSubCycles")));
|
||||
|
||||
if (nAlphaSubCycles > 1)
|
||||
{
|
||||
|
||||
@ -1 +1 @@
|
||||
EXE_LIBS = $(LIB_WM_OPTIONS_DIR)/libfbsdmalloc.o
|
||||
EXE_LIBS = $(FOAM_EXT_LIBBIN)/libfbsdmalloc.o
|
||||
|
||||
@ -9,4 +9,4 @@ vtkPV3FoamMeshZone.C
|
||||
vtkPV3FoamUpdateInfo.C
|
||||
vtkPV3FoamUtils.C
|
||||
|
||||
LIB = $(FOAM_EXT_LIBBIN)/libvtkPV3Foam
|
||||
LIB = $(FOAM_LIBBIN)/libvtkPV3Foam
|
||||
|
||||
@ -19,5 +19,5 @@ LIB_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lgenericPatchFields \
|
||||
-llagrangian \
|
||||
-L$(FOAM_EXT_LIBBIN) -lvtkPV3Readers \
|
||||
-L$(FOAM_LIBBIN) -lvtkPV3Readers \
|
||||
$(GLIBS)
|
||||
|
||||
@ -2,4 +2,4 @@ vtkPV3blockMesh.C
|
||||
vtkPV3blockMeshConvert.C
|
||||
vtkPV3blockMeshUtils.C
|
||||
|
||||
LIB = $(FOAM_EXT_LIBBIN)/libvtkPV3blockMesh
|
||||
LIB = $(FOAM_LIBBIN)/libvtkPV3blockMesh
|
||||
|
||||
@ -10,5 +10,5 @@ EXE_INC = \
|
||||
LIB_LIBS = \
|
||||
-lmeshTools \
|
||||
-lblockMesh \
|
||||
-L$(FOAM_EXT_LIBBIN) -lvtkPV3Readers \
|
||||
-L$(FOAM_LIBBIN) -lvtkPV3Readers \
|
||||
$(GLIBS)
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
vtkPV3Readers.C
|
||||
|
||||
LIB = $(FOAM_EXT_LIBBIN)/libvtkPV3Readers
|
||||
LIB = $(FOAM_LIBBIN)/libvtkPV3Readers
|
||||
|
||||
@ -73,13 +73,10 @@ do
|
||||
done
|
||||
|
||||
# check for essential directories
|
||||
for dir in $packDir
|
||||
do
|
||||
[ -d $dir ] || {
|
||||
echo "Error: directory $dir does not exist" 1>&2
|
||||
[ -d $packDir ] || {
|
||||
echo "Error: directory $packDir does not exist" 1>&2
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -57,10 +57,29 @@ esac
|
||||
}
|
||||
|
||||
|
||||
# obtain archOptions types from lib/
|
||||
if [ -d $packDir/lib ]
|
||||
then
|
||||
|
||||
# obtain archOptions types from lib/<archOptions>
|
||||
for archOptions in $packDir/lib/*
|
||||
do
|
||||
$binDir/$packBin $@ ${archOptions##*/}
|
||||
done
|
||||
|
||||
elif [ -d $packDir/platforms ]
|
||||
|
||||
# obtain archOptions types from platforms/<archOptions>/lib
|
||||
for archOptions in $packDir/platforms/*/lib
|
||||
do
|
||||
archOptions=${archOptions%%/lib}
|
||||
$binDir/$packBin $@ ${archOptions##*/}
|
||||
done
|
||||
|
||||
else
|
||||
|
||||
echo "Error: directory $packDir does not appear packable" 1>&2
|
||||
exit 1
|
||||
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -72,13 +72,10 @@ do
|
||||
done
|
||||
|
||||
# check for essential directories
|
||||
for dir in $packDir
|
||||
do
|
||||
[ -d $dir ] || {
|
||||
echo "Error: directory $dir does not exist" 1>&2
|
||||
[ -d $packDir ] || {
|
||||
echo "Error: directory $packDir does not exist" 1>&2
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -67,19 +67,35 @@ arch3264=$(echo "$archOS" | sed -e 's@64@-64@')
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# check for essential directories
|
||||
for dir in $packDir $packDir/lib/$archOptions
|
||||
do
|
||||
[ -d $dir ] || {
|
||||
echo "Error: directory $dir does not exist" 1>&2
|
||||
[ -d $packDir ] || {
|
||||
echo "Error: directory $packDir does not exist" 1>&2
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
|
||||
# check new/old places for executables - same as $FOAM_APPBIN
|
||||
[ -d $packDir/bin/$archOptions -o -d $packDir/applications/bin/$archOptions ] || {
|
||||
|
||||
#
|
||||
# check places for libraries - same as $FOAM_LIBBIN
|
||||
# this has moved around a bit in the recent past
|
||||
#
|
||||
[ -d $packDir/lib/$archOptions ] || \
|
||||
[ -d $packDir/platforms/$archOptions/lib ] || {
|
||||
cat <<LIB_CHECK 1>&2
|
||||
Error: no directory for libraries exists:
|
||||
$packDir/lib/$archOptions
|
||||
$packDir/platforms/$archOptions/lib
|
||||
LIB_CHECK
|
||||
exit 1
|
||||
}
|
||||
|
||||
#
|
||||
# check places for executables - same as $FOAM_APPBIN
|
||||
# this has moved around a bit in the recent past
|
||||
#
|
||||
[ -d $packDir/applications/bin/$archOptions ] || \
|
||||
[ -d $packDir/platforms/$archOptions/bin ] || {
|
||||
cat <<BIN_CHECK 1>&2
|
||||
Error: no directory for executables exists:
|
||||
$packDir/bin/$archOptions
|
||||
$packDir/platforms/$archOptions/bin
|
||||
$packDir/applications/bin/$archOptions
|
||||
BIN_CHECK
|
||||
exit 1
|
||||
@ -90,14 +106,15 @@ BIN_CHECK
|
||||
# list of directories
|
||||
dirList=$(
|
||||
for dir in \
|
||||
$packDir/bin/$archOptions \
|
||||
$packDir/lib/$archOptions \
|
||||
$packDir/applications/bin/$archOptions \
|
||||
$packDir/platforms/$archOptions/bin \
|
||||
$packDir/platforms/$archOptions/lib \
|
||||
$packDir/wmake/bin/$archCompiler \
|
||||
$packDir/wmake/bin/$archOS \
|
||||
$packDir/wmake/rules/General \
|
||||
$packDir/wmake/rules/$archCompiler \
|
||||
$packDir/wmake/rules/$archOS \
|
||||
$packDir/applications/bin/$archOptions \
|
||||
$packDir/lib/$archOptions \
|
||||
;
|
||||
do
|
||||
[ -d $dir ] && echo $dir
|
||||
|
||||
@ -66,7 +66,7 @@ arch3264=$(echo "$archOS" | sed -e 's@64@-64@')
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# check for essential directories
|
||||
for dir in $packDir $packDir/lib/$archOptions
|
||||
for dir in $packDir $packDir/platforms/$archOptions/lib
|
||||
do
|
||||
[ -d $dir ] || {
|
||||
echo "Error: directory $dir does not exist" 1>&2
|
||||
@ -78,12 +78,6 @@ done
|
||||
# list of directories
|
||||
dirList=$(
|
||||
for dir in \
|
||||
$packDir/bin/$archOptions \
|
||||
$packDir/bin/$archCompiler \
|
||||
$packDir/bin/$archOS \
|
||||
$packDir/lib/$archOptions \
|
||||
$packDir/lib/$archCompiler \
|
||||
$packDir/lib/$archOS \
|
||||
$packDir/platforms/$archOptions \
|
||||
$packDir/platforms/$archCompiler \
|
||||
$packDir/platforms/$archOS \
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -53,7 +53,7 @@ hookName="pre-commit"
|
||||
die()
|
||||
{
|
||||
echo "$hookName hook failure" 1>&2
|
||||
echo '-----------------------' 1>&2
|
||||
echo '-----------------------------------' 1>&2
|
||||
echo '' 1>&2
|
||||
echo "$@" 1>&2
|
||||
echo '' 1>&2
|
||||
@ -105,8 +105,8 @@ dieOnBadFiles()
|
||||
{
|
||||
if [ -n "$badFiles" ]
|
||||
then
|
||||
echo '$hookName hook failure' 1>&2
|
||||
echo '-----------------------' 1>&2
|
||||
echo "$hookName hook failure" 1>&2
|
||||
echo '-----------------------------------' 1>&2
|
||||
echo "$@" 1>&2
|
||||
echo '' 1>&2
|
||||
echo "File(s):" 1>&2
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -47,7 +47,7 @@ hookName="pre-receive"
|
||||
die()
|
||||
{
|
||||
echo "$hookName hook failure" 1>&2
|
||||
echo '-----------------------' 1>&2
|
||||
echo '-----------------------------------' 1>&2
|
||||
echo '' 1>&2
|
||||
echo "$@" 1>&2
|
||||
echo '' 1>&2
|
||||
@ -68,8 +68,8 @@ dieOnBadFiles()
|
||||
{
|
||||
if [ -n "$badFiles" ]
|
||||
then
|
||||
echo '$hookName hook failure' 1>&2
|
||||
echo '-----------------------' 1>&2
|
||||
echo "$hookName hook failure" 1>&2
|
||||
echo '-----------------------------------' 1>&2
|
||||
echo "$@" 1>&2
|
||||
echo '' 1>&2
|
||||
echo "File(s):" 1>&2
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -44,9 +44,9 @@ alias wmDP 'wmSET WM_PRECISION_OPTION=DP'
|
||||
alias wmSchedON 'setenv WM_SCHEDULER $WM_PROJECT_DIR/wmake/wmakeScheduler'
|
||||
alias wmSchedOFF 'unsetenv WM_SCHEDULER'
|
||||
|
||||
# Change paraview version
|
||||
# Change ParaView version
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~
|
||||
alias foamPV 'setenv ParaView_VERSION \!*; source $WM_PROJECT_DIR/etc/apps/paraview3/cshrc; echo paraview-$ParaView_VERSION'
|
||||
alias foamPV 'source `$WM_PROJECT_DIR/etc/apps/paraview3/cshrc` ParaView_VERSION=\!*; echo paraview-$ParaView_VERSION'
|
||||
|
||||
|
||||
# Change directory aliases
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -44,16 +44,13 @@ alias wmDP='wmSET WM_PRECISION_OPTION=DP'
|
||||
alias wmSchedON='export WM_SCHEDULER=$WM_PROJECT_DIR/wmake/wmakeScheduler'
|
||||
alias wmSchedOFF='unset WM_SCHEDULER'
|
||||
|
||||
# Change paraview version
|
||||
# Change ParaView version
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~
|
||||
unset foamPV
|
||||
foamPV()
|
||||
{
|
||||
export ParaView_VERSION=$1
|
||||
. $WM_PROJECT_DIR/etc/apps/paraview3/bashrc
|
||||
. $WM_PROJECT_DIR/etc/apps/paraview3/bashrc ParaView_VERSION=$1
|
||||
echo "paraview-$ParaView_VERSION (major: $ParaView_MAJOR)"
|
||||
echo "dir: $ParaView_DIR"
|
||||
[ -d "$ParaView_DIR" ] || echo "WARNING: directory does not exist"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -50,17 +50,25 @@ do
|
||||
done
|
||||
|
||||
|
||||
# set VERSION and MAJOR (version) variables
|
||||
if [ -z "$ParaView_VERSION" ]
|
||||
then
|
||||
ParaView_VERSION=3.8.0
|
||||
ParaView_MAJOR=unknown
|
||||
echo "Warning in app/paraview3/bashrc:" 1>&2
|
||||
echo " ParaView_VERSION not set, using '$ParaView_VERSION'" 1>&2
|
||||
fi
|
||||
[ -n "$ParaView_MAJOR" ] || ParaView_MAJOR=unknown
|
||||
#- ParaView version, automatically determine major version
|
||||
export ParaView_VERSION=3.8.0
|
||||
export ParaView_MAJOR=detect
|
||||
|
||||
# if needed, set MAJOR version to correspond to VERSION
|
||||
|
||||
# Evaluate command-line parameters for ParaView
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
ParaView*=*)
|
||||
# name=value -> export name=value
|
||||
eval "export $1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
|
||||
# set MAJOR version to correspond to VERSION
|
||||
# ParaView_MAJOR is "<digits>.<digits>" from ParaView_VERSION
|
||||
case "$ParaView_VERSION" in
|
||||
"$ParaView_MAJOR".* )
|
||||
@ -82,7 +90,7 @@ if [ -r $ParaView_DIR -o -r $paraviewInstDir ]
|
||||
then
|
||||
export PATH=$ParaView_DIR/bin:$PATH
|
||||
export LD_LIBRARY_PATH=$ParaView_DIR/lib/paraview-$ParaView_MAJOR:$LD_LIBRARY_PATH
|
||||
export PV_PLUGIN_PATH=$FOAM_EXT_LIBBIN/paraview-$ParaView_MAJOR
|
||||
export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-$ParaView_MAJOR
|
||||
|
||||
# add in python libraries if required
|
||||
paraviewPython=$ParaView_DIR/Utilities/VTKPythonWrapping
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -48,17 +48,24 @@ foreach cmake ( cmake-2.8.3 cmake-2.8.1 )
|
||||
endif
|
||||
end
|
||||
|
||||
# set VERSION and MAJOR (version) variables
|
||||
if ( ! $?ParaView_VERSION )
|
||||
then
|
||||
#- ParaView version, automatically determine major version:
|
||||
setenv ParaView_VERSION 3.8.0
|
||||
setenv ParaView_MAJOR unknown
|
||||
echo "Warning in app/paraview3/cshrc:"
|
||||
echo " ParaView_VERSION not set, using '$ParaView_VERSION'"
|
||||
fi
|
||||
if ( ! $?ParaView_MAJOR ) setenv ParaView_MAJOR unknown
|
||||
setenv ParaView_MAJOR detect
|
||||
|
||||
# if needed, set MAJOR version to correspond to VERSION
|
||||
|
||||
# Evaluate command-line parameters for ParaView
|
||||
while ( $#argv > 0 )
|
||||
switch ($argv[1])
|
||||
case ParaView*=*:
|
||||
# name=value -> setenv name value
|
||||
eval "setenv $argv[1]:s/=/ /"
|
||||
breaksw
|
||||
endsw
|
||||
shift
|
||||
end
|
||||
|
||||
|
||||
# set MAJOR version to correspond to VERSION
|
||||
# ParaView_MAJOR is "<digits>.<digits>" from ParaView_VERSION
|
||||
switch ("$ParaView_VERSION")
|
||||
case "$ParaView_MAJOR".*:
|
||||
@ -80,7 +87,7 @@ setenv ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-
|
||||
if ( -r $ParaView_DIR || -r $paraviewInstDir ) then
|
||||
setenv PATH ${ParaView_DIR}/bin:${PATH}
|
||||
setenv LD_LIBRARY_PATH "${ParaView_DIR}/lib/paraview-${ParaView_MAJOR}:${LD_LIBRARY_PATH}"
|
||||
setenv PV_PLUGIN_PATH $FOAM_EXT_LIBBIN/paraview-${ParaView_MAJOR}
|
||||
setenv PV_PLUGIN_PATH $FOAM_LIBBIN/paraview-${ParaView_MAJOR}
|
||||
|
||||
# add in python libraries if required
|
||||
set paraviewPython=$ParaView_DIR/Utilities/VTKPythonWrapping
|
||||
|
||||
@ -36,10 +36,5 @@
|
||||
export SCOTCH_VERSION=scotch_5.1.11
|
||||
export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$SCOTCH_VERSION
|
||||
|
||||
# mpi-qualified include directory
|
||||
export SCOTCH_MPI_INCLUDE=$SCOTCH_ARCH_PATH/include/${FOAM_MPI_LIBBIN##*/}
|
||||
|
||||
# mpi-qualified lib directory
|
||||
export SCOTCH_MPI_LIBBIN=$SCOTCH_ARCH_PATH/lib/${FOAM_MPI_LIBBIN##*/}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
30
etc/bashrc
30
etc/bashrc
@ -2,7 +2,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -57,10 +57,6 @@ foamInstall=$HOME/$WM_PROJECT
|
||||
#- note the location for later use (eg, in job scripts)
|
||||
: ${FOAM_INST_DIR:=$foamInstall}; export FOAM_INST_DIR
|
||||
|
||||
#- ParaView version, automatically determine major version:
|
||||
export ParaView_VERSION=3.8.0
|
||||
export ParaView_MAJOR=unknown
|
||||
|
||||
#- Compiler location:
|
||||
# foamCompiler= system | ThirdParty (OpenFOAM)
|
||||
foamCompiler=system
|
||||
@ -134,22 +130,20 @@ _foamSource()
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# Add in preset user or site preferences:
|
||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh`
|
||||
|
||||
# Evaluate command-line parameters and record settings for later
|
||||
# these can be used to set/unset values, or specify prefs files
|
||||
export FOAM_SETTINGS="$@"
|
||||
# Evaluate command-line parameters
|
||||
_foamEval()
|
||||
{
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
*=)
|
||||
# name= -> unset name
|
||||
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "unset ${1%=}"
|
||||
eval "unset ${1%=}"
|
||||
;;
|
||||
*=*)
|
||||
# name=value -> export name=value
|
||||
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "export $1"
|
||||
eval "export $1"
|
||||
;;
|
||||
*)
|
||||
@ -164,6 +158,16 @@ do
|
||||
esac
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# Add in preset user or site preferences:
|
||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh`
|
||||
|
||||
# Evaluate command-line parameters and record settings for later
|
||||
# these can be used to set/unset values, or specify prefs files
|
||||
export FOAM_SETTINGS="$@"
|
||||
_foamEval $@
|
||||
|
||||
|
||||
# Detect system type and set environment variables appropriately
|
||||
@ -311,6 +315,6 @@ fi
|
||||
# cleanup environment:
|
||||
# ~~~~~~~~~~~~~~~~~~~~
|
||||
unset cleaned foamClean foamInstall foamOldDirs
|
||||
unset _foamSource
|
||||
unset _foamSource _foamEval
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
10
etc/cshrc
10
etc/cshrc
@ -2,7 +2,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -56,10 +56,6 @@ set foamInstall = $HOME/$WM_PROJECT
|
||||
#- note the location for later use (eg, in job scripts)
|
||||
if ( ! $?FOAM_INST_DIR ) setenv FOAM_INST_DIR $foamInstall
|
||||
|
||||
#- ParaView version, automatically determine major version:
|
||||
setenv ParaView_VERSION 3.8.0
|
||||
setenv ParaView_MAJOR unknown
|
||||
|
||||
#- Compiler location:
|
||||
# foamCompiler= system | ThirdParty (OpenFOAM)
|
||||
set foamCompiler=system
|
||||
@ -256,9 +252,7 @@ if (! $?MANPATH) setenv MANPATH ''
|
||||
|
||||
#- Clean PATH (path)
|
||||
set cleaned=`$foamClean "$PATH" "$foamOldDirs"`
|
||||
if ( $status == 0 ) then
|
||||
setenv PATH $cleaned
|
||||
endif
|
||||
if ( $status == 0 ) setenv PATH $cleaned
|
||||
|
||||
#- Clean LD_LIBRARY_PATH
|
||||
set cleaned=`$foamClean "$LD_LIBRARY_PATH" "$foamOldDirs"`
|
||||
|
||||
@ -48,20 +48,20 @@ setenv WM_LINK_LANGUAGE c++
|
||||
setenv WM_OPTIONS $WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
||||
|
||||
# base executables/libraries
|
||||
setenv FOAM_APPBIN $WM_PROJECT_DIR/bin/$WM_OPTIONS
|
||||
setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS
|
||||
setenv FOAM_APPBIN $WM_PROJECT_DIR/platforms/$WM_OPTIONS/bin
|
||||
setenv FOAM_LIBBIN $WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib
|
||||
|
||||
# external (ThirdParty) libraries
|
||||
setenv FOAM_EXT_LIBBIN $WM_THIRD_PARTY_DIR/lib/$WM_OPTIONS
|
||||
setenv FOAM_EXT_LIBBIN $WM_THIRD_PARTY_DIR/platforms/$WM_OPTIONS/lib
|
||||
|
||||
# shared site executables/libraries
|
||||
# similar naming convention as ~OpenFOAM expansion
|
||||
setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
|
||||
setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
|
||||
setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
|
||||
setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
|
||||
|
||||
# user executables/libraries
|
||||
setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/bin/$WM_OPTIONS
|
||||
setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
|
||||
setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin
|
||||
setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/lib
|
||||
|
||||
# convenience
|
||||
setenv FOAM_APP $WM_PROJECT_DIR/applications
|
||||
@ -90,7 +90,6 @@ unsetenv MPFR_ARCH_PATH
|
||||
# Location of compiler installation
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
if ( ! $?foamCompiler ) then
|
||||
then
|
||||
foamCompiler=system
|
||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
|
||||
echo " foamCompiler not set, using '$foamCompiler'"
|
||||
@ -253,13 +252,13 @@ unset boost_version cgal_version
|
||||
# Communications library
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
unsetenv MPI_ARCH_PATH MPI_HOME
|
||||
unsetenv MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN
|
||||
|
||||
switch ("$WM_MPLIB")
|
||||
case OPENMPI:
|
||||
#set mpi_version=openmpi-1.4.1
|
||||
set mpi_version=openmpi-1.5.1
|
||||
setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mpi_version
|
||||
#setenv FOAM_MPI openmpi-1.4.1
|
||||
setenv FOAM_MPI openmpi-1.5.1
|
||||
setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
|
||||
|
||||
# Tell OpenMPI where to find its install directory
|
||||
setenv OPAL_PREFIX $MPI_ARCH_PATH
|
||||
@ -267,14 +266,11 @@ case OPENMPI:
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
_foamAddMan $MPI_ARCH_PATH/man
|
||||
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
breaksw
|
||||
|
||||
case SYSTEMOPENMPI:
|
||||
# Use the system installed openmpi, get library directory via mpicc
|
||||
set mpi_version=openmpi-system
|
||||
setenv FOAM_MPI openmpi-system
|
||||
|
||||
# Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
|
||||
setenv PINC "`mpicc --showme:compile`"
|
||||
@ -289,25 +285,21 @@ case SYSTEMOPENMPI:
|
||||
endif
|
||||
|
||||
_foamAddLib $libDir
|
||||
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/$mpi_version
|
||||
unset mpi_version libDir
|
||||
unset libDir
|
||||
breaksw
|
||||
|
||||
case MPICH:
|
||||
set mpi_version=mpich2-1.1.1p1
|
||||
setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version
|
||||
setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mpi_version
|
||||
setenv FOAM_MPI mpich2-1.1.1p1
|
||||
setenv MPI_HOME $WM_THIRD_PARTY_DIR/$FOAM_MPI
|
||||
setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
_foamAddMan $MPI_ARCH_PATH/share/man
|
||||
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
breaksw
|
||||
|
||||
case MPICH-GM:
|
||||
setenv FOAM_MPI mpich-gm
|
||||
setenv MPI_ARCH_PATH /opt/mpi
|
||||
setenv MPICH_PATH $MPI_ARCH_PATH
|
||||
setenv GM_LIB_PATH /opt/gm/lib64
|
||||
@ -315,11 +307,10 @@ case MPICH-GM:
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
_foamAddLib $GM_LIB_PATH
|
||||
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/mpich-gm
|
||||
breaksw
|
||||
|
||||
case HPMPI:
|
||||
setenv FOAM_MPI hpmpi
|
||||
setenv MPI_HOME /opt/hpmpi
|
||||
setenv MPI_ARCH_PATH $MPI_HOME
|
||||
|
||||
@ -339,23 +330,22 @@ case HPMPI:
|
||||
echo Unknown processor type `uname -m` for Linux
|
||||
breaksw
|
||||
endsw
|
||||
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/hpmpi
|
||||
breaksw
|
||||
|
||||
case GAMMA:
|
||||
setenv FOAM_MPI gamma
|
||||
setenv MPI_ARCH_PATH /usr
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/gamma
|
||||
breaksw
|
||||
|
||||
case MPI:
|
||||
setenv FOAM_MPI mpi
|
||||
setenv MPI_ARCH_PATH /opt/mpi
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/mpi
|
||||
breaksw
|
||||
|
||||
case FJMPI:
|
||||
setenv FOAM_MPI fjmpi
|
||||
setenv MPI_ARCH_PATH /opt/FJSVmpi2
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/mpi
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib/sparcv9
|
||||
_foamAddLib /opt/FSUNf90/lib/sparcv9
|
||||
@ -363,20 +353,25 @@ case FJMPI:
|
||||
breaksw
|
||||
|
||||
case QSMPI:
|
||||
setenv FOAM_MPI qsmpi
|
||||
setenv MPI_ARCH_PATH /usr/lib/mpi
|
||||
setenv FOAM_MPI_LIBBIN FOAM_LIBBIN/qsmpi
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
|
||||
breaksw
|
||||
|
||||
default:
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/dummy
|
||||
setenv FOAM_MPI dummy
|
||||
breaksw
|
||||
endsw
|
||||
|
||||
_foamAddLib $FOAM_MPI_LIBBIN
|
||||
|
||||
# add (non-dummy) MPI implementation
|
||||
# dummy MPI already added to LD_LIBRARY_PATH and has no external libraries
|
||||
if ( "$FOAM_MPI" != dummy ) then
|
||||
_foamAddLib ${FOAM_LIBBIN}/${FOAM_MPI}:${FOAM_EXT_LIBBIN}/${FOAM_MPI}
|
||||
endif
|
||||
|
||||
|
||||
|
||||
# Set the minimum MPI buffer size (used by all platforms except SGI MPI)
|
||||
@ -392,13 +387,6 @@ else
|
||||
endif
|
||||
|
||||
|
||||
# Enable the hoard memory allocator if available
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#if ( -f $FOAM_EXT_LIBBIN/libhoard.so ) then
|
||||
# setenv LD_PRELOAD $FOAM_EXT_LIBBIN/libhoard.so:$LD_PRELOAD
|
||||
#endif
|
||||
|
||||
|
||||
# cleanup environment:
|
||||
# ~~~~~~~~~~~~~~~~~~~~
|
||||
unalias _foamAddPath _foamAddLib _foamAddMan
|
||||
|
||||
@ -71,20 +71,20 @@ export WM_LINK_LANGUAGE=c++
|
||||
export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
||||
|
||||
# base executables/libraries
|
||||
export FOAM_APPBIN=$WM_PROJECT_DIR/bin/$WM_OPTIONS
|
||||
export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS
|
||||
export FOAM_APPBIN=$WM_PROJECT_DIR/platforms/$WM_OPTIONS/bin
|
||||
export FOAM_LIBBIN=$WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib
|
||||
|
||||
# external (ThirdParty) libraries
|
||||
export FOAM_EXT_LIBBIN=$WM_THIRD_PARTY_DIR/lib/$WM_OPTIONS
|
||||
export FOAM_EXT_LIBBIN=$WM_THIRD_PARTY_DIR/platforms/$WM_OPTIONS/lib
|
||||
|
||||
# shared site executables/libraries
|
||||
# similar naming convention as ~OpenFOAM expansion
|
||||
export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
|
||||
export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
|
||||
export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
|
||||
export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
|
||||
|
||||
# user executables/libraries
|
||||
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/bin/$WM_OPTIONS
|
||||
export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
|
||||
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin
|
||||
export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/lib
|
||||
|
||||
# convenience
|
||||
export FOAM_APP=$WM_PROJECT_DIR/applications
|
||||
@ -273,13 +273,13 @@ unset boost_version cgal_version
|
||||
# Communications library
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
unset MPI_ARCH_PATH MPI_HOME
|
||||
unset MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN
|
||||
|
||||
case "$WM_MPLIB" in
|
||||
OPENMPI)
|
||||
#mpi_version=openmpi-1.4.1
|
||||
mpi_version=openmpi-1.5.1
|
||||
export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mpi_version
|
||||
#export FOAM_MPI=openmpi-1.4.1
|
||||
export FOAM_MPI=openmpi-1.5.1
|
||||
export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
|
||||
|
||||
# Tell OpenMPI where to find its install directory
|
||||
export OPAL_PREFIX=$MPI_ARCH_PATH
|
||||
@ -287,14 +287,11 @@ OPENMPI)
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
_foamAddMan $MPI_ARCH_PATH/man
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
;;
|
||||
|
||||
SYSTEMOPENMPI)
|
||||
# Use the system installed openmpi, get library directory via mpicc
|
||||
mpi_version=openmpi-system
|
||||
export FOAM_MPI=openmpi-system
|
||||
|
||||
# Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
|
||||
export PINC="`mpicc --showme:compile`"
|
||||
@ -310,25 +307,21 @@ SYSTEMOPENMPI)
|
||||
fi
|
||||
|
||||
_foamAddLib $libDir
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/$mpi_version
|
||||
unset mpi_version libDir
|
||||
unset libDir
|
||||
;;
|
||||
|
||||
MPICH)
|
||||
mpi_version=mpich2-1.1.1p1
|
||||
export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
|
||||
export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mpi_version
|
||||
export FOAM_MPI=mpich2-1.1.1p1
|
||||
export MPI_HOME=$WM_THIRD_PARTY_DIR/$FOAM_MPI
|
||||
export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
_foamAddMan $MPI_ARCH_PATH/share/man
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
;;
|
||||
|
||||
MPICH-GM)
|
||||
export FOAM_MPI=mpich-gm
|
||||
export MPI_ARCH_PATH=/opt/mpi
|
||||
export MPICH_PATH=$MPI_ARCH_PATH
|
||||
export GM_LIB_PATH=/opt/gm/lib64
|
||||
@ -336,11 +329,10 @@ MPICH-GM)
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
_foamAddLib $GM_LIB_PATH
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/mpich-gm
|
||||
;;
|
||||
|
||||
HPMPI)
|
||||
export FOAM_MPI=hpmpi
|
||||
export MPI_HOME=/opt/hpmpi
|
||||
export MPI_ARCH_PATH=$MPI_HOME
|
||||
|
||||
@ -361,23 +353,21 @@ HPMPI)
|
||||
echo Unknown processor type `uname -m` for Linux
|
||||
;;
|
||||
esac
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/hpmpi
|
||||
;;
|
||||
|
||||
GAMMA)
|
||||
export FOAM_MPI=gamma
|
||||
export MPI_ARCH_PATH=/usr
|
||||
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/gamma
|
||||
;;
|
||||
|
||||
MPI)
|
||||
export FOAM_MPI=mpi
|
||||
export MPI_ARCH_PATH=/opt/mpi
|
||||
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/mpi
|
||||
;;
|
||||
|
||||
FJMPI)
|
||||
export FOAM_MPI=fjmpi
|
||||
export MPI_ARCH_PATH=/opt/FJSVmpi2
|
||||
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/mpi
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib/sparcv9
|
||||
@ -386,20 +376,25 @@ FJMPI)
|
||||
;;
|
||||
|
||||
QSMPI)
|
||||
export FOAM_MPI=qsmpi
|
||||
export MPI_ARCH_PATH=/usr/lib/mpi
|
||||
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/qsmpi
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/dummy
|
||||
export FOAM_MPI=dummy
|
||||
;;
|
||||
esac
|
||||
|
||||
_foamAddLib $FOAM_MPI_LIBBIN
|
||||
# add (non-dummy) MPI implementation
|
||||
# dummy MPI already added to LD_LIBRARY_PATH and has no external libraries
|
||||
if [ "$FOAM_MPI" != dummy ]
|
||||
then
|
||||
_foamAddLib $FOAM_LIBBIN/$FOAM_MPI:$FOAM_EXT_LIBBIN/$FOAM_MPI
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Set the minimum MPI buffer size (used by all platforms except SGI MPI)
|
||||
@ -413,14 +408,6 @@ fi
|
||||
export MPI_BUFFER_SIZE
|
||||
|
||||
|
||||
# Enable the hoard memory allocator if available
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#if [ -f $FOAM_EXT_LIBBIN/libhoard.so ]
|
||||
#then
|
||||
# export LD_PRELOAD=$FOAM_EXT_LIBBIN/libhoard.so:$LD_PRELOAD
|
||||
#fi
|
||||
|
||||
|
||||
# cleanup environment:
|
||||
# ~~~~~~~~~~~~~~~~~~~~
|
||||
unset _foamAddPath _foamAddLib _foamAddMan foamCompiler minBufferSize
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,9 +23,8 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "error.H"
|
||||
#include "sigFpe.H"
|
||||
|
||||
#include "error.H"
|
||||
#include "JobInfo.H"
|
||||
#include "OSspecific.H"
|
||||
#include "IOstreams.H"
|
||||
@ -52,51 +51,42 @@ License
|
||||
struct sigaction Foam::sigFpe::oldAction_;
|
||||
|
||||
|
||||
#if defined(LINUX)
|
||||
#ifdef LINUX
|
||||
|
||||
void *(*Foam::sigFpe::old_malloc_hook)(size_t, const void *) = NULL;
|
||||
void *(*Foam::sigFpe::oldMallocHook_)(size_t, const void *) = NULL;
|
||||
|
||||
void* Foam::sigFpe::my_malloc_hook(size_t size, const void *caller)
|
||||
void* Foam::sigFpe::nanMallocHook_(size_t size, const void *caller)
|
||||
{
|
||||
void *result;
|
||||
|
||||
// Restore all old hooks
|
||||
__malloc_hook = old_malloc_hook;
|
||||
__malloc_hook = oldMallocHook_;
|
||||
|
||||
// Call recursively
|
||||
result = malloc(size);
|
||||
|
||||
// initialize to signalling nan
|
||||
// initialize to signalling NaN
|
||||
# ifdef WM_SP
|
||||
|
||||
const uint32_t sNAN = 0x7ff7fffflu;
|
||||
|
||||
int nScalars = size / sizeof(scalar);
|
||||
|
||||
uint32_t* dPtr = reinterpret_cast<uint32_t*>(result);
|
||||
|
||||
for (int i = 0; i < nScalars; i++)
|
||||
{
|
||||
*dPtr++ = sNAN;
|
||||
}
|
||||
|
||||
# else
|
||||
|
||||
const uint64_t sNAN = 0x7ff7ffffffffffffllu;
|
||||
|
||||
int nScalars = size/sizeof(scalar);
|
||||
|
||||
uint64_t* dPtr = reinterpret_cast<uint64_t*>(result);
|
||||
|
||||
for (int i = 0; i < nScalars; i++)
|
||||
# endif
|
||||
|
||||
const size_t nScalars = size/sizeof(scalar);
|
||||
for (size_t i = 0; i < nScalars; ++i)
|
||||
{
|
||||
*dPtr++ = sNAN;
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
// Restore our own hooks
|
||||
__malloc_hook = my_malloc_hook;
|
||||
__malloc_hook = nanMallocHook_;
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -106,14 +96,14 @@ void* Foam::sigFpe::my_malloc_hook(size_t size, const void *caller)
|
||||
|
||||
#ifdef LINUX_GNUC
|
||||
|
||||
void Foam::sigFpe::sigFpeHandler(int)
|
||||
void Foam::sigFpe::sigHandler(int)
|
||||
{
|
||||
// Reset old handling
|
||||
if (sigaction(SIGFPE, &oldAction_, NULL) < 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::sigSegv::sigFpeHandler()"
|
||||
"Foam::sigSegv::sigHandler()"
|
||||
) << "Cannot reset SIGFPE trapping"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -166,7 +156,7 @@ Foam::sigFpe::~sigFpe()
|
||||
// Reset to standard malloc
|
||||
if (oldAction_.sa_handler)
|
||||
{
|
||||
__malloc_hook = old_malloc_hook;
|
||||
__malloc_hook = oldMallocHook_;
|
||||
}
|
||||
|
||||
# endif
|
||||
@ -189,13 +179,10 @@ void Foam::sigFpe::set(const bool verbose)
|
||||
|
||||
if (env("FOAM_SIGFPE"))
|
||||
{
|
||||
if (verbose)
|
||||
{
|
||||
Info<< "SigFpe : Enabling floating point exception trapping"
|
||||
<< " (FOAM_SIGFPE)." << endl;
|
||||
}
|
||||
bool supported = false;
|
||||
|
||||
# ifdef LINUX_GNUC
|
||||
supported = true;
|
||||
|
||||
feenableexcept
|
||||
(
|
||||
@ -205,7 +192,7 @@ void Foam::sigFpe::set(const bool verbose)
|
||||
);
|
||||
|
||||
struct sigaction newAction;
|
||||
newAction.sa_handler = sigFpeHandler;
|
||||
newAction.sa_handler = sigHandler;
|
||||
newAction.sa_flags = SA_NODEFER;
|
||||
sigemptyset(&newAction.sa_mask);
|
||||
if (sigaction(SIGFPE, &newAction, &oldAction_) < 0)
|
||||
@ -219,6 +206,7 @@ void Foam::sigFpe::set(const bool verbose)
|
||||
|
||||
|
||||
# elif defined(sgiN32) || defined(sgiN32Gcc)
|
||||
supported = true;
|
||||
|
||||
sigfpe_[_DIVZERO].abort=1;
|
||||
sigfpe_[_OVERFL].abort=1;
|
||||
@ -240,23 +228,50 @@ void Foam::sigFpe::set(const bool verbose)
|
||||
);
|
||||
|
||||
# endif
|
||||
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
if (supported)
|
||||
{
|
||||
Info<< "sigFpe : Enabling floating point exception trapping"
|
||||
<< " (FOAM_SIGFPE)." << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "sigFpe : Floating point exception trapping"
|
||||
<< " - not supported on this platform" << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (env("FOAM_SETNAN"))
|
||||
{
|
||||
bool supported = false;
|
||||
|
||||
# ifdef LINUX_GNUC
|
||||
supported = true;
|
||||
|
||||
// Set our malloc
|
||||
__malloc_hook = Foam::sigFpe::nanMallocHook_;
|
||||
|
||||
# endif
|
||||
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
if (supported)
|
||||
{
|
||||
Info<< "SetNaN : Initialising allocated memory to NaN"
|
||||
<< " (FOAM_SETNAN)." << endl;
|
||||
}
|
||||
|
||||
# ifdef LINUX_GNUC
|
||||
|
||||
// Set our malloc
|
||||
__malloc_hook = Foam::sigFpe::my_malloc_hook;
|
||||
|
||||
# endif
|
||||
else
|
||||
{
|
||||
Info<< "SetNaN : Initialise allocated memory to NaN"
|
||||
<< " - not supported on this platform" << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -43,7 +43,6 @@ SourceFiles
|
||||
#ifndef sigFpe_H
|
||||
#define sigFpe_H
|
||||
|
||||
#include "OSspecific.H"
|
||||
#include <signal.h>
|
||||
|
||||
#if defined(linux) || defined(linuxAMD64) || defined(linuxIA64)
|
||||
@ -73,10 +72,10 @@ class sigFpe
|
||||
# ifdef LINUX
|
||||
|
||||
//- Saved old malloc
|
||||
static void *(*old_malloc_hook)(size_t, const void *);
|
||||
static void *(*oldMallocHook_)(size_t, const void *);
|
||||
|
||||
//- nan malloc function. From malloc_hook manpage.
|
||||
static void* my_malloc_hook(size_t size, const void *caller);
|
||||
//- NaN malloc function. From malloc_hook manpage.
|
||||
static void* nanMallocHook_(size_t size, const void *caller);
|
||||
|
||||
# endif
|
||||
|
||||
@ -86,7 +85,7 @@ class sigFpe
|
||||
# ifdef LINUX_GNUC
|
||||
|
||||
//- Handler for caught signals
|
||||
static void sigFpeHandler(int);
|
||||
static void sigHandler(int);
|
||||
|
||||
# endif
|
||||
|
||||
@ -96,6 +95,7 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
sigFpe();
|
||||
|
||||
|
||||
@ -105,6 +105,8 @@ public:
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Activate SIGFPE signal handler when FOAM_SIGFPE is %set
|
||||
// Fill memory with NaN when FOAM_SETNAN is %set
|
||||
void set(const bool verbose);
|
||||
};
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,8 +23,8 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "error.H"
|
||||
#include "sigInt.H"
|
||||
#include "error.H"
|
||||
#include "JobInfo.H"
|
||||
#include "IOstreams.H"
|
||||
|
||||
@ -32,16 +32,17 @@ License
|
||||
|
||||
struct sigaction Foam::sigInt::oldAction_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::sigInt::sigIntHandler(int)
|
||||
void Foam::sigInt::sigHandler(int)
|
||||
{
|
||||
// Reset old handling
|
||||
if (sigaction(SIGINT, &oldAction_, NULL) < 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::sigInt::sigIntHandler()"
|
||||
"Foam::sigInt::sigHandler()"
|
||||
) << "Cannot reset SIGINT trapping"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -80,7 +81,7 @@ Foam::sigInt::~sigInt()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::sigInt::set(const bool verbose)
|
||||
void Foam::sigInt::set(const bool)
|
||||
{
|
||||
if (oldAction_.sa_handler)
|
||||
{
|
||||
@ -92,7 +93,7 @@ void Foam::sigInt::set(const bool verbose)
|
||||
}
|
||||
|
||||
struct sigaction newAction;
|
||||
newAction.sa_handler = sigIntHandler;
|
||||
newAction.sa_handler = sigHandler;
|
||||
newAction.sa_flags = SA_NODEFER;
|
||||
sigemptyset(&newAction.sa_mask);
|
||||
if (sigaction(SIGINT, &newAction, &oldAction_) < 0)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -38,7 +38,9 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "OSspecific.H"
|
||||
#ifndef sigInt_H
|
||||
#define sigInt_H
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -60,13 +62,14 @@ class sigInt
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
static void sigIntHandler(int);
|
||||
static void sigHandler(int);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
sigInt();
|
||||
|
||||
|
||||
@ -76,6 +79,7 @@ public:
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Activate SIGINT signal handler
|
||||
void set(const bool verbose);
|
||||
};
|
||||
|
||||
@ -84,4 +88,8 @@ public:
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,8 +23,8 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "error.H"
|
||||
#include "sigQuit.H"
|
||||
#include "error.H"
|
||||
#include "JobInfo.H"
|
||||
#include "IOstreams.H"
|
||||
|
||||
@ -32,16 +32,17 @@ License
|
||||
|
||||
struct sigaction Foam::sigQuit::oldAction_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::sigQuit::sigQuitHandler(int)
|
||||
void Foam::sigQuit::sigHandler(int)
|
||||
{
|
||||
// Reset old handling
|
||||
if (sigaction(SIGQUIT, &oldAction_, NULL) < 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::sigQuit::sigQuitHandler()"
|
||||
"Foam::sigQuit::sigHandler()"
|
||||
) << "Cannot reset SIGQUIT trapping"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -94,7 +95,7 @@ void Foam::sigQuit::set(const bool verbose)
|
||||
}
|
||||
|
||||
struct sigaction newAction;
|
||||
newAction.sa_handler = sigQuitHandler;
|
||||
newAction.sa_handler = sigHandler;
|
||||
newAction.sa_flags = SA_NODEFER;
|
||||
sigemptyset(&newAction.sa_mask);
|
||||
if (sigaction(SIGQUIT, &newAction, &oldAction_) < 0)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -38,7 +38,9 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "OSspecific.H"
|
||||
#ifndef sigQuit_H
|
||||
#define sigQuit_H
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -60,13 +62,15 @@ class sigQuit
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
static void sigQuitHandler(int);
|
||||
//- Handler for caught signals
|
||||
static void sigHandler(int);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
sigQuit();
|
||||
|
||||
|
||||
@ -76,6 +80,7 @@ public:
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Activate SIGQUIT signal handler
|
||||
void set(const bool verbose);
|
||||
};
|
||||
|
||||
@ -84,4 +89,8 @@ public:
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,8 +23,8 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "error.H"
|
||||
#include "sigSegv.H"
|
||||
#include "error.H"
|
||||
#include "JobInfo.H"
|
||||
#include "IOstreams.H"
|
||||
|
||||
@ -32,16 +32,17 @@ License
|
||||
|
||||
struct sigaction Foam::sigSegv::oldAction_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::sigSegv::sigSegvHandler(int)
|
||||
void Foam::sigSegv::sigHandler(int)
|
||||
{
|
||||
// Reset old handling
|
||||
if (sigaction(SIGSEGV, &oldAction_, NULL) < 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::sigSegv::sigSegvHandler()"
|
||||
"Foam::sigSegv::sigHandler()"
|
||||
) << "Cannot reset SIGSEGV trapping"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -82,7 +83,7 @@ Foam::sigSegv::~sigSegv()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::sigSegv::set(const bool verbose)
|
||||
void Foam::sigSegv::set(const bool)
|
||||
{
|
||||
if (oldAction_.sa_handler)
|
||||
{
|
||||
@ -94,7 +95,7 @@ void Foam::sigSegv::set(const bool verbose)
|
||||
}
|
||||
|
||||
struct sigaction newAction;
|
||||
newAction.sa_handler = sigSegvHandler;
|
||||
newAction.sa_handler = sigHandler;
|
||||
newAction.sa_flags = SA_NODEFER;
|
||||
sigemptyset(&newAction.sa_mask);
|
||||
if (sigaction(SIGSEGV, &newAction, &oldAction_) < 0)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -38,7 +38,9 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "OSspecific.H"
|
||||
#ifndef sigSegv_H
|
||||
#define sigSegv_H
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -60,13 +62,15 @@ class sigSegv
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
static void sigSegvHandler(int);
|
||||
//- Handler for caught signals
|
||||
static void sigHandler(int);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
sigSegv();
|
||||
|
||||
|
||||
@ -76,6 +80,7 @@ public:
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Activate SIGSEGV signal handler
|
||||
void set(const bool verbose);
|
||||
};
|
||||
|
||||
@ -84,4 +89,8 @@ public:
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -58,10 +58,10 @@ Foam::argList::initValidTables::initValidTables()
|
||||
validParOptions.set("parallel", "");
|
||||
argList::addOption
|
||||
(
|
||||
"roots", "(dir1 .. dirn)",
|
||||
"roots", "(dir1 .. dirN)",
|
||||
"slave root directories for distributed running"
|
||||
);
|
||||
validParOptions.set("roots", "(dir1 .. dirn)");
|
||||
validParOptions.set("roots", "(dir1 .. dirN)");
|
||||
|
||||
Pstream::addValidParOptions(validParOptions);
|
||||
}
|
||||
@ -138,8 +138,8 @@ void Foam::argList::noBanner()
|
||||
|
||||
void Foam::argList::noParallel()
|
||||
{
|
||||
optionUsage.erase("parallel");
|
||||
validOptions.erase("parallel");
|
||||
removeOption("parallel");
|
||||
removeOption("roots");
|
||||
validParOptions.clear();
|
||||
}
|
||||
|
||||
@ -537,10 +537,10 @@ Foam::argList::argList
|
||||
|
||||
if (options_.found("roots"))
|
||||
{
|
||||
source = "'-roots' option";
|
||||
IStringStream str(options_["roots"]);
|
||||
str >> roots;
|
||||
dictNProcs = roots.size()+1;
|
||||
source = "roots-command-line";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -593,7 +593,7 @@ Foam::argList::argList
|
||||
{
|
||||
forAll(roots, i)
|
||||
{
|
||||
roots[i] = roots[i].expand();
|
||||
roots[i].expand();
|
||||
}
|
||||
|
||||
if (roots.size() != Pstream::nProcs()-1)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -83,6 +83,7 @@ SourceFiles
|
||||
#include "fileName.H"
|
||||
#include "parRun.H"
|
||||
#include "IStringStream.H"
|
||||
#include "OSspecific.H"
|
||||
|
||||
#include "sigFpe.H"
|
||||
#include "sigInt.H"
|
||||
@ -94,7 +95,9 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class argList Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class argList
|
||||
{
|
||||
@ -165,7 +168,7 @@ public:
|
||||
//- Max screen width for displaying usage (default: 80)
|
||||
static string::size_type usageMax;
|
||||
|
||||
//! @cond ignoreDocumentation
|
||||
//! @cond internalClass
|
||||
class initValidTables
|
||||
{
|
||||
public:
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -31,8 +31,8 @@ License
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
//! @cond fileScope
|
||||
const char hexChars[] = "0123456789abcdef";
|
||||
//! @endcond fileScope
|
||||
static const char hexChars[] = "0123456789abcdef";
|
||||
//! @endcond
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
@ -87,6 +87,20 @@ void Foam::SHA1Digest::clear()
|
||||
}
|
||||
|
||||
|
||||
bool Foam::SHA1Digest::empty() const
|
||||
{
|
||||
for (unsigned i = 0; i < length; ++i)
|
||||
{
|
||||
if (v_[i])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::SHA1Digest::operator==(const SHA1Digest& rhs) const
|
||||
@ -103,9 +117,79 @@ bool Foam::SHA1Digest::operator==(const SHA1Digest& rhs) const
|
||||
}
|
||||
|
||||
|
||||
bool Foam::SHA1Digest::operator==(const std::string& hexdigits) const
|
||||
{
|
||||
// null or empty string is not an error - interpret as '0000..'
|
||||
if (hexdigits.empty())
|
||||
{
|
||||
return empty();
|
||||
}
|
||||
|
||||
// incorrect length - can never match
|
||||
if (hexdigits.size() != length*2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (unsigned i = 0, charI = 0; i < length; ++i, charI += 2)
|
||||
{
|
||||
const char c1 = hexChars[((v_[i] >> 4) & 0xF)];
|
||||
const char c2 = hexChars[(v_[i] & 0xF)];
|
||||
|
||||
if (c1 != hexdigits[charI] || c2 != hexdigits[charI+1])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::SHA1Digest::operator==(const char* hexdigits) const
|
||||
{
|
||||
// null or empty string is not an error - interpret as '0000..'
|
||||
if (!hexdigits || !*hexdigits)
|
||||
{
|
||||
return empty();
|
||||
}
|
||||
|
||||
// incorrect length - can never match
|
||||
if (strlen(hexdigits) != length*2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (unsigned i = 0, charI = 0; i < length; ++i, charI += 2)
|
||||
{
|
||||
const char c1 = hexChars[((v_[i] >> 4) & 0xF)];
|
||||
const char c2 = hexChars[(v_[i] & 0xF)];
|
||||
|
||||
if (c1 != hexdigits[charI] || c2 != hexdigits[charI+1])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::SHA1Digest::operator!=(const SHA1Digest& rhs) const
|
||||
{
|
||||
return !this->operator==(rhs);
|
||||
return !operator==(rhs);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::SHA1Digest::operator!=(const std::string& rhs) const
|
||||
{
|
||||
return !operator==(rhs);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::SHA1Digest::operator!=(const char* rhs) const
|
||||
{
|
||||
return !operator==(rhs);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -3,4 +3,4 @@ Pstream.C
|
||||
OPwrite.C
|
||||
IPread.C
|
||||
|
||||
LIB = $(FOAM_MPI_LIBBIN)/libPstream
|
||||
LIB = $(FOAM_LIBBIN)/$(FOAM_MPI)/libPstream
|
||||
|
||||
@ -3,4 +3,4 @@ UIPread.C
|
||||
UPstream.C
|
||||
PstreamGlobals.C
|
||||
|
||||
LIB = $(FOAM_MPI_LIBBIN)/libPstream
|
||||
LIB = $(FOAM_LIBBIN)/$(FOAM_MPI)/libPstream
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -167,6 +167,14 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::coordinateRotation::clear()
|
||||
{
|
||||
this->tensor::operator=(sphericalTensor::I);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::coordinateRotation::operator=(const dictionary& rhs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -165,6 +165,9 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Reset rotation to an identity rotation
|
||||
virtual void clear();
|
||||
|
||||
//- Return local-to-global transformation tensor
|
||||
const tensor& R() const
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -290,6 +290,15 @@ Foam::tmp<Foam::vectorField> Foam::coordinateSystem::globalToLocal
|
||||
}
|
||||
|
||||
|
||||
void Foam::coordinateSystem::clear()
|
||||
{
|
||||
note_.clear();
|
||||
origin_ = point::zero;
|
||||
R_.clear();
|
||||
Rtr_ = sphericalTensor::I;
|
||||
}
|
||||
|
||||
|
||||
void Foam::coordinateSystem::write(Ostream& os) const
|
||||
{
|
||||
os << type()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -397,6 +397,10 @@ public:
|
||||
return origin_;
|
||||
}
|
||||
|
||||
//- Reset origin and rotation to an identity coordinateSystem
|
||||
// Also resets the note
|
||||
virtual void clear();
|
||||
|
||||
|
||||
// Write
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH, SCOTCH_MPI_INCLUDE
|
||||
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH
|
||||
settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc`
|
||||
if [ -f "$settings" ]
|
||||
then
|
||||
@ -19,7 +19,7 @@ wmakeLnInclude decompositionMethods
|
||||
wmake libso scotchDecomp
|
||||
wmake libso metisDecomp
|
||||
|
||||
if [ -d "$FOAM_MPI_LIBBIN" ]
|
||||
if [ -d "$FOAM_LIBBIN/$FOAM_MPI" ]
|
||||
then
|
||||
(
|
||||
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
metisDecomp.C
|
||||
|
||||
LIB = $(FOAM_EXT_LIBBIN)/libmetisDecomp
|
||||
LIB = $(FOAM_LIBBIN)/libmetisDecomp
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
ptscotchDecomp.C
|
||||
|
||||
LIB = $(FOAM_MPI_LIBBIN)/libptscotchDecomp
|
||||
LIB = $(FOAM_LIBBIN)/$(FOAM_MPI)/libptscotchDecomp
|
||||
|
||||
@ -3,9 +3,9 @@ sinclude $(RULES)/mplib$(WM_MPLIB)
|
||||
|
||||
EXE_INC = \
|
||||
$(PFLAGS) $(PINC) \
|
||||
-I$(SCOTCH_MPI_INCLUDE) \
|
||||
-I$(SCOTCH_ARCH_PATH)/include/$(FOAM_MPI) \
|
||||
-I/usr/include/scotch \
|
||||
-I../decompositionMethods/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-L$(FOAM_MPI_LIBBIN) -lptscotch -lptscotcherrexit -lrt
|
||||
-L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit -lrt
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
scotchDecomp.C
|
||||
|
||||
LIB = $(FOAM_EXT_LIBBIN)/libscotchDecomp
|
||||
LIB = $(FOAM_LIBBIN)/libscotchDecomp
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -188,7 +188,7 @@ Foam::forces::forces
|
||||
fDName_(""),
|
||||
rhoRef_(VGREAT),
|
||||
pRef_(0),
|
||||
CofR_(vector::zero),
|
||||
coordSys_(),
|
||||
forcesFilePtr_(NULL)
|
||||
{
|
||||
// Check if the available mesh is an fvMesh otherise deactivate
|
||||
@ -225,14 +225,13 @@ void Foam::forces::read(const dictionary& dict)
|
||||
if (active_)
|
||||
{
|
||||
log_ = dict.lookupOrDefault<Switch>("log", false);
|
||||
directForceDensity_ = dict.lookupOrDefault("directForceDensity", false);
|
||||
|
||||
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
||||
|
||||
patchSet_ =
|
||||
mesh.boundaryMesh().patchSet(wordList(dict.lookup("patches")));
|
||||
|
||||
dict.readIfPresent("directForceDensity", directForceDensity_);
|
||||
|
||||
if (directForceDensity_)
|
||||
{
|
||||
// Optional entry for fDName
|
||||
@ -245,7 +244,7 @@ void Foam::forces::read(const dictionary& dict)
|
||||
)
|
||||
{
|
||||
active_ = false;
|
||||
WarningIn("void forces::read(const dictionary& dict)")
|
||||
WarningIn("void forces::read(const dictionary&)")
|
||||
<< "Could not find " << fDName_ << " in database." << nl
|
||||
<< " De-activating forces."
|
||||
<< endl;
|
||||
@ -272,7 +271,7 @@ void Foam::forces::read(const dictionary& dict)
|
||||
{
|
||||
active_ = false;
|
||||
|
||||
WarningIn("void forces::read(const dictionary& dict)")
|
||||
WarningIn("void forces::read(const dictionary&)")
|
||||
<< "Could not find " << UName_ << ", " << pName_;
|
||||
|
||||
if (rhoName_ != "rhoInf")
|
||||
@ -280,8 +279,8 @@ void Foam::forces::read(const dictionary& dict)
|
||||
Info<< " or " << rhoName_;
|
||||
}
|
||||
|
||||
Info<< " in database." << nl << " De-activating forces."
|
||||
<< endl;
|
||||
Info<< " in database." << nl
|
||||
<< " De-activating forces." << endl;
|
||||
}
|
||||
|
||||
// Reference density needed for incompressible calculations
|
||||
@ -291,8 +290,14 @@ void Foam::forces::read(const dictionary& dict)
|
||||
pRef_ = dict.lookupOrDefault<scalar>("pRef", 0.0);
|
||||
}
|
||||
|
||||
coordSys_.clear();
|
||||
|
||||
// Centre of rotation for moment calculations
|
||||
CofR_ = dict.lookup("CofR");
|
||||
// specified directly, from coordinate system, or implicitly (0 0 0)
|
||||
if (!dict.readIfPresent<point>("CofR", coordSys_.origin()))
|
||||
{
|
||||
coordSys_ = coordinateSystem(dict, obr_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -345,6 +350,8 @@ void Foam::forces::writeFileHeader()
|
||||
forcesFilePtr_()
|
||||
<< "# Time" << tab
|
||||
<< "forces(pressure, viscous) moment(pressure, viscous)"
|
||||
<< tab
|
||||
<< "local forces(pressure, viscous) local moment(pressure, viscous)"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
@ -373,13 +380,32 @@ void Foam::forces::write()
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
forcesFilePtr_() << obr_.time().value() << tab << fm << endl;
|
||||
forcesMoments fmLocal;
|
||||
|
||||
fmLocal.first().first() =
|
||||
coordSys_.localVector(fm.first().first());
|
||||
|
||||
fmLocal.first().second() =
|
||||
coordSys_.localVector(fm.first().second());
|
||||
|
||||
fmLocal.second().first() =
|
||||
coordSys_.localVector(fm.second().first());
|
||||
|
||||
fmLocal.second().second() =
|
||||
coordSys_.localVector(fm.second().second());
|
||||
|
||||
forcesFilePtr_() << obr_.time().value()
|
||||
<< tab << fm
|
||||
<< tab << fmLocal << endl;
|
||||
|
||||
if (log_)
|
||||
{
|
||||
Info<< "forces output:" << nl
|
||||
<< " forces(pressure, viscous)" << fm.first() << nl
|
||||
<< " moment(pressure, viscous)" << fm.second() << nl
|
||||
<< " local:" << nl
|
||||
<< " forces(pressure, viscous)" << fmLocal.first() << nl
|
||||
<< " moment(pressure, viscous)" << fmLocal.second() << nl
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
@ -408,7 +434,10 @@ Foam::forces::forcesMoments Foam::forces::calcForcesMoment() const
|
||||
{
|
||||
label patchi = iter.key();
|
||||
|
||||
vectorField Md(mesh.C().boundaryField()[patchi] - CofR_);
|
||||
vectorField Md
|
||||
(
|
||||
mesh.C().boundaryField()[patchi] - coordSys_.origin()
|
||||
);
|
||||
|
||||
scalarField sA(mag(Sfb[patchi]));
|
||||
|
||||
@ -452,7 +481,10 @@ Foam::forces::forcesMoments Foam::forces::calcForcesMoment() const
|
||||
{
|
||||
label patchi = iter.key();
|
||||
|
||||
vectorField Md(mesh.C().boundaryField()[patchi] - CofR_);
|
||||
vectorField Md
|
||||
(
|
||||
mesh.C().boundaryField()[patchi] - coordSys_.origin()
|
||||
);
|
||||
|
||||
vectorField pf(Sfb[patchi]*(p.boundaryField()[patchi] - pRef));
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,11 +28,25 @@ Description
|
||||
Calculates the forces and moments by integrating the pressure and
|
||||
skin-friction forces over a given list of patches.
|
||||
|
||||
Member function calcForcesMoment()calculates and returns the forces and
|
||||
moments.
|
||||
Member function forces::write() calculates the forces/moments and
|
||||
writes the forces/moments into the file \<timeDir\>/forces.dat
|
||||
|
||||
Member function forces::write() calls calcForcesMoment() and writes the
|
||||
forces and moments into the file \<timeDir\>/forces.dat
|
||||
Note
|
||||
The centre of rotation for moment calculations can either be specified
|
||||
by an @c CofR entry, or be taken from origin of the local coordinateSystem.
|
||||
For example,
|
||||
@verbatim
|
||||
CofR (0 0 0);
|
||||
@endverbatim
|
||||
or
|
||||
@verbatim
|
||||
coordinateSystem
|
||||
{
|
||||
origin (0 0 0);
|
||||
e3 (0 0 1);
|
||||
e1 (1 0 0);
|
||||
}
|
||||
@endverbatim
|
||||
|
||||
SourceFiles
|
||||
forces.C
|
||||
@ -43,6 +57,8 @@ SourceFiles
|
||||
#ifndef forces_H
|
||||
#define forces_H
|
||||
|
||||
#include "coordinateSystem.H"
|
||||
#include "coordinateSystems.H"
|
||||
#include "primitiveFieldsFwd.H"
|
||||
#include "volFieldsFwd.H"
|
||||
#include "HashSet.H"
|
||||
@ -69,15 +85,14 @@ class forces
|
||||
{
|
||||
public:
|
||||
|
||||
// Tuple which holds the pressure (.first()) and viscous (.second) forces
|
||||
// Tuple for pressure (.first()) and viscous (.second()) forces
|
||||
typedef Tuple2<vector, vector> pressureViscous;
|
||||
|
||||
// Tuple which holds the forces (.first()) and moment (.second)
|
||||
// Tuple for forces (.first()) and moment (.second())
|
||||
// pressure/viscous forces Tuples.
|
||||
typedef Tuple2<pressureViscous, pressureViscous> forcesMoments;
|
||||
|
||||
//- Sum operation class to accumulate the pressure, viscous forces
|
||||
// and moments
|
||||
//- Sum operation class to accumulate pressure/viscous forces and moments
|
||||
class sumOp
|
||||
{
|
||||
public:
|
||||
@ -147,8 +162,8 @@ protected:
|
||||
//- Reference pressure
|
||||
scalar pRef_;
|
||||
|
||||
//- Centre of rotation
|
||||
vector CofR_;
|
||||
//- Coordinate system used when evaluting forces/moments
|
||||
coordinateSystem coordSys_;
|
||||
|
||||
|
||||
//- Forces/moment file ptr
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -223,9 +223,6 @@ public:
|
||||
|
||||
// Public typedefs
|
||||
|
||||
//- Face type used
|
||||
typedef labelledTri FaceType;
|
||||
|
||||
//- Placeholder only, but do not remove - it is needed for GeoMesh
|
||||
typedef bool BoundaryMesh;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -17,4 +17,3 @@ reactions
|
||||
Ta 14906;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -56,8 +56,7 @@ WM_SCRIPTS = $(WM_DIR)/scripts
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
LIB_SRC = $(WM_PROJECT_DIR)/src
|
||||
LIB_DIR = $(WM_PROJECT_DIR)/lib
|
||||
LIB_WM_OPTIONS_DIR = $(LIB_DIR)/$(WM_OPTIONS)
|
||||
LIB_PLATFORMS = $(WM_PROJECT_DIR)/platforms/$(WM_OPTIONS)/lib
|
||||
OBJECTS_DIR = $(MAKE_DIR)/$(WM_OPTIONS)
|
||||
CLASSES_DIR = $(MAKE_DIR)/classes
|
||||
|
||||
@ -148,7 +147,7 @@ LIB_HEADER_DIRS = \
|
||||
|
||||
$(EXE): $(OBJECTS)
|
||||
@$(WM_SCRIPTS)/makeTargetDir $(EXE)
|
||||
$(LINKEXE) $(OBJECTS) -L$(LIB_WM_OPTIONS_DIR) \
|
||||
$(LINKEXE) $(OBJECTS) -L$(LIB_PLATFORMS) \
|
||||
$(EXE_LIBS) $(PROJECT_LIBS) $(SYS_LIBS) $(LINK_LIBS) $(GLIBS) -o $(EXE)
|
||||
|
||||
exe: $(SEXE)
|
||||
@ -173,7 +172,7 @@ $(LIB).$(SO): $(OBJECTS)
|
||||
@$(WM_SCRIPTS)/makeTargetDir $(LIB)
|
||||
@rm -f so_locations
|
||||
@cd $(OBJECTS_DIR) ; \
|
||||
$(LINKLIBSO) $(LOCAL_OBJECTS) -L$(LIB_WM_OPTIONS_DIR) $(LIB_LIBS) $(GLIB_LIBS) -o $(LIB).$(SO)
|
||||
$(LINKLIBSO) $(LOCAL_OBJECTS) -L$(LIB_PLATFORMS) $(LIB_LIBS) $(GLIB_LIBS) -o $(LIB).$(SO)
|
||||
|
||||
lib: $(LIB).a
|
||||
@echo \'$(LIB).a\' is up to date.
|
||||
|
||||
Reference in New Issue
Block a user