Merge branch 'testLoop/PhilipposeRajanMerge' of wikki.no-ip.biz:OpenFOAM-1.6-ext into testLoop/PhilipposeRajanMerge

This commit is contained in:
Philippose Rajan 2010-11-01 11:48:30 +01:00
commit 49cb246e56
69 changed files with 1207 additions and 187 deletions

87
.hgignore Normal file
View file

@ -0,0 +1,87 @@
syntax: glob
# This line is a comment, and will be skipped.
# Empty lines are skipped too.
# Backup files left behind by the Emacs editor.
*~
.*~
*.bak
*.bak[0-9][0-9]
*.orig
*.orig[0-9][0-9]
\#*\#
# CVS recovered versions - anywhere
.#*
# objects and archives - anywhere
*.[oa]
*.la
*.so
*.jar
*.dylib
# Lock files used by the Emacs editor.
# Notice that the "#" character is quoted with a backslash.
# This prevents it from being interpreted as starting a comment.
.\#*
# Temporary files used by the vim editor.
.*.swp
# A hidden file created by the Mac OS X Finder.
.DS_Store
# Ignore the build-dirctories
darwinIntel*/
linux*Gcc*/
linux*Icc*/
linuxming*/
SiCortex*Gcc*/
solaris*Gcc*/
SunOS*Gcc*/
# reinstate wmake/rules that might look like build folders
!wmake/rules/*/
# those have to go
lnInclude
# derived files
lex.yy.c
# Corefiles
core
# dependency-files
*.dep
# no Doxygen stuff
doc/[Dd]oxygen/html
doc/[Dd]oxygen/latex
doc/[Dd]oxygen/man
# patch residue
*.orig
*.rej
# pyFoam-stuff
PlyParser_FoamFileParser_parsetab.py
# python-compile
*.pyc
# other stuff
.build
# .gitignore
.timeStamp
#Test-Harness generated stuff
testHarness/OpenFOAM/1.6-ext/runDir/tutorialsTestSuites_oneTimeStep
testHarness/OpenFOAM/1.6-ext/runDir/Testing
testHarness/OpenFOAM/1.6-ext/runDir/CMake*
testHarness/OpenFOAM/1.6-ext/runDir/CTestTestfile.cmake
testHarness/OpenFOAM/1.6-ext/runDir/DartConfiguration.tcl
testHarness/OpenFOAM/1.6-ext/runDir/Makefile
testHarness/OpenFOAM/1.6-ext/runDir/cmake_install.cmake

View file

@ -125,6 +125,14 @@ if(GIT_FOUND)
OUTPUT_VARIABLE GIT_BRANCH_NAME
)
message("Git branch: ${GIT_BRANCH_NAME}")
if (GIT_BRANCH_NAME STREQUAL "")
message("No git-branch. Mercurial?")
EXEC_PROGRAM(hg
ARGS branch
OUTPUT_VARIABLE GIT_BRANCH_NAME
)
message("Git branch (mercurial): ${GIT_BRANCH_NAME}")
endif()
SET(BUILDNAME "${BUILDNAME}-git-branch:${GIT_BRANCH_NAME}")
endif()

View file

@ -21,6 +21,7 @@ EXE_INC = \
EXE_LIBS = \
-lengine \
-lmeshTools \
-lcompressibleTurbulenceModel \
-lcompressibleRASModels \
-lbasicThermophysicalModels \
-lreactionThermophysicalModels \

View file

@ -648,7 +648,8 @@
defined LINUXI64 || \
defined LINUX64 || \
defined MAC64 || \
defined COMPAQALPHA
defined COMPAQALPHA || \
defined darwin
#define LONGIS64
#endif

View file

@ -373,7 +373,7 @@
#define SYSV
#endif
#if defined DECX || defined LINUX || defined IBMRS6000X || defined COMPAQX || defined DARWIN
#if defined DECX || defined LINUX || defined IBMRS6000X || defined COMPAQX || defined DARWIN || defined darwin
#define UNIXX
#endif
@ -524,7 +524,11 @@
# if XmVERSION == 1 && XmREVISION == 0
# endif
# else
# include <X11/Intrinsic.h>
# ifndef darwin
# include <X11/Intrinsic.h>
# else
typedef void *Widget;
# endif
# endif
#endif

View file

@ -2,6 +2,10 @@
TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUX64 -DUSEENUM -DTHREED -U_WIN32
#elif defined(darwinIntel) || defined(darwinIntel64) || defined(darwinPpc) || defined(darwinPpc64)
TECIO_FLAGS = -DMAKEARCHIVE -DDARWIN -DUSEENUM -DTHREED -U_WIN32
#elif defined(linuxIA64)
TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUXI64 -DUSEENUM -DTHREED -U_WIN32

View file

@ -12,6 +12,11 @@ then
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
cd Make/$WM_OPTIONS
cmake ../..
if [ "$WM_ARCH_BASE" == "darwin" ]
then
sed -i bak -e 's/-dynamiclib /& -undefined dynamic_lookup /' CMakeFiles/PV3FoamReader.dir/link.txt
sed -i bak -e 's/-dynamiclib /& -undefined dynamic_lookup /' CMakeFiles/PV3FoamReader_SM.dir/link.txt
fi
make
)
;;

View file

@ -3,6 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(ParaView_DIR)/VTK \
-I$(ParaView_DIR)/include/$(ParaView_MAJOR) \
-I$(ParaView_INST_DIR) \
-I$(ParaView_INST_DIR)/VTK \
-I$(ParaView_INST_DIR)/VTK/Common \

30
bin/addr2line4Mac.py Executable file
View file

@ -0,0 +1,30 @@
#! /usr/bin/python
import sys
filename=sys.argv[1]
address=sys.argv[2]
import re
import subprocess
p = subprocess.Popen("gdb -batch -x /dev/stdin",
shell=True,
bufsize=0,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
close_fds=True)
(child_stdin, child_stdout) = (p.stdin, p.stdout)
child_stdin.write("set sharedlibrary preload-libraries no\n")
child_stdin.write("file "+filename+"\n")
child_stdin.write("info line *"+address+"\n")
result=child_stdout.readline()
answer="??:0"
match=re.compile('Line (.+) of "(.+)" starts at').match(result)
if match:
answer=match.group(2)+":"+match.group(1)
print answer,
sys.exit(255)

277
bin/foamEtcFile Executable file
View file

@ -0,0 +1,277 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# Script
# foamEtcFile
#
# Description
# Locate user/group/shipped file with semantics similar to the
# ~OpenFOAM/fileName expansion.
#
# The -mode option can be used to allow chaining from
# personal settings to site-wide settings.
#
# For example, within the user ~/.OpenFOAM/<VER>/prefs.sh:
# @verbatim
# foamPrefs=`$WM_PROJECT_DIR/bin/foamEtcFile -m go prefs.sh` \
# && _foamSource $foamPrefs
# @endverbatim
#
#-------------------------------------------------------------------------------
usage() {
[ "$quietOpt" = true ] && exit 1
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
Usage: ${0##*/} [OPTION] fileName
${0##*/} [OPTION] -list
options:
-list list the directories to be searched
-mode <mode> any combination of u(user), g(group), o(other)
-prefix <dir> specify an alternative installation prefix
-quiet suppress all normal output
-version <ver> specify an alternative OpenFOAM version
in the form Maj.Min.Rev (eg, 1.7.0)
-help print the usage
Locate user/group/shipped file with semantics similar to the
~OpenFOAM/fileName expansion.
The options can also be specified as a single character
(eg, '-q' instead of '-quiet'), but must not be grouped.
Exit status
0 when the file is found. Print resolved path to stdout.
1 for miscellaneous errors.
2 when the file is not found.
USAGE
exit 1
}
#
# This script must exist in <foamInstall>/OpenFOAM-<VERSION>/bin/
# or <foamInstall>/openfoam<VERSION>/bin/ (for the debian version)
#
#-------------------------------------------------------------------------------
# the bindir:
binDir="${0%/*}"
# the project dir:
projectDir="${binDir%/bin}"
# the prefix dir (same as foamInstall):
prefixDir="${projectDir%/*}"
# the name used for the project directory
projectDirName="${projectDir##*/}"
# version number used for debian packaging
unset versionNum
#
# handle standard and debian naming convention
#
case "$projectDirName" in
OpenFOAM-*) # standard naming convention OpenFOAM-<VERSION>
version="${projectDirName##OpenFOAM-}"
;;
openfoam[0-9]*) # debian naming convention 'openfoam<VERSION>'
versionNum="${projectDirName##openfoam}"
case "$versionNum" in
??) # convert 2 digit version number to decimal delineated
version=$(echo "$versionNum" | sed -e 's@\(.\)\(.\)@\1.\2@')
;;
???) # convert 3 digit version number to decimal delineated
version=$(echo "$versionNum" | sed -e 's@\(.\)\(.\)\(.\)@\1.\2.\3@')
;;
????) # convert 4 digit version number to decimal delineated
version=$(echo "$versionNum" | sed -e 's@\(.\)\(.\)\(.\)\(.\)@\1.\2.\3.\4@')
;;
*) # failback - use current environment setting
version="$WM_PROJECT_VERSION"
;;
esac
;;
*)
echo "Error : unknown/unsupported naming convention"
exit 1
;;
esac
# default mode is 'ugo'
mode=ugo
unset listOpt quietOpt
# parse options
while [ "$#" -gt 0 ]
do
case "$1" in
-h | -help)
usage
;;
-l | -list)
listOpt=true
;;
-m | -mode)
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
mode="$2"
# sanity check:
case "$mode" in
*u* | *g* | *o* )
;;
*)
usage "'$1' option with invalid mode '$mode'"
;;
esac
shift
;;
-p | -prefix)
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
prefixDir="$2"
shift
;;
-q | -quiet)
quietOpt=true
;;
-v | -version)
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
version="$2"
# convert x.y.z -> xyz version (if installation looked like debian)
if [ -n "$versionNum" ]
then
versionNum=$(echo "$version" | sed -e 's@\.@@g')
fi
shift
;;
--)
shift
break
;;
-*)
usage "unknown option: '$*'"
;;
*)
break
;;
esac
shift
done
# debugging:
# echo "Installed locations:"
# for i in projectDir prefixDir projectDirName version versionNum
# do
# eval echo "$i=\$$i"
# done
# Save the essential bits of information
# silently remove leading ~OpenFOAM/ (used in Foam::findEtcFile)
nArgs=$#
fileName="${1#~OpenFOAM/}"
# Define the various places to be searched:
unset dirList
case "$mode" in
*u*) # user
dirList="$dirList $HOME/.${WM_PROJECT:-OpenFOAM}/$version"
dirList="$dirList $HOME/.${WM_PROJECT:-OpenFOAM}"
;;
esac
case "$mode" in
*g*) # group
dirList="$dirList $prefixDir/site/$version"
dirList="$dirList $prefixDir/site"
;;
esac
case "$mode" in
*o*) # other (shipped)
if [ -n "$versionNum" ]
then
# debian packaging
dirList="$dirList $prefixDir/openfoam$versionNum/etc"
else
# standard packaging
dirList="$dirList $prefixDir/${WM_PROJECT:-OpenFOAM}-$version/etc"
fi
;;
esac
set -- $dirList
#
# The main routine
#
if [ "$listOpt" = true ]
then
# list directories, or potential file locations
[ "$nArgs" -le 1 ] || usage
# a silly combination, but -quiet has precedence
[ "$quietOpt" = true ] && exit 0
for dir
do
if [ "$nArgs" -eq 1 ]
then
echo "$dir/$fileName"
else
echo "$dir"
fi
done
exit 0
else
[ "$nArgs" -eq 1 ] || usage
for dir
do
if [ -f "$dir/$fileName" ]
then
[ "$quietOpt" = true ] || echo "$dir/$fileName"
exit 0
fi
done
fi
# general error, eg file not found
exit 2
#------------------------------------------------------------------------------

