Merge branch 'bgschaid/foam3Fixes'

This commit is contained in:
Dominik Christ 2014-01-09 15:04:53 +00:00
commit 8d34057e52
15 changed files with 122 additions and 53 deletions

35
.gitignore vendored
View file

@ -21,6 +21,7 @@
*.la *.la
*.so *.so
*.jar *.jar
*.dylib
# derived files # derived files
lex.yy.c lex.yy.c
@ -34,6 +35,9 @@ core
# lnInclude (symlink) folders - anywhere # lnInclude (symlink) folders - anywhere
lnInclude lnInclude
# A hidden file created by the Mac OS X Finder.
.DS_Store
# build folders - anywhere # build folders - anywhere
linux*Gcc*/ linux*Gcc*/
linux*Icc*/ linux*Icc*/
@ -63,6 +67,21 @@ doc/[Dd]oxygen/man
# generated files in the main directory (e.g. ReleaseNotes-?.?.html) # generated files in the main directory (e.g. ReleaseNotes-?.?.html)
/*.html /*.html
# patch residue
*.orig
*.rej
# pyFoam-stuff
PlyParser_FoamFileParser_parsetab.py
# python-compile
*.pyc
# other stuff
.build
.hgignore
.timeStamp
# source packages - anywhere # source packages - anywhere
*.tar.bz2 *.tar.bz2
*.tar.gz *.tar.gz
@ -90,21 +109,7 @@ etc/pref.sh
# make sure that this settings file is not used # make sure that this settings file is not used
etc/bashrc.preset etc/bashrc.preset
# The following files are blacklisted because of a DMCA complaint by ANSYS. #Test-Harness generated stuff
src/lduSolvers/tools/PriorityArray.C
src/lduSolvers/tools/PriorityArray.H
src/lduSolvers/amg/amgPolicy/samgPolicy.C
src/lduSolvers/amg/amgPolicy/samgPolicy.H
src/lduSolvers/amg/amgPolicy/aamgPolicy.C
src/lduSolvers/amg/amgPolicy/aamgPolicy.H
# The following files are blacklisted because of a DMCA complaint by ANSYS.
src/lduSolvers/tools/PriorityArray.C
src/lduSolvers/tools/PriorityArray.H
src/lduSolvers/amg/amgPolicy/samgPolicy.C
src/lduSolvers/amg/amgPolicy/samgPolicy.H
src/lduSolvers/amg/amgPolicy/aamgPolicy.C
src/lduSolvers/amg/amgPolicy/aamgPolicy.H
# The following files are blacklisted because of a DMCA complaint by ANSYS. # The following files are blacklisted because of a DMCA complaint by ANSYS.
src/lduSolvers/tools/PriorityArray.C src/lduSolvers/tools/PriorityArray.C

View file

@ -12,6 +12,9 @@ syntax: glob
*.orig[0-9][0-9] *.orig[0-9][0-9]
\#*\# \#*\#
# file-browser settings - anywhere
.directory
# CVS recovered versions - anywhere # CVS recovered versions - anywhere
.#* .#*
@ -33,10 +36,11 @@ syntax: glob
# A hidden file created by the Mac OS X Finder. # A hidden file created by the Mac OS X Finder.
.DS_Store .DS_Store
# Ignore the build-dirctories # build folders - anywhere
darwinIntel*/
linux*Gcc*/ linux*Gcc*/
linux*Icc*/ linux*Icc*/
darwin*Gcc*/
darwin*Intel*/
linuxming*/ linuxming*/
SiCortex*Gcc*/ SiCortex*Gcc*/
solaris*Gcc*/ solaris*Gcc*/
@ -62,6 +66,9 @@ doc/[Dd]oxygen/html
doc/[Dd]oxygen/latex doc/[Dd]oxygen/latex
doc/[Dd]oxygen/man doc/[Dd]oxygen/man
# generated files in the main directory (e.g. ReleaseNotes-?.?.html)
/*.html
# patch residue # patch residue
*.orig *.orig
*.rej *.rej
@ -74,20 +81,24 @@ PlyParser_FoamFileParser_parsetab.py
# other stuff # other stuff
.build .build
# .gitignore .gitignore
.timeStamp .timeStamp
# source packages - anywhere
*.tar.bz2
*.tar.gz
*.tar
*.tgz
*.gtgz
# ignore - changes to the configuration
etc/prefs.csh
etc/prefs.sh
# make sure that this settings file is not used # make sure that this settings file is not used
etc/bashrc.preset etc/bashrc.preset
#Test-Harness generated stuff #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
# The following files are blacklisted because of a DMCA complaint by ANSYS. # The following files are blacklisted because of a DMCA complaint by ANSYS.
src/lduSolvers/tools/PriorityArray.C src/lduSolvers/tools/PriorityArray.C

View file

@ -50,7 +50,7 @@ echo ========================================
echo echo
# swak4foam # swak4foam
pkg=swak4Foam-0.2.4 pkg=swak4Foam-0.3.0
set -x set -x
rm -rf $WM_THIRD_PARTY_DIR/rpmBuild/BUILD/${pkg}* rm -rf $WM_THIRD_PARTY_DIR/rpmBuild/BUILD/${pkg}*
set +x set +x
@ -62,5 +62,3 @@ echo ========================================
echo echo
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View file

@ -59,6 +59,7 @@ echo ========================================
echo echo
( (
rpm_makeRPMvault
[ "$#" -gt 0 ] && { [ "$#" -gt 0 ] && {
rpm_populateRPMvault "$@" rpm_populateRPMvault "$@"
@ -71,5 +72,3 @@ echo ========================================
echo echo
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View file

@ -55,12 +55,12 @@ echo "Starting ThirdParty AllMake: Stage5 "
echo "========================================" echo "========================================"
echo echo
# swak4Foam - Version 0.2.4 # swak4Foam - Version 0.3.0
# In fact, we are basically tracking the head branch from the Mercurial repository # In fact, we are basically tracking the head branch from the Mercurial repository
# which is also replicated under the Breeder_1.7 section of the Subversion repository # which is also replicated under the Breeder_2.0 section of the Subversion repository
# #
SWAK_RELEASE_VERSION=0.2.4 SWAK_RELEASE_VERSION=0.3.0
if [ -z "$SWAK4FOAM_SYSTEM" ] if [ -z "$SWAK4FOAM_SYSTEM" ]
then then
@ -79,7 +79,7 @@ then
cd ./rpmBuild/BUILD; cd ./rpmBuild/BUILD;
hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam swak4Foam-$SWAK_RELEASE_VERSION; hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam swak4Foam-$SWAK_RELEASE_VERSION;
cd swak4Foam-$SWAK_RELEASE_VERSION; cd swak4Foam-$SWAK_RELEASE_VERSION;
hg checkout version_$SWAK_RELEASE_VERSION hg checkout version_${SWAK_RELEASE_VERSION}_v2.x
) )
else else
echo "Warning: Mercurial/hg is not installed. Switching to an alternate Subversion repository" echo "Warning: Mercurial/hg is not installed. Switching to an alternate Subversion repository"
@ -87,6 +87,8 @@ then
if [ $? -eq 0 ]; if [ $? -eq 0 ];
then then
echo "Using Subversion/svn to download the source code for swak4Foam" echo "Using Subversion/svn to download the source code for swak4Foam"
echo "Error: current Subversion-version does not support foam3. Please install mercurial"
exit -1
(cd ./rpmBuild/BUILD; svn checkout svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_1.7/libraries/swak4Foam swak4Foam-$SWAK_RELEASE_VERSION) (cd ./rpmBuild/BUILD; svn checkout svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_1.7/libraries/swak4Foam swak4Foam-$SWAK_RELEASE_VERSION)
else else
echo "Error: Please install either a Mercurial or Subversion client in order to download the source code for swak4Foam" echo "Error: Please install either a Mercurial or Subversion client in order to download the source code for swak4Foam"
@ -98,7 +100,6 @@ then
# comment out the next two lines # comment out the next two lines
(cd ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION; find . -name files | xargs -n 1 sed -i.old "s/FOAM_USER/FOAM_SITE/g") (cd ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION; find . -name files | xargs -n 1 sed -i.old "s/FOAM_USER/FOAM_SITE/g")
(cd ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION; find . -name options | xargs -n 1 sed -i.old "s/FOAM_USER/FOAM_SITE/g") (cd ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION; find . -name options | xargs -n 1 sed -i.old "s/FOAM_USER/FOAM_SITE/g")
(cd ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION; sed -i.old "s|// #define FOAM_SYMMTENSOR_WORKAROUND|#define FOAM_SYMMTENSOR_WORKAROUND|g" Libraries/swak4FoamParsers/include/swak.H )
# We recompile everything # We recompile everything
(cd ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION; ./Allwclean; ./Allwmake) (cd ./rpmBuild/BUILD/swak4Foam-$SWAK_RELEASE_VERSION; ./Allwclean; ./Allwmake)
@ -118,5 +119,3 @@ echo "========================================"
echo echo
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View file

@ -213,6 +213,22 @@ rpm_install()
--dbpath $buildBase/rpmDB --force --nodeps; --dbpath $buildBase/rpmDB --force --nodeps;
} }
#
# Populate the local RPM vault with comand-line supplied list of RPMs
#
rpm_makeRPMvault()
{
rpmVault=$buildBase/RPMS/$architecture
if [ ! -e $rpmVault ]; then
echo ""
echo "Making directory for RPM-files $rpmVault"
echo ""
mkdir -p $rpmVault
fi
}
# #
# Populate the local RPM vault with comand-line supplied list of RPMs # Populate the local RPM vault with comand-line supplied list of RPMs
# #
@ -224,7 +240,6 @@ rpm_populateRPMvault()
echo "" echo ""
echo " Moving the following RPMs to the local RPM vault: `echo $@`" echo " Moving the following RPMs to the local RPM vault: `echo $@`"
mkdir -p $rpmVault
mv $@ $rpmVault mv $@ $rpmVault
echo "" echo ""

View file

@ -245,6 +245,8 @@ MACPORTOPENMPI)
# include files and libraries. # include files and libraries.
export MPI_ARCH_PATH="${libDir%/*}" export MPI_ARCH_PATH="${libDir%/*}"
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
_foamAddLib $libDir _foamAddLib $libDir
unset libDir unset libDir
;; ;;

View file

@ -1,8 +1,4 @@
EXE_INC = EXE_INC =
LIB_LIBS = \ LIB_LIBS = \
-L$(FOAM_LIBBIN)/dummy \ -L$(FOAM_LIBBIN)/dummy
-L$(FOAM_MPI_LIBBIN) \
-lscotchDecomp \
-lmetisDecomp \
-lparMetisDecomp

View file

@ -376,6 +376,8 @@ Foam::autoPtr<Foam::decompositionMethod> Foam::decompositionMethod::New
const dictionary& decompositionDict const dictionary& decompositionDict
) )
{ {
loadExternalLibraries();
word decompositionMethodTypeName(decompositionDict.lookup("method")); word decompositionMethodTypeName(decompositionDict.lookup("method"));
Info<< "Selecting decompositionMethod " Info<< "Selecting decompositionMethod "
@ -407,6 +409,8 @@ Foam::autoPtr<Foam::decompositionMethod> Foam::decompositionMethod::New
const polyMesh& mesh const polyMesh& mesh
) )
{ {
loadExternalLibraries();
word decompositionMethodTypeName(decompositionDict.lookup("method")); word decompositionMethodTypeName(decompositionDict.lookup("method"));
Info<< "Selecting decompositionMethod " Info<< "Selecting decompositionMethod "
@ -432,6 +436,28 @@ Foam::autoPtr<Foam::decompositionMethod> Foam::decompositionMethod::New
return autoPtr<decompositionMethod>(cstrIter()(decompositionDict, mesh)); return autoPtr<decompositionMethod>(cstrIter()(decompositionDict, mesh));
} }
void Foam::decompositionMethod::loadExternalLibraries()
{
wordList libNames(3);
libNames[0]=word("scotchDecomp");
libNames[1]=word("metisDecomp");
libNames[2]=word("parMetisDecomp");
forAll(libNames,i) {
const word libName("lib"+libNames[i]+".so");
// Info << "Loading " << libName << endl;
bool ok=dlLibraryTable::open(libName);
if(!ok) {
WarningIn("decompositionMethod::loadExternalLibraries()")
<< "Loading of decomposition library " << libName
<< " unsuccesful. Some decomposition methods may not be "
<< " available"
<< endl;
}
}
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

View file

@ -107,6 +107,8 @@ private:
//- Disallow default bitwise assignment //- Disallow default bitwise assignment
void operator=(const decompositionMethod&); void operator=(const decompositionMethod&);
//- load missing libraries to avoid compile-time linking to external dependencies
static void loadExternalLibraries();
public: public:

View file

@ -21,5 +21,4 @@ LIB_LIBS = \
-ltetFiniteElement \ -ltetFiniteElement \
-ltetMotionSolver \ -ltetMotionSolver \
-lfvMotionSolver \ -lfvMotionSolver \
-lRBFMotionSolver \ -lRBFMotionSolver
-lmesquiteMotionSolver

View file

@ -31,6 +31,22 @@ License
Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io) Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
{ {
wordList libNames(1);
libNames[0]=word("mesquiteMotionSolver");
forAll(libNames,i) {
const word libName("lib"+libNames[i]+".so");
bool ok=dlLibraryTable::open(libName);
if(!ok) {
WarningIn("dynamicFvMesh::New(const IOobject& io)")
<< "Loading of dynamic mesh library " << libName
<< " unsuccesful. Some dynamic mesh methods may not be "
<< " available"
<< endl;
}
}
// Enclose the creation of the dynamicMesh to ensure it is // Enclose the creation of the dynamicMesh to ensure it is
// deleted before the dynamicFvMesh is created otherwise the dictionary // deleted before the dynamicFvMesh is created otherwise the dictionary
// is entered in the database twice // is entered in the database twice

View file

@ -2,7 +2,7 @@
# vi: set ft=ruby : # vi: set ft=ruby :
Vagrant.configure("2") do |config| Vagrant.configure("2") do |config|
config.vm.synced_folder "..", "/OpenFOAM-sources" config.vm.synced_folder "..", "/FOAM-sources"
config.vm.provider :virtualbox do |vb| config.vm.provider :virtualbox do |vb|
# # Don't boot with headless mode # # Don't boot with headless mode

View file

@ -15,15 +15,15 @@ do
fi fi
done done
OFDIR=/home/vagrant/OpenFOAM/ OFDIR=/home/vagrant/foam/
mkdir -vp $OFDIR mkdir -vp $OFDIR
chown -R vagrant:vagrant $OFDIR chown -R vagrant:vagrant $OFDIR
OFClone=$OFDIR/OpenFOAM-1.6-ext OFClone=$OFDIR/foam-extend-3.0
OFReference=$OFDIR/OpenFOAM-1.6-ext-parent OFReference=$OFClone-parent
OFParent=/OpenFOAM-sources OFParent=/FOAM-sources
if [ ! -e $OFClone ] if [ ! -e $OFClone ]
then then

View file

@ -31,6 +31,7 @@ apt-get -y install g++
apt-get -y install make apt-get -y install make
#apt-get -y install python-dev #apt-get -y install python-dev
apt-get -y install ccache apt-get -y install ccache
apt-get -y install cmake
# test scripts with different shells # test scripts with different shells
apt-get -y install csh apt-get -y install csh