View file

@ -70,7 +70,7 @@ if [ "$PYTHONPATH" ]; then
else
export PYTHONPATH=$ParaView_DIR/Utilities/VTKPythonWrapping
fi
if [ $WM_ARCH = "darwinPpc" -o $WM_ARCH = "darwinIntel" ]
if [ "$WM_ARCH_BASE" = "darwin" ]
then
export PYTHONPATH=$PYTHONPATH:$ParaView_DIR/bin
fi
@ -79,6 +79,25 @@ if [ -r $ParaView_DIR ]
then
export PATH=$ParaView_DIR/bin:$PATH
export PV_PLUGIN_PATH=$FOAM_LIBBIN
if [ "$WM_ARCH_BASE" == "darwin" ]
then
export PATH=$ParaView_DIR/bin/paraview.app/Contents/MacOS:$PATH
export DYLD_LIBRARY_PATH=$ParaView_DIR/bin:$DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$ParaView_DIR/lib/$ParaView_MAJOR:$DYLD_LIBRARY_PATH
# Move plugins to a separate directory because paraview crashes
# when it tries to load one of the other libraries in $FOAM_LIBBIN as a plugin
export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview
if [ ! -e $PV_PLUGIN_PATH ]
then
echo "Creating $PV_PLUGIN_PATH"
mkdir $PV_PLUGIN_PATH
fi
for i in $(find $FOAM_LIBBIN -depth 1 -name "libPV*")
do
ln -sf $i $PV_PLUGIN_PATH
done
fi
fi
unset cmake paraviewPython

View file

@ -78,6 +78,38 @@ export WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: ${WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION}; export WM_THIRD_PARTY_DIR
# Source files, possibly with some verbosity
_foamSource()
{
while [ $# -ge 1 ]
do
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "Sourcing: $1"
. $1
shift
done
}
# Add in preset user or site preferences:
foamPrefs=`$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh` && _foamSource $foamPrefs
unset foamPrefs
# Evaluate command-line parameters
while [ $# -gt 0 ]
do
case "$1" in
*=)
# name= -> unset name
eval "unset ${1%=}"
;;
*=*)
# name=value -> export name=value
eval "export $1"
;;
esac
shift
done
# Operating System/Platform
# ~~~~~~~~~~~~~~~~~~~~~~~~~
# WM_OSTYPE = POSIX | ????
@ -178,6 +210,9 @@ Linux)
;;
Darwin)
# this makes certain things easier
export WM_ARCH_BASE=darwin
case `uname -p` in
powerpc)
export WM_ARCH=darwinPpc
@ -186,10 +221,49 @@ Darwin)
export WM_ARCH=darwinIntel
;;
*)
echo "This seems to be an Intel-Mac please tell me the output of 'uname -p'. Bernhard."
export WM_ARCH=darwinIntel
echo "This seems to be neither an Intel-Mac nor a PPC-Mac please tell me the output of 'uname -p'. Bernhard."
export WM_ARCH=darwinUnknown
;;
esac
case $WM_ARCH_OPTION in
32)
export WM_CFLAGS='-m32 -fPIC'
export WM_CXXFLAGS='-m32 -fPIC'
export WM_LDFLAGS='-m32'
;;
64)
export WM_ARCH=${WM_ARCH}64
export WM_CFLAGS='-m64 -fPIC'
export WM_CXXFLAGS='-m64 -fPIC'
export WM_LDFLAGS='-m64'
;;
*)
echo Unknown WM_ARCH_OPTION $WM_ARCH_OPTION, should be 32 or 64
;;
esac
# Make sure that binaries use the best features of the used OS-Version
export MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion`
# Use Mac-Ports-Compiler instead of Apple-gcc-4.2
case $WM_COMPILER in
Gcc43)
export WM_CC='gcc-mp-4.3'
export WM_CXX='g++-mp-4.3'
;;
Gcc44)
export WM_CC='gcc-mp-4.4'
export WM_CXX='g++-mp-4.4'
;;
Gcc45)
export WM_CC='gcc-mp-4.5'
export WM_CXX='g++-mp-4.5'
;;
*)
export WM_COMPILER=
;;
esac
;;
SunOS)
@ -222,6 +296,12 @@ cleanEnv=`$cleanProg "$PATH" "$foamOldDirs"` && PATH="$cleanEnv"
#- Clean LD_LIBRARY_PATH
cleanEnv=`$cleanProg "$LD_LIBRARY_PATH" "$foamOldDirs"` && LD_LIBRARY_PATH="$cleanEnv"
#- Clean DYLD_LIBRARY_PATH
if [[ "$WM_ARCH_BASE" == "darwin" ]]
then
cleanEnv=`$cleanProg "$DYLD_LIBRARY_PATH" "$foamOldDirs"` && DYLD_LIBRARY_PATH="$cleanEnv"
fi
#- Clean MANPATH
cleanEnv=`$cleanProg "$MANPATH" "$foamCleanDirs"` && MANPATH="$cleanEnv"
@ -229,16 +309,6 @@ export PATH LD_LIBRARY_PATH MANPATH
# Source project setup files
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource()
{
while [ $# -ge 1 ]
do
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "Sourcing: $1"
. $1
shift
done
}
_foamSource $WM_PROJECT_DIR/etc/settings.sh
_foamSource $WM_PROJECT_DIR/etc/aliases.sh

View file

@ -18,6 +18,7 @@ FoamFile
Documentation
{
// for Macs: docBrowser "open %f";
docBrowser "kde-open %f";
doxyDocDirs
(

View file

@ -72,6 +72,31 @@ setenv WM_PROJECT_USER_DIR $HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
# Source files, possibly with some verbosity
alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; source
# Add in preset user or site preferences:
set foamPrefs=`$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh`
if ( $status == 0 ) then
_foamSource $foamPrefs
endif
unset foamPrefs
# Evaluate command-line parameters
while ( $#argv > 0 )
switch ($argv[1])
case *=:
# name= -> unsetenv name
eval "unsetenv $argv[1]:s/=//"
breaksw
case *=*:
# name=value -> setenv name value
eval "setenv $argv[1]:s/=/ /"
breaksw
endsw
shift
end
# Operating System/Platform
# ~~~~~~~~~~~~~~~~~~~~~~~~~
@ -230,8 +255,6 @@ setenv MANPATH `$cleanProg "$MANPATH" "$foamOldDirs"`
# Source project setup files
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Executing: \!*"; source \!*'
_foamSource $WM_PROJECT_DIR/etc/settings.csh
_foamSource $WM_PROJECT_DIR/etc/aliases.csh

52
etc/prefs.csh-EXAMPLE Normal file
View file

@ -0,0 +1,52 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# File
# etc/prefs.csh
#
# Description
# Preset variables for the OpenFOAM configuration - C-Shell shell syntax.
#
# The prefs.csh file will be sourced by the OpenFOAM etc/cshrc when it is
# found by foamEtcFile.
#
# See Also
# 'foamEtcFile -help' or 'foamEtcFile -list' for information about the
# paths searched
#
#------------------------------------------------------------------------------
## Specify system compiler
## ~~~~~~~~~~~~~~~~~~~~~~~
#set compilerInstall=system
## Specify system openmpi
## ~~~~~~~~~~~~~~~~~~~~~~
#setenv WM_MPLIB SYSTEMOPENMPI
# Specify ParaView version
# ~~~~~~~~~~~~~~~~~~~~~~~~
setenv ParaView_VERSION git # eg, cvs/git version
setenv ParaView_MAJOR 3.7
# ----------------------------------------------------------------- end-of-file

52
etc/prefs.sh-EXAMPLE Normal file
View file

@ -0,0 +1,52 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# File
# etc/prefs.sh
#
# Description
# Preset variables for the OpenFOAM configuration - POSIX shell syntax.
#
# The prefs.sh file will be sourced by the OpenFOAM etc/bashrc when it is
# found by foamEtcFile.
#
# See Also
# 'foamEtcFile -help' or 'foamEtcFile -list' for information about the
# paths searched
#
#------------------------------------------------------------------------------
# Specify system compiler
# ~~~~~~~~~~~~~~~~~~~~~~~
compilerInstall=system
# Specify system openmpi
# ~~~~~~~~~~~~~~~~~~~~~~
export WM_MPLIB=SYSTEMOPENMPI
# Specify ParaView version
# ~~~~~~~~~~~~~~~~~~~~~~~~
export ParaView_VERSION=git # eg, cvs/git version
export ParaView_MAJOR=3.7
# ----------------------------------------------------------------- end-of-file

View file

@ -47,7 +47,7 @@ _foamAddLib()
while [ $# -ge 1 ]
do
export LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH
if [ "$WM_ARCH" == "darwinIntel" ]
if [ "$WM_ARCH_BASE" == "darwin" ]
then
export DYLD_LIBRARY_PATH=$1:$DYLD_LIBRARY_PATH
fi
@ -172,24 +172,15 @@ unset MPI_ARCH_PATH
case "$WM_MPLIB" in
OPENMPI)
if [ "$WM_ARCH" == "darwinIntel" ]
then
mpi_version=openmpi-system
export MPI_HOME=/usr
export MPI_ARCH_PATH=/usr
mpi_version=openmpi-1.4.1
export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS
unset OPAL_PREFIX
else
mpi_version=openmpi-1.4.1
export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS
# Tell OpenMPI where to find its install directory
export OPAL_PREFIX=$MPI_ARCH_PATH
# Tell OpenMPI where to find its install directory
export OPAL_PREFIX=$MPI_ARCH_PATH
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib
fi
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
unset mpi_version
@ -198,9 +189,12 @@ OPENMPI)
SYSTEMOPENMPI)
mpi_version=openmpi-system
# make sure not the "old" mpi is used
export OPAL_PREFIX=
# Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
export PINC=`mpicc --showme:compile`
export PLIBS=`mpicc --showme:link`
export PLIBS="`mpicc --showme:link`"
libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
if [ "$FOAM_VERBOSE" -a "$PS1" ]

View file

@ -56,11 +56,22 @@ string pOpen(const string &cmd, label line=0)
for (label cnt = 0; cnt <= line; cnt++)
{
char buffer[MAX];
char* s = fgets(buffer, MAX-1, cmdPipe);
if (s == NULL)
{
#ifdef darwin
// workaround for the Python-Script
for(int i=0;i<MAX;i++) {
if(buffer[i]=='\n') {
buffer[i]='\0';
}
}
return buffer;
#else
return "";
#endif
}
if (cnt == line)
@ -123,7 +134,8 @@ void printSourceFileAndLine
#ifndef darwin
"addr2line -f --demangle=auto --exe "
#else
"gaddr2line -f --inline --demangle=auto --exe "
// "gaddr2line -f --inline --demangle=auto --exe "
"addr2line4Mac.py "
#endif
+ filename
+ " "
@ -150,38 +162,6 @@ void printSourceFileAndLine
}
}
void getSymbolForRaw
(
Ostream& os,
const string& raw,
const fileName& filename,
const word& address
)
{
if (filename.size() && filename[0] == '/')
{
string fcnt = pOpen
(
#ifndef darwin
"addr2line -f --demangle=auto --exe "
#else
"gaddr2line -f --inline --demangle=auto --exe "
#endif
+ filename
+ " "
+ address
);
if (fcnt != "")
{
os << fcnt.c_str();
return;
}
}
os << "Uninterpreted: " << raw.c_str();
}
#ifdef darwin
// Trying to emulate the original backtrace and backtrace_symbol from the glibc
@ -265,11 +245,11 @@ char **backtrace_symbols(void **bt,unsigned nr)
int result=dladdr(bt[i],&info);
char tmp[1000];
# ifdef darwin
#ifdef darwinIntel64
sprintf(tmp,"%s(%s+%p) [%p]",info.dli_fname,info.dli_sname,(void *)((unsigned long)bt[i]-(unsigned long)info.dli_saddr),bt[i]);
# else
#else
sprintf(tmp,"%s(%s+%p) [%p]",info.dli_fname,info.dli_sname,(void *)((unsigned int)bt[i]-(unsigned int)info.dli_saddr),bt[i]);
# endif
#endif
strings[i]=(char *)malloc(strlen(tmp)+1);
strcpy(strings[i],tmp);
}
@ -279,6 +259,38 @@ char **backtrace_symbols(void **bt,unsigned nr)
#endif
void getSymbolForRaw
(
Ostream& os,
const string& raw,
const fileName& filename,
const word& address
)
{
if (filename.size() && filename[0] == '/')
{
string fcnt = pOpen
(
#ifndef darwin
"addr2line -f --demangle=auto --exe "
#else
// "gaddr2line -f --inline --demangle=auto --exe "
"addr2line4Mac.py "
#endif
+ filename
+ " "
+ address
);
if (fcnt != "")
{
os << fcnt.c_str();
return;
}
}
os << "Uninterpreted: " << raw.c_str();
}
void error::printStack(Ostream& os)
{
// Do not print anything if FOAM_ABORT is not set

View file

@ -269,6 +269,8 @@ Foam::label Foam::autoRefineDriver::surfaceOnlyRefine
const PtrList<featureEdgeMesh> dummyFeatures;
PtrList<featureEdgeMesh> dummy(0);
labelList candidateCells
(
meshRefiner_.refineCandidates
@ -435,6 +437,8 @@ Foam::label Foam::autoRefineDriver::shellRefine
const PtrList<featureEdgeMesh> dummyFeatures;
PtrList<featureEdgeMesh> dummy(0);
labelList candidateCells
(
meshRefiner_.refineCandidates

View file

@ -1,6 +1,7 @@
EXE_INC = \
-I$(WM_THIRD_PARTY_DIR)/scotch_5.1/include \
-I$(WM_THIRD_PARTY_DIR)/scotch_5.1/src/libscotch/lnInclude \
-I$(WM_THIRD_PARTY_DIR)/scotch_5.1/include \
-I/usr/include/scotch \
-I../decompositionMethods/lnInclude

View file

@ -1,15 +0,0 @@
#!/bin/sh
currDir=`pwd`
application=`basename $currDir`
cases="channelParticles"
tutorialPath=`dirname $0`/..
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
for case in $cases
do
(cd $case; cleanCase)
done

View file

@ -1,12 +0,0 @@
#!/bin/sh
currDir=`pwd`
application=`basename $currDir`
case="channelParticles"
tutorialPath=`dirname $0`/..
. $WM_PROJECT_DIR/bin/tools/RunFunctions
(cd $case; runApplication blockMesh)
(cd $case; runApplication $application)

View file

@ -0,0 +1,12 @@
#!/bin/bash
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application from system/controlDict
application=`getApplication`
# make sure the application is compiled
wmake ../$application
runApplication blockMesh
runApplication $application

View file

@ -1,32 +1,22 @@
/*---------------------------------------------------------------------------*\
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object cloudProperties;
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
interpolationSchemes
{
U cellPointFace;
// U cell;
}
dimensions [0 1 -2 0 0 0 0];
value ( 0 -9.81 0 );
// ************************************************************************* //

View file

@ -1,44 +0,0 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object injectorProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
(
{
position (0.01 0.05 0.005);
direction (1 0 0);
startTime 0.2;
endTime 0.8;
nParticles 20;
}
{
position (0.01 0.095 0.005);
direction (1 0 0);
startTime 0;
endTime 1;
nParticles 60;
}
)
// ************************************************************************* //

View file

@ -0,0 +1,108 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object kinematicCloud1Properties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
active yes;
// Particle sub-models
InjectionModel ConeInjection;
DragModel SphereDrag;
DispersionModel none;
PatchInteractionModel StandardWallInteraction;
PostProcessingModel PatchPostProcessing;
// Parcel basis type
parcelBasisType mass;
constantProperties{
rhoMin rhoMin [ 1 -3 0 0 0 ] 1e-15;
// Minimum particle mass
minParticleMass minParticleMass [ 1 0 0 0 0] 1.0e-15;
// Parcel thermo properties
rho0 rho0 [ 1 -3 0 0 0] 5000;
}
// Coupling between particles and carrier phase via source terms
coupled true;
cellValueSourceCorrection on;
// Integer used to identify different parcel types
parcelTypeId 2;
interpolationSchemes
{
rho cell;
U cellPointFace;
mu cell;
}
integrationSchemes
{
U Euler;
}
particleForces
{
gravity on;
virtualMass off;
pressureGradient off;
}
ConeInjectionCoeffs
{
SOI 0.2;
parcelBasisType mass;
duration 0.6;
position (0.01 0.05 0.005);
direction (1 0 0);
parcelsPerSecond 10000;
volumeFlowRate constant 0.01;
Umag constant 5.0;
thetaInner constant 0.0;
thetaOuter constant 30.0;
parcelPDF
{
pdfType RosinRammler;
RosinRammlerPDF
{
minValue 50.0e-06;
maxValue 100.0e-06;
d (75.0e-06);
n (0.5);
}
}
// Total mass to inject
massTotal massTotal [ 1 0 0 0 0] 2.0e-4;
}
StandardWallInteractionCoeffs
{
type rebound;
}
PatchPostProcessingCoeffs
{
maxStoredParcels 10000;
patches (
in
out
);
}
// ************************************************************************* //

View file

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5-dev |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
| \\ / O peration | Version: 1.6-ext |
| \\ / A nd | Web: www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View file

@ -26,5 +26,6 @@ FoamFile
nu nu [0 2 -1 0 0 0 0] 0.01;
rho rho [1 -3 0 0 0 0 0] 0.5;
// ************************************************************************* //

View file

@ -0,0 +1,12 @@
particleNum
{
theTitle "Number of particles";
expr "Current number of parcels + = (%f%)";
titles ( nr);
}
particlesAdded
{
theTitle "Particles added";
expr "Added (%f%) new parcels";
titles ( nr );
}

View file

@ -24,7 +24,7 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoFoam;
application icoLagrangianFoam;
startFrom firstTime;
@ -34,11 +34,11 @@ stopAt endTime;
endTime 1.5;
deltaT 0.005;
deltaT 0.001;
writeControl timeStep;
writeInterval 20;
writeInterval 100;
purgeWrite 0;

View file

@ -0,0 +1,3 @@
icoLagrangianFoam.C
EXE = $(FOAM_USER_APPBIN)/icoLagrangianFoam

View file

@ -0,0 +1,14 @@
EXE_INC = \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-llagrangian \
-llagrangianIntermediate \
-lfiniteVolume \
-lmeshTools \
-lthermophysicalFunctions \
-lradiation \
-llduSolvers

View file

@ -0,0 +1,102 @@
Info<< "Reading transportProperties\n" << endl;
IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
dimensionedScalar nu
(
transportProperties.lookup("nu")
);
Info<< "Reading field p\n" << endl;
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
# include "createPhi.H"
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
dimensionedScalar rhoVal
(
transportProperties.lookup("rho")
);
// dummy-fields to satisfy the requirements of the kinematicCloud
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
rhoVal,
"zeroGradient"
);
volScalarField mu
(
IOobject
(
"mu",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
rhoVal*nu,
"zeroGradient"
);
# include "readGravitationalAcceleration.H"
Info<< "Constructing kinematicCloud" << endl;
basicKinematicCloud kinematicCloud
(
"kinematicCloud",
rho,
U,
mu,
g
);

View file

@ -0,0 +1,122 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright held by original author
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Application
icoFoam
Description
Transient solver for incompressible, laminar flow of Newtonian fluids
.... with particles
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicKinematicCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
# include "createFields.H"
# include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;
# include "readPISOControls.H"
# include "CourantNo.H"
Info<< "Evolving kinematicCloud" << endl;
kinematicCloud.evolve();
kinematicCloud.info();
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(nu, U)
==
kinematicCloud.SU()/rho
);
solve(UEqn == -fvc::grad(p));
// --- PISO loop
for (int corr=0; corr<nCorr; corr++)
{
volScalarField rUA = 1.0/UEqn.A();
U = rUA*UEqn.H();
phi = (fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, U, phi);
adjustPhi(phi, U, p);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::laplacian(rUA, p) == fvc::div(phi)
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
phi -= pEqn.flux();
}
}
# include "continuityErrs.H"
U -= rUA*fvc::grad(p);
U.correctBoundaryConditions();
}
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View file

@ -90,7 +90,7 @@ EXE_DEP = $(OBJECTS_DIR)/options
LIB = libNULL
# Shared library extension
ifeq ($(WM_ARCH),darwin)
ifeq ($(WM_ARCH_BASE),darwin)
# Using Mac OSX
SO = dylib
else
@ -173,8 +173,13 @@ libso: $(LIB).$(SO)
$(LIB).$(SO): $(OBJECTS)
@$(WM_SCRIPTS)/mkObjectDir $(LIB)
@rm -f so_locations
ifeq ($(WM_ARCH_BASE),darwin)
@cd $(OBJECTS_DIR) ; \
$(LINKLIBSO) $(LOCAL_OBJECTS) -L$(LIB_WM_OPTIONS_DIR) $(LIB_LIBS) $(GLIB_LIBS) -install_name $(notdir $(LIB)).$(SO) -o $(LIB).$(SO)
else
@cd $(OBJECTS_DIR) ; \
$(LINKLIBSO) $(LOCAL_OBJECTS) -L$(LIB_WM_OPTIONS_DIR) $(LIB_LIBS) $(GLIB_LIBS) -o $(LIB).$(SO)
endif
lib: $(LIB).a
@echo \'$(LIB).a\' is up to date.

View file

@ -2,8 +2,7 @@
cWARN = -Wall
# cc = gcc
cc = gcc-4.2
cc = gcc $(WM_CXXFLAGS)
include $(RULES)/c$(WM_COMPILE_OPTION)

View file

@ -2,8 +2,7 @@
c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast
# CC = g++
CC = g++-4.2
CC = g++ $(WM_CXXFLAGS)
include $(RULES)/c++$(WM_COMPILE_OPTION)
@ -19,4 +18,5 @@ cpptoo = $(Ctoo)
LINK_LIBS = $(c++DBUG) -lpthread
LINKLIBSO = $(CC) $(c++FLAGS) -lpthread -dynamiclib -undefined dynamic_lookup
LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN) -lOpenFOAM -L$(FOAM_MPI_LIBBIN) -lPstream
# LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN) -lOpenFOAM -L$(FOAM_MPI_LIBBIN) -lPstream
LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_MPI_LIBBIN) -lPstream

View file

@ -1,2 +1,2 @@
c++DBUG = -ggdb3 -DFULLDEBUG
c++DBUG = -ggdb2 -DFULLDEBUG
c++OPT = -O0 -fdefault-inline

View file

@ -0,0 +1,4 @@
c++DBUG =
c++OPT = -O3
#c++OPT = -march=nocona -O3
# -ftree-vectorize -ftree-vectorizer-verbose=3

View file

@ -1,5 +1,5 @@
CPP = cpp-4.2 $(WM_CPP_OPTIONS)
LD = ld
CPP = cpp $(GFLAGS)
LD = ld
PROJECT_LIBS = -l$(WM_PROJECT)

View file

@ -0,0 +1 @@
PFLAGS = -DOMPI_SKIP_MPICXX

View file

@ -0,0 +1 @@
by bgschaid. 2010-10-05

View file

@ -0,0 +1,3 @@
XFLAGS =
XINC = $(XFLAGS) -I/usr/X11R6/include
XLIBS = -L/usr/X11R6/lib -lXext -lX11

View file

@ -0,0 +1,16 @@
.SUFFIXES: .c .h
cWARN = -Wall
cc = gcc $(WM_CXXFLAGS)
include $(RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC -Ddarwin
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
LINK_LIBS = $(cDBUG)
LINKLIBSO = $(cc) -dynamiclib -flat_namespace -undefined suppress
LINKEXE = $(cc) -Xlinker -z -Xlinker nodefs

View file

@ -0,0 +1,22 @@
.SUFFIXES: .C .cxx .cc .cpp
c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast
CC = g++ $(WM_CXXFLAGS)
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-40
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -Ddarwin
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
cxxtoo = $(Ctoo)
cctoo = $(Ctoo)
cpptoo = $(Ctoo)
LINK_LIBS = $(c++DBUG) -lpthread
LINKLIBSO = $(CC) $(c++FLAGS) -lpthread -dynamiclib -undefined dynamic_lookup
# LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN) -lOpenFOAM -L$(FOAM_MPI_LIBBIN) -lPstream
LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_MPI_LIBBIN) -lPstream

View file

@ -0,0 +1,2 @@
c++DBUG = -ggdb2 -DFULLDEBUG
c++OPT = -O0 -fdefault-inline

View file

@ -0,0 +1,4 @@
c++DBUG =
c++OPT = -O3
#c++OPT = -march=nocona -O3
# -ftree-vectorize -ftree-vectorizer-verbose=3

View file

@ -0,0 +1,2 @@
c++DBUG = -pg
c++OPT = -O2

View file

@ -0,0 +1,2 @@
cDBUG = -ggdb -DFULLDEBUG
cOPT = -O1 -fdefault-inline -finline-functions

View file

@ -0,0 +1,2 @@
cDBUG =
cOPT = -O3

View file

@ -0,0 +1,2 @@
cDBUG = -pg
cOPT = -O2

View file

@ -0,0 +1,10 @@
CPP = cpp $(GFLAGS)
LD = ld
PROJECT_LIBS = -l$(WM_PROJECT)
include $(GENERAL_RULES)/standard
include $(RULES)/X
include $(RULES)/c
include $(RULES)/c++

View file

@ -0,0 +1,3 @@
PFLAGS =
PINC =
PLIBS =

View file

@ -0,0 +1,3 @@
PFLAGS = -DOMPI_SKIP_MPICXX
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi

View file

@ -0,0 +1 @@
PFLAGS = -DOMPI_SKIP_MPICXX

View file

@ -1,3 +0,0 @@
c++DBUG =
c++OPT = -O3
# c++OPT = -O3 -ffast-math -fsignaling-nans

View file

@ -2,7 +2,7 @@
cWARN = -Wall
cc = gcc
cc = gcc $(WM_CXXFLAGS)
include $(RULES)/c$(WM_COMPILE_OPTION)

View file

@ -2,7 +2,7 @@
c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast
CC = g++
CC = g++ $(WM_CXXFLAGS)
include $(RULES)/c++$(WM_COMPILE_OPTION)
@ -18,4 +18,5 @@ cpptoo = $(Ctoo)
LINK_LIBS = $(c++DBUG) -lpthread
LINKLIBSO = $(CC) $(c++FLAGS) -lpthread -dynamiclib -undefined dynamic_lookup
LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN) -lOpenFOAM -L$(FOAM_MPI_LIBBIN) -lPstream
# LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN) -lOpenFOAM -L$(FOAM_MPI_LIBBIN) -lPstream
LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_MPI_LIBBIN) -lPstream

View file

@ -1,5 +1,5 @@
CPP = cpp $(WM_CPP_OPTIONS)
LD = ld
CPP = cpp $(GFLAGS)
LD = ld
PROJECT_LIBS = -l$(WM_PROJECT)
@ -8,4 +8,3 @@ include $(GENERAL_RULES)/standard
include $(RULES)/X
include $(RULES)/c
include $(RULES)/c++
include $(GENERAL_RULES)/cint

View file

@ -0,0 +1,2 @@
by bgschaid. 2010-10-06 on Centos 5.5 with gcc 4.1