The OpenFOAM (Open Field Operation and Manipulation) CFD Toolbox can simulate

anything from complex fluid flows involving chemical reactions, turbulence and
heat transfer, to solid dynamics, electromagnetics and the pricing of financial
options.

WWW: http://www.opencfd.co.uk/openfoam/index.html

PR:		ports/91886
Submitted by:	thierry
This commit is contained in:
Thierry Thomas 2006-01-22 10:13:06 +00:00
parent 44855e0b04
commit 2018594562
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=154148
41 changed files with 9979 additions and 0 deletions

View File

@ -49,6 +49,7 @@
SUBDIR += oases
SUBDIR += omnetpp
SUBDIR += openbabel
SUBDIR += openfoam
SUBDIR += ovt
SUBDIR += p5-Chemistry-Elements
SUBDIR += paraview

197
science/openfoam/Makefile Normal file
View File

@ -0,0 +1,197 @@
# New ports collection makefile for: OpenFOAM
# Date created: Sat 17 dec 2005
# Whom: thierry@pompo.net
#
# $FreeBSD$
#
PORTNAME= ${REALNAME:L}
PORTVERSION= 1.2
CATEGORIES= science math
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= foam
DISTNAME= ${REALNAME}-${PORTVERSION}.General
EXTRACT_SUFX= .gtgz
MAINTAINER= thierry@FreeBSD.org
COMMENT= Open Field Operation and Manipulation - CFD Simulation Toolbox
BUILD_DEPENDS= micod:${PORTSDIR}/devel/mico \
cmake:${PORTSDIR}/devel/cmake \
${X11BASE}/lib/libode.a:${PORTSDIR}/devel/ode \
${PARAVIEW_LIB}/ParaViewConfig.cmake:${PORTSDIR}/science/paraview \
${LOCALBASE}/share/java/java3d/jar/j3dutils.jar:${PORTSDIR}/java/java3d \
${LOCALBASE}/include/vtk/vtkDataSetSource.h:${PORTSDIR}/math/vtk-headers
RUN_DEPENDS= micod:${PORTSDIR}/devel/mico \
dx:${PORTSDIR}/graphics/opendx \
${LOCALBASE}/share/java/java3d/jar/j3dutils.jar:${PORTSDIR}/java/java3d \
paraview:${PORTSDIR}/science/paraview
.if !defined(NOPORTDOCS)
BUILD_DEPENDS+= doxygen:${PORTSDIR}/devel/doxygen \
dot:${PORTSDIR}/graphics/graphviz
.endif
USE_GCC= 3.4+
USE_JAVA= 1.4+
USE_GL= yes
REINPLACE_ARGS= -i ""
WRKSRC= ${WRKDIR}/${REALNAME}-${PORTVERSION}
PKGMESSAGE= ${WRKDIR}/pkg-message
SUB_FILES= pkg-message
SUB_LIST= REALNAME=${REALNAME} VER=${PORTVERSION}
PLIST_SUB= ${SUB_LIST}
#MAKE_SHELL= ${CSH}
MAKE_ENV= WM_PROJECT_DIR=${BUILD_WRKSRC} WM_ARCH=${OPSYS} \
WM_PROJECT_INST_DIR=${PREFIX}/${REALNAME} WM_COMPILER="" \
WM_COMPILER_ARCH=${ARCH} WM_COMPILER_LIB_ARCH=${ARCH} \
WM_PROJECT_VERSION=${PORTVERSION} WM_PROJECT=${REALNAME} \
LD_LIBRARY_PATH="" WM_JAVAC_OPTION=Opt WM_COMPILE_OPTION=Opt \
WM_PROJECT_USER_DIR=${HOME}/${REALNAME} \
MICO_VERSION=${MICO_VER} MICO_ARCH_PATH=${LOCALBASE}
CSH= /bin/csh
REALNAME= OpenFOAM
PARAVIEW_VER= 2.4.1
PARAVIEW_LIB= ${LOCALBASE}/lib/paraview-${PARAVIEW_VER:R}
GCC_VER= ${_GCCVERSION:S/0/-/:S/0/./g}
BATCHRC= .bashrc .cshrc
SHELLRC= bashrc cshrc
DIR2CLEAN= .${REALNAME}-${PORTVERSION} bin wmake applications
DIR2INST= .${REALNAME}-${PORTVERSION} bin lib wmake
APP2INST= solvers test utilities
ZLIB2FIX= std/std_zfstream.H c++2/zfstream2.H
THRD2FIX= c++ mplibLAM
VER2FIX= applications/utilities/mesh/manipulation/patchTool/C++/PatchToolServer/Make/omniOptions \
applications/utilities/mesh/manipulation/patchTool/C++/FoamXServer/Make/omniOptions \
applications/utilities/preProcessing/FoamX/C++/FoamXLib/Make/omniOptions
GL2FIX= applications/utilities/miscellaneous/foamDebugSwitches/Make/options
PARARC= bashrc cshrc
PS2FIX= runFoamXHB patchTool foamJob killFoamX foamEndJob
DIR2PRUNE= applications/utilities/mesh/manipulation/setSet/readline-5.0/platforms
DOCS= README ReleaseNotes-${PORTVERSION} doc/Guides-a4 doc/Guides-usletter
.if defined(WITH_LAM)
BUILD_DEPENDS+= ${LOCALBASE}/bin/mpicc:${PORTSDIR}/net/lam7
RUN_DEPENDS+= ${LOCALBASE}/bin/mpirun:${PORTSDIR}/net/lam7
MAKE_ENV+= WM_MPLIB=LAM LAM_ARCH_PATH=${LOCALBASE}
MPICH_VER= 1.2.6
LAM_VER= `${GREP} LAM_VERSION ${LOCALBASE}/include/lam_config.h | ${AWK} '{print $$3}'`
MPI_LIB= LAM
PLIST_SUB+= MPI="@comment " LAM="" LAM_VER=7.1.1
IGNORE= does not run with lam7 at the moment
.else
BUILD_DEPENDS+= ${LOCALBASE}/mpich/bin/mpicc:${PORTSDIR}/net/mpich
RUN_DEPENDS+= ${LOCALBASE}/mpich/bin/mpirun:${PORTSDIR}/net/mpich
MAKE_ENV+= WM_MPLIB=MPICH MPICH_ARCH_PATH=${LOCALBASE}/mpich
MPICH_VER= `${LOCALBASE}/mpich/bin/mpichversion | ${HEAD} -1 | ${AWK} '{print $$3}'`
LAM_VER= 7.1.1
MPI_LIB= MPICH
PLIST_SUB+= MPI="" LAM="@comment " MPICH_VER=1.2.6
.endif
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500000
BROKEN= Does not compile with gcc-2.95
.endif
.if exists(${LOCALBASE}/bin/mico-config)
MICO_VER= `${LOCALBASE}/bin/mico-config --version`
.else
MICO_VER= 2.3.11
.endif
OSVERMAJ= ${OSREL:R}
post-extract:
${CP} -Rp ${WRKSRC}/wmake/rules/linux ${WRKSRC}/wmake/rules/${OPSYS}
${RM} ${WRKSRC}/wmake/rules/${OPSYS}/dirToString
pre-configure:
${FIND} ${DIR2CLEAN:S|^|${WRKSRC}/|} -name "*.orig" -delete
${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|" \
-e "s|#!/bin/bash|#!${LOCALBASE}/bin/bash|" \
-e "s|%%MPILIB%%|${MPI_LIB}|" \
${SHELLRC:S|^|${WRKSRC}/.${REALNAME}-${PORTVERSION}/|}
${REINPLACE_CMD} -e "s|%%JAVA_HOME%%|${JAVA_HOME}|" \
-e "s|^#!/bin/bash|#! ${LOCALBASE}/bin/bash|" \
-e "s|gcc-3.4.3|gcc${GCC_VER}|" \
-e "s|2\.3\.11|${MICO_VER}|" \
-e "s|\$$MICO_PATH/platforms/\$$WM_OPTIONS|${LOCALBASE}|" \
-e "s|1\.2\.4|${MPICH_VER}|" \
-e "s|\$$MPICH_PATH/platforms/\$$WM_OPTIONS|${LOCALBASE}/mpich|"\
-e "s|7\.1\.1|${LAM_VER}|" \
-e "s|\$$LAMHOME/platforms/\$$WM_OPTIONS|${LOCALBASE}|" \
-e "s|^SOURCE |source |" \
${BATCHRC:S|^|${WRKSRC}/|}
${REINPLACE_CMD} -e "s|-lGL|-L${X11BASE}/lib -lGL|" \
${GL2FIX:S|^|${WRKSRC}/|}
.for f in ${THRD2FIX}
${REINPLACE_CMD} -e "s|-pthread|${PTHREAD_LIBS}|" \
-e "s|-lpthread|${PTHREAD_LIBS}|" \
${WRKSRC}/wmake/rules/${OPSYS}/${f}
.endfor
.for f in ${ZLIB2FIX}
# Use system zlib
${REINPLACE_CMD} -e 's|"zlib.h"|<zlib.h>|' \
${WRKSRC}/src/OpenFOAM/db/IOstreams/zfstream/${f}
.endfor
${REINPLACE_CMD} -e "s|/usr/X11R6|${X11BASE}|" \
${WRKSRC}/wmake/rules/${OPSYS}/X
.for f in ${VER2FIX}
${REINPLACE_CMD} -e "s|%%ARCH%%|${ARCH}|" \
-e "s|%%OSVERMAJ%%|${OSVERMAJ}|" \
-e "s|-lpthread|${PTHREAD_LIBS}|" \
${WRKSRC}/${f}
.endfor
.for f in ${PS2FIX}
${REINPLACE_CMD} -e "s|ps -u|ps -U|" ${WRKSRC}/bin/${f}
.endfor
.for f in ${PARARC}
${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|" \
-e "s|#!/bin/bash|#!${LOCALBASE}/bin/bash|" \
-e "s|2.2.0|${PARAVIEW_VER}|" \
-e "s|paraview-2.2|paraview-${PARAVIEW_VER:R}|" \
${WRKSRC}/.${REALNAME}-${PORTVERSION}/apps/paraview/${f}
.endfor
do-build:
(cd ${BUILD_WRKSRC}; \
${SETENV} ${MAKE_ENV} ./Allwmake)
.if !defined(NOPORTDOCS)
post-build:
@${ECHO_MSG} "===> Building documentation."
(cd ${BUILD_WRKSRC}; \
${SETENV} ${MAKE_ENV} ./Allwmake doc)
.endif
do-install:
${MKDIR} ${PREFIX}/${REALNAME}/applications
${CP} -R ${BATCHRC:S|^|${WRKSRC}/|} ${PREFIX}/${REALNAME}
${CP} -R ${DIR2INST:S|^|${WRKSRC}/|} ${PREFIX}/${REALNAME}
${CP} -R ${APP2INST:S|^|${WRKSRC}/applications/|} ${PREFIX}/${REALNAME}/applications
${FIND} ${PREFIX}/${REALNAME}/applications -type d \
\( -name ${OPSYS}Opt -o -name linuxDebug -o -name linuxOpt \) \
-exec ${RM} -rf {} \; 2>/dev/null || ${TRUE}
${MKDIR} ${PREFIX}/${REALNAME}/applications/bin/${OPSYS}Opt
cd ${WRKSRC}/applications/bin/${OPSYS}Opt \
&& ${FIND} . -type f -exec ${INSTALL_PROGRAM} {} \
${PREFIX}/${REALNAME}/applications/bin/${OPSYS}Opt/{} \;
@${RMDIR} ${DIR2PRUNE:S|^|${PREFIX}/${REALNAME}/|}
.if !defined(NOPORTDOCS)
${CP} -R ${DOCS:S|^|${WRKSRC}/|} ${PREFIX}/${REALNAME}
${CP} -R ${WRKSRC}/tutorials ${PREFIX}/${REALNAME}
.endif
post-install:
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
.include <bsd.port.post.mk>

View File

@ -0,0 +1,3 @@
MD5 (OpenFOAM-1.2.General.gtgz) = 3308d0606bb46271fbd0dd4869817051
SHA256 (OpenFOAM-1.2.General.gtgz) = 9861fe79ed3a7acf09b74a9083ab6b0fec6edd6dbf85a3d44413c0c94ad97020
SIZE (OpenFOAM-1.2.General.gtgz) = 69607839

View File

@ -0,0 +1,29 @@
--- ./.OpenFOAM-1.2/apps/paraview/bashrc.orig Thu Jun 30 17:31:42 2005
+++ ./.OpenFOAM-1.2/apps/paraview/bashrc Thu Dec 22 23:44:29 2005
@@ -38,24 +38,15 @@
fi
fi
-export CMAKE_HOME=$WM_PROJECT_INST_DIR/$WM_ARCH/cmake-2.0.3
+export CMAKE_HOME=/usr/local
-if [ -r $CMAKE_HOME ]; then
- export PATH=$PATH:$CMAKE_HOME/bin
-fi
-
-#export ParaView_VERSION=1.8.5
export ParaView_VERSION=2.2.0
-export ParaView_INST_DIR=$WM_PROJECT_INST_DIR/$WM_ARCH/paraview-$ParaView_VERSION
-#export ParaView_DIR=$ParaView_INST_DIR/lib/paraview-1.8
+export ParaView_INST_DIR=/usr/local
export ParaView_DIR=$ParaView_INST_DIR/lib/paraview-2.2
if [ -r $ParaView_INST_DIR ]; then
export PV_INTERFACE_PATH=$FOAM_UTILITIES/postProcessing/graphics/PVFoamReader/PVFoamReader/Make
-
- export PATH=$PATH:$ParaView_INST_DIR/bin
- export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${ParaView_INST_DIR}/lib:${ParaView_INST_DIR}/lib/vtk
fi
if [ -r $ParaView_DIR ]; then

View File

@ -0,0 +1,29 @@
--- ./.OpenFOAM-1.2/apps/paraview/cshrc.orig Thu Aug 18 11:10:08 2005
+++ ./.OpenFOAM-1.2/apps/paraview/cshrc Thu Dec 22 23:44:08 2005
@@ -38,24 +38,15 @@
endif
endif
-setenv CMAKE_HOME $WM_PROJECT_INST_DIR/$WM_ARCH/cmake-2.0.3
+setenv CMAKE_HOME /usr/local
-if ( -r $CMAKE_HOME ) then
- set path=($path $CMAKE_HOME/bin )
-endif
-
-#setenv ParaView_VERSION 1.8.5
setenv ParaView_VERSION 2.2.0
-setenv ParaView_INST_DIR $WM_PROJECT_INST_DIR/$WM_ARCH/paraview-$ParaView_VERSION
-#setenv ParaView_DIR $ParaView_INST_DIR/lib/paraview-1.8
+setenv ParaView_INST_DIR /usr/local
setenv ParaView_DIR $ParaView_INST_DIR/lib/paraview-2.2
if ( -r $ParaView_INST_DIR ) then
setenv PV_INTERFACE_PATH $FOAM_UTILITIES/postProcessing/graphics/PVFoamReader/PVFoamReader/Make
-
- set path=($path $ParaView_INST_DIR/bin )
- setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${ParaView_INST_DIR}/lib:${ParaView_INST_DIR}/lib/vtk
endif
if ( -r $ParaView_DIR ) then

View File

@ -0,0 +1,57 @@
--- .OpenFOAM-1.2/bashrc.orig Fri Aug 12 18:59:28 2005
+++ .OpenFOAM-1.2/bashrc Mon Dec 26 12:23:12 2005
@@ -41,15 +41,15 @@
#
# Location of FOAM installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-export WM_PROJECT_INST_DIR=$HOME/$WM_PROJECT
+#export WM_PROJECT_INST_DIR=$HOME/$WM_PROJECT
#export WM_PROJECT_INST_DIR=~$WM_PROJECT
#export WM_PROJECT_INST_DIR=$HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION
-#export WM_PROJECT_INST_DIR=/usr/local/$WM_PROJECT
+export WM_PROJECT_INST_DIR=/usr/local/$WM_PROJECT
# Check that the installation directory has been set and exists
if [ "$WM_PROJECT_INST_DIR" -a -d $WM_PROJECT_INST_DIR ]; then
-export WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
+export WM_PROJECT_DIR=$WM_PROJECT_INST_DIR
# Location of users FOAM files
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -58,7 +58,8 @@
# Compiler (if set to "" use the system compiler)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-export WM_COMPILER=Gcc
+#export WM_COMPILER=Gcc
+export WM_COMPILER=
export WM_COMPILER_ARCH=
export WM_COMPILER_LIB_ARCH=
@@ -66,7 +67,7 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export WM_COMPILE_OPTION=Opt
#export WM_COMPILE_OPTION=Debug
-#setenv WM_COMPILE_OPTION Prof
+#export WM_COMPILE_OPTION=Prof
export WM_JAVAC_OPTION=Opt
#export WM_JAVAC_OPTION=Debug
@@ -120,6 +121,16 @@
#export WM_MPLIB=
export WM_MPLIB=LAM
#export WM_MPLIB=MPI
+
+# FreeBSD workstation
+# ~~~~~~~~~~~~~~~~~~~
+elif [ "$machineTest" = "FreeBSD" ]; then
+
+ export WM_ARCH=FreeBSD
+ export WM_MPLIB=%%MPILIB%%
+ #export WM_MPLIB=LAM
+ #export WM_MPLIB=MPI
+
# SUN workstation
# ~~~~~~~~~~~~~~~

View File

@ -0,0 +1,50 @@
--- .OpenFOAM-1.2/cshrc.orig Thu Aug 18 11:08:22 2005
+++ .OpenFOAM-1.2/cshrc Mon Dec 26 12:12:11 2005
@@ -41,16 +41,16 @@
#
# Location of FOAM installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-setenv WM_PROJECT_INST_DIR $HOME/$WM_PROJECT
+#setenv WM_PROJECT_INST_DIR $HOME/$WM_PROJECT
#setenv WM_PROJECT_INST_DIR ~$WM_PROJECT
#setenv WM_PROJECT_INST_DIR $HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION
-#setenv WM_PROJECT_INST_DIR /usr/local/$WM_PROJECT
+setenv WM_PROJECT_INST_DIR /usr/local/$WM_PROJECT
# Check that the installation directory has been set and exists
if ( $?WM_PROJECT_INST_DIR ) then
if ( -d $WM_PROJECT_INST_DIR ) then
-setenv WM_PROJECT_DIR $WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
+setenv WM_PROJECT_DIR $WM_PROJECT_INST_DIR
# Location of users FOAM files
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -59,7 +59,8 @@
# Compiler (if set to "" use the system compiler)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-setenv WM_COMPILER Gcc
+#setenv WM_COMPILER Gcc
+setenv WM_COMPILER
setenv WM_COMPILER_ARCH
setenv WM_COMPILER_LIB_ARCH
@@ -119,7 +120,16 @@
endif
#setenv WM_MPLIB
- setenv WM_MPLIB LAM
+ #setenv WM_MPLIB LAM
+ #setenv WM_MPLIB MPI
+
+# FreeBSD workstation
+# ~~~~~~~~~~~~~~~~~~~
+else if ($machineTest == FreeBSD) then
+
+ setenv WM_ARCH FreeBSD
+ setenv WM_MPLIB %%MPILIB%%
+ #setenv WM_MPLIB LAM
#setenv WM_MPLIB MPI
# SUN workstation

View File

@ -0,0 +1,15 @@
--- .bashrc.orig Mon Aug 1 18:41:21 2005
+++ .bashrc Fri Dec 30 18:36:45 2005
@@ -135,6 +135,12 @@
export JAVA_HOME=/usr/java/j2sdk1.4.2
fi
+# FreeBSD workstation
+# ~~~~~~~~~~~~~~~~~~~
+elif [ "$machineTest" = "FreeBSD" ]; then
+
+ export JAVA_HOME=%%JAVA_HOME%%
+
# SUN workstation
# ~~~~~~~~~~~~~~~
elif [ "$machineTest" = "SunOS" ]; then

View File

@ -0,0 +1,24 @@
--- .cshrc.orig Mon Aug 1 18:41:43 2005
+++ .cshrc Fri Dec 30 18:35:49 2005
@@ -130,6 +130,12 @@
setenv JAVA_HOME /usr/java/j2sdk1.4.2
endif
+# FreeBSD workstation
+# ~~~~~~~~~~~~~~~~~~~
+else if ($machineTest == FreeBSD) then
+
+ setenv JAVA_HOME %%JAVA_HOME%%
+
# SUN workstation
# ~~~~~~~~~~~~~~~
else if ($machineTest == SunOS) then
@@ -202,7 +208,7 @@
AddLib $MPICH_ARCH_PATH/lib
AddPath $MPICH_ARCH_PATH/bin
- setenv FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpich-$MPICH_VERSION
+ setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpich-$MPICH_VERSION
AddLib $FOAM_MPI_LIBBIN
else if ($WM_MPLIB == LAM) then

View File

@ -0,0 +1,20 @@
--- Allwmake.orig Wed Jan 5 16:00:46 2005
+++ Allwmake Sat Dec 17 23:42:15 2005
@@ -1,4 +1,6 @@
-#!/bin/sh
+#! /bin/csh -f
+
+source .cshrc
(cd wmake ; ./makeWmake)
@@ -6,7 +8,6 @@
(cd applications ; ./Allwmake)
-if [ $# = 1 -a "$1" = "doc" ]
-then
+if ($# == 1 && "$1" == "doc") then
(cd doc ; ./Allwmake)
-fi
+endif

View File

@ -0,0 +1,12 @@
--- applications/utilities/mesh/manipulation/patchTool/C++/Allwmake.orig Thu Dec 11 20:50:07 2003
+++ applications/utilities/mesh/manipulation/patchTool/C++/Allwmake Fri Dec 23 19:43:34 2005
@@ -3,6 +3,9 @@
linux*)
CMD="wmake libso"
;;
+ FreeBSD*)
+ CMD="wmake libso"
+ ;;
*)
CMD="wmake lib"
esac

View File

@ -0,0 +1,13 @@
--- applications/utilities/mesh/manipulation/patchTool/C++/FoamXServer/Make/omniOptions.orig Wed Aug 27 18:11:43 2003
+++ applications/utilities/mesh/manipulation/patchTool/C++/FoamXServer/Make/omniOptions Mon Dec 19 10:37:06 2005
@@ -4,6 +4,10 @@
OMNI_SYS_INC = -D__x86__ -D__linux__ -D__OSVERSION__=2
+#elif defined(FreeBSD)
+
+ OMNI_SYS_INC = -D__%%ARCH%%__ -D__FreeBSD__ -D__OSVERSION__=%%OSVERMAJ%%
+
#elif defined(solaris)
OMNI_SYS_INC = -D__sparc__ -D__sunos__ -D__OSVERSION__=5

View File

@ -0,0 +1,30 @@
--- applications/utilities/mesh/manipulation/patchTool/C++/FoamXServer/Make/orbOptions.orig Wed Aug 27 18:11:43 2003
+++ applications/utilities/mesh/manipulation/patchTool/C++/FoamXServer/Make/orbOptions Wed Dec 21 23:09:37 2005
@@ -3,6 +3,11 @@
ORB_SYS_INC =
ORB_SYS_LIB = -ldl
+#elif defined(FreeBSD)
+
+ ORB_SYS_INC =
+ ORB_SYS_LIB =
+
#elif defined(solaris)
ORB_SYS_INC =
@@ -31,13 +36,11 @@
ORB_INC = \
- -I$(MICO_ARCH_PATH)/include \
+ `mico-config --cxxflags` \
$(ORB_SYS_INC)
ORB_LIBS = \
- -L$(MICO_ARCH_PATH)/lib \
- -lmicocoss$(MICO_VERSION) \
- -lmico$(MICO_VERSION) \
+ `mico-config --cosslibs` \
$(ORB_SYS_LIB)
/*

View File

@ -0,0 +1,13 @@
--- applications/utilities/mesh/manipulation/patchTool/C++/PatchToolServer/Make/omniOptions.orig Thu Aug 28 10:37:04 2003
+++ applications/utilities/mesh/manipulation/patchTool/C++/PatchToolServer/Make/omniOptions Mon Dec 19 10:21:25 2005
@@ -4,6 +4,10 @@
OMNI_SYS_INC = -D__x86__ -D__linux__ -D__OSVERSION__=2
+#elif defined(FreeBSD)
+
+ OMNI_SYS_INC = -D__%%ARCH%%__ -D__FreeBSD__ -D__OSVERSION__=%%OSVERMAJ%%
+
#elif defined(solaris)
OMNI_SYS_INC = -D__sparc__ -D__sunos__ -D__OSVERSION__=5

View File

@ -0,0 +1,30 @@
--- ./applications/utilities/mesh/manipulation/patchTool/C++/PatchToolServer/Make/orbOptions.orig Thu Aug 28 10:37:05 2003
+++ ./applications/utilities/mesh/manipulation/patchTool/C++/PatchToolServer/Make/orbOptions Wed Dec 21 19:09:41 2005
@@ -3,6 +3,11 @@
ORB_SYS_INC =
ORB_SYS_LIB = -ldl
+#elif defined(FreeBSD)
+
+ ORB_SYS_INC =
+ ORB_SYS_LIB =
+
#elif defined(solaris)
ORB_SYS_INC =
@@ -31,13 +36,11 @@
ORB_INC = \
- -I$(MICO_ARCH_PATH)/include \
+ `mico-config --cxxflags` \
$(ORB_SYS_INC)
ORB_LIBS = \
- -L$(MICO_ARCH_PATH)/lib \
- -lmicocoss$(MICO_VERSION) \
- -lmico$(MICO_VERSION) \
+ `mico-config --cosslibs` \
$(ORB_SYS_LIB)
/*

View File

@ -0,0 +1,20 @@
--- applications/utilities/miscellaneous/foamFlex/config.h.orig Mon Dec 2 18:16:12 2002
+++ applications/utilities/miscellaneous/foamFlex/config.h Sun Dec 18 14:37:39 2005
@@ -11,7 +11,7 @@
#define STDC_HEADERS 1
/* Define if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H 1
+#undef HAVE_MALLOC_H
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
@@ -20,7 +20,7 @@
#define HAVE_SYS_TYPES_H 1
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-#define HAVE_ALLOCA_H 1
+#undef HAVE_ALLOCA_H
/* Define if platform-specific command line handling is necessary. */
/* #undef NEED_ARGV_FIXUP */

View File

@ -0,0 +1,11 @@
--- ./applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamData.h.orig Wed Jun 22 14:33:47 2005
+++ ./applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamData.h Tue Jan 3 18:43:11 2006
@@ -37,7 +37,7 @@
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-#include "vtkDataSetSource.h"
+#include <vtk/vtkDataSetSource.h>
/*---------------------------------------------------------------------------*\
Class vtkFoamData Declaration

View File

@ -0,0 +1,11 @@
--- applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamReader.h.orig Mon Jul 4 12:34:01 2005
+++ applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamReader.h Sat Dec 24 17:59:14 2005
@@ -37,7 +37,7 @@
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-#include "vtkDataSetSource.h"
+#include <vtk/vtkDataSetSource.h>
#include "vtkFoamData.h"
// * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * //

View File

@ -0,0 +1,21 @@
--- applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoam.C.orig Tue Aug 9 16:34:44 2005
+++ applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoam.C Sat Dec 24 18:06:03 2005
@@ -36,12 +36,12 @@
#include "volPointInterpolation.H"
#include "vtkFoamReader.h"
-#include "vtkDataArraySelection.h"
-#include "vtkUnstructuredGrid.h"
-#include "vtkPointData.h"
-#include "vtkCellData.h"
-#include "vtkFloatArray.h"
-#include "vtkCharArray.h"
+#include <vtk/vtkDataArraySelection.h>
+#include <vtk/vtkUnstructuredGrid.h>
+#include <vtk/vtkPointData.h>
+#include <vtk/vtkCellData.h>
+#include <vtk/vtkFloatArray.h>
+#include <vtk/vtkCharArray.h>
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -0,0 +1,13 @@
--- applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamAddInternalMesh.C.orig Wed Jun 22 14:33:48 2005
+++ applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamAddInternalMesh.C Thu Jan 5 00:20:12 2006
@@ -30,8 +30,8 @@
#include "fvMesh.H"
#include "cellModeller.H"
-#include "vtkUnstructuredGrid.h"
-#include "vtkCellArray.h"
+#include <vtk/vtkUnstructuredGrid.h>
+#include <vtk/vtkCellArray.h>
#include "vtkFoamInsertNextPoint.H"

View File

@ -0,0 +1,13 @@
--- applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamAddPatch.C.orig Wed Jun 22 14:33:48 2005
+++ applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamAddPatch.C Fri Jan 6 12:29:38 2006
@@ -29,8 +29,8 @@
#include "vtkFoam.H"
#include "polyPatch.H"
-#include "vtkUnstructuredGrid.h"
-#include "vtkCellArray.h"
+#include <vtk/vtkUnstructuredGrid.h>
+#include <vtk/vtkCellArray.h>
#include "vtkFoamInsertNextPoint.H"

View File

@ -0,0 +1,12 @@
--- applications/utilities/preProcessing/FoamX/C++/Allwmake.orig Mon Sep 20 16:52:26 2004
+++ applications/utilities/preProcessing/FoamX/C++/Allwmake Thu Dec 22 23:54:04 2005
@@ -3,6 +3,9 @@
linux*)
CMD="wmake libso"
;;
+ FreeBSD*)
+ CMD="wmake libso"
+ ;;
*)
CMD="wmake lib"
esac

View File

@ -0,0 +1,14 @@
--- applications/utilities/preProcessing/FoamX/C++/FoamXLib/ITypeDescriptorImpl.C.orig Wed Aug 17 11:35:37 2005
+++ applications/utilities/preProcessing/FoamX/C++/FoamXLib/ITypeDescriptorImpl.C Sat Dec 24 18:36:45 2005
@@ -39,6 +39,11 @@
// Namespaces
#include "FoamXNameSpaces.H"
+#if (__FreeBSD__)
+# include <sys/types.h>
+ typedef unsigned long ulong;
+#endif
+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
FoamX::ITypeDescriptorImpl::ITypeDescriptorImpl

View File

@ -0,0 +1,13 @@
--- applications/utilities/preProcessing/FoamX/C++/FoamXLib/Make/omniOptions.orig Mon Jan 17 16:46:05 2005
+++ applications/utilities/preProcessing/FoamX/C++/FoamXLib/Make/omniOptions Mon Dec 19 10:42:46 2005
@@ -4,6 +4,10 @@
OMNI_SYS_INC = -D__x86__ -D__linux__ -D__OSVERSION__=2
+#elif defined(FreeBSD)
+
+ OMNI_SYS_INC = -D__%%ARCH%%__ -D__FreeBSD__ -D__OSVERSION__=%%OSVERMAJ%%
+
#elif defined(solaris)
OMNI_SYS_INC = -D__sparc__ -D__sunos__ -D__OSVERSION__=5

View File

@ -0,0 +1,30 @@
--- ./applications/utilities/preProcessing/FoamX/C++/FoamXLib/Make/orbOptions.orig Mon Jan 17 16:46:05 2005
+++ ./applications/utilities/preProcessing/FoamX/C++/FoamXLib/Make/orbOptions Wed Dec 21 19:11:49 2005
@@ -3,6 +3,11 @@
ORB_SYS_INC =
ORB_SYS_LIB = -ldl
+#elif defined(FreeBSD)
+
+ ORB_SYS_INC =
+ ORB_SYS_LIB =
+
#elif defined(solaris)
ORB_SYS_INC =
@@ -36,13 +41,11 @@
ORB_INC = \
- -I$(MICO_ARCH_PATH)/include \
+ `mico-config --cxxflags` \
$(ORB_SYS_INC)
ORB_LIBS = \
- -L$(MICO_ARCH_PATH)/lib \
- -lmicocoss$(MICO_VERSION) \
- -lmico$(MICO_VERSION) \
+ `mico-config --cosslibs` \
$(ORB_SYS_LIB)
/*

View File

@ -0,0 +1,12 @@
--- applications/utilities/preProcessing/FoamX/C++/FoamXLib/ProcessControl.C.orig Wed Jun 22 14:33:39 2005
+++ applications/utilities/preProcessing/FoamX/C++/FoamXLib/ProcessControl.C Thu Dec 22 00:01:29 2005
@@ -30,6 +30,9 @@
#include <fcntl.h>
#include <sys/wait.h>
#include <errno.h>
+#if defined(__FreeBSD__)
+# include <sys/stat.h>
+#endif
// Foam header files.
#include "ProcessControl.H"

View File

@ -0,0 +1,61 @@
--- bin/foamInstallationTest.orig Tue Jun 21 18:07:04 2005
+++ bin/foamInstallationTest Mon Dec 26 16:17:07 2005
@@ -34,7 +34,7 @@
# SETTINGS
#~~~~~~~~~
-FOAM_VERSION=1.1
+FOAM_VERSION=1.2
GCC_VERSION=3.4.3
GZIP_VERSION=1.3.5
GTAR_VERSION=1.13.25
@@ -94,7 +94,7 @@
if [ $LDIFF -le 1 ]; then
while [ $LDIFF -lt 0 ] ; do
WORD="$WORD "
- LDIFF=`expr $LDIFF + 1`
+ LDIFF=`expr 0 + $LDIFF + 1`
done
echo "$WORD"
else
@@ -321,6 +321,16 @@
RESULT="Networking_cannot_reach_$1"
fi
;;
+ FreeBSD)
+ PINGTEST=`/sbin/ping -c 1 $1 2>&1`
+ if [ "`echo $PINGTEST | grep "1 packets received"`" != "" ] ; then
+ RESULT="Successful"
+ elif [ "`echo $PINGTEST | grep "unknown host"`" != "" ] ; then
+ RESULT="No_entry_for_\"$1\"_in_/etc/hosts"
+ else
+ RESULT="Networking_cannot_reach_$1"
+ fi
+ ;;
*)
PINGTEST=`/bin/ping -w 3 -c 1 $1 2>&1`
if [ "`echo $PINGTEST | grep "1 received"`" != "" ] ; then
@@ -435,12 +445,12 @@
echo "`fixlen "Host:" $WIDTH` ${HOST_NAME}"
fi
#
-if [ "$OS" = "Linux" ] || [ "$OS" = "LinuxAMD64" ] || [ "$OS" = "SunOS" ]; then
+if [ "$OS" = "Linux" ] || [ "$OS" = "LinuxAMD64" ] || [ "$OS" = "FreeBSD" ] || [ "$OS" = "SunOS" ]; then
echo "`fixlen "OS:" $WIDTH` ${OS} version ${OS_VERSION}"
else
echo "FATAL ERROR: Incompatible operating system \"$OS\"."
echo " Foam${FOAM_VERSION} is currently "
- echo " available for Linux and SunOS only."
+ echo " available for Linux, FreeBSD and SunOS only."
echo
FATALERROR=`expr $FATALERROR + 1`
fi
@@ -558,7 +568,7 @@
hline #--------------------
echo "$COL1 $COL2 $COL3"
hline #--------------------
-reportExecutable gcc "${WM_COMPILER_DIR}/bin/gcc"
+reportExecutable gcc "/usr/bin/gcc"
reportExecutable java "${JAVA_HOME}/bin/java"
reportExecutable gzip
if [ "$OS" = "Linux" ] ; then

View File

@ -0,0 +1,23 @@
--- bin/foamSystemCheck.orig Tue Jun 21 18:07:04 2005
+++ bin/foamSystemCheck Mon Dec 26 16:03:08 2005
@@ -119,6 +119,20 @@
RESULT="Ping_not_installed_in_usual_path"
fi
;;
+ FreeBSD)
+ if [ -x '/sbin/ping' ] ; then
+ PINGTEST=`/sbin/ping -c 1 $1 2>&1`
+ if [ -n "`echo $PINGTEST | grep '1 packets received'`" ] ; then
+ RESULT="Successful"
+ elif [ -n "`echo $PINGTEST | grep 'unknown host'`" ] ; then
+ RESULT='Unknown host'
+ else
+ RESULT='Networking not set'
+ fi
+ else
+ RESULT="Ping_not_installed_in_usual_path"
+ fi
+ ;;
# OSF*)
# if [ -x '/usr/sbin/ping' ] ; then
# PINGTEST=`ping -t 3 -c 1 $1 2>&1`

View File

@ -0,0 +1,21 @@
--- src/Allwmake.orig Mon Aug 15 11:37:17 2005
+++ src/Allwmake Thu Dec 29 22:25:52 2005
@@ -1,6 +1,7 @@
#!/bin/sh
-wmake libso zlib-1.2.1
+# Use system zlib
+#wmake libso zlib-1.2.1
wmake libso foamUser
FOAM_SRC_DIR=`pwd`
@@ -123,7 +124,8 @@
wmake libso Gstream
-(cd malloc ; ./Allwmake)
+# Don't build FreeBSD malloc
+#(cd malloc ; ./Allwmake)
if [ ! -r $MICO_ARCH_PATH/lib/libmico${MICO_VERSION}.a ]
then

View File

@ -0,0 +1,9 @@
--- src/OpenFOAM/Make/options.orig Tue Jan 25 16:51:06 2005
+++ src/OpenFOAM/Make/options Fri Dec 30 21:24:48 2005
@@ -1,5 +1,4 @@
EXE_INC = \
- -DWM_PROJECT_VERSION='"'$(WM_PROJECT_VERSION)'"' \
- -I$(LIB_SRC)/zlib-1.2.1
+ -DWM_PROJECT_VERSION='"'$(WM_PROJECT_VERSION)'"'
LIB_LIBS = -L$(FOAM_LIBBIN)/dummy -lPstream -lfoamUser -lz

View File

@ -0,0 +1,10 @@
--- src/OpenFOAM/OSspecific/Unix/fileStat.C.orig Tue Jun 21 18:06:05 2005
+++ src/OpenFOAM/OSspecific/Unix/fileStat.C Sun Dec 18 14:59:12 2005
@@ -33,7 +33,6 @@
#include <signal.h>
#include <unistd.h>
-#include <sys/sysmacros.h>
/*
#undef major

View File

@ -0,0 +1,10 @@
--- wmake/Makefile.orig Tue Jun 21 18:10:23 2005
+++ wmake/Makefile Sun Dec 18 21:16:33 2005
@@ -143,6 +143,7 @@
$(EXE): $(OBJECTS)
$(WM_SCRIPTS)/mkObjectDir $(EXE)
$(LINKEXE) $(OBJECTS) -L$(LIB_WM_OPTIONS_DIR) \
+ -rpath-link $(LIB_WM_OPTIONS_DIR) -rpath-link $(FOAM_MPI_LIBBIN) \
$(EXE_LIBS) -l$(WM_PROJECT) $(SYS_LIBS) $(LINK_LIBS) $(GLIBS) -o $(EXE)
exe: $(SEXE)

View File

@ -0,0 +1,20 @@
--- wmake/makeWmake.orig Tue Jun 21 18:10:23 2005
+++ wmake/makeWmake Sun Dec 18 10:02:15 2005
@@ -59,4 +59,17 @@
cd ..
+rm -rf shScripts
+mkdir shScripts
+
+cd kshScripts
+
+for file in *
+do
+ cat $file | sed s/ksh/sh/ > ../shScripts/$file
+ chmod ugo+rx ../shScripts/$file
+done
+
+cd ..
+
#------------------------------------------------------------------------------

View File

@ -0,0 +1,11 @@
--- wmake/rules/FreeBSD/c.orig Mon Nov 22 18:30:37 2004
+++ wmake/rules/FreeBSD/c Sat Dec 17 23:56:13 2005
@@ -2,7 +2,7 @@
cWARN = -Wall
-cc = gcc -m32
+cc = $(CC)
include $(RULES)/c$(WM_COMPILE_OPTION)

View File

@ -0,0 +1,21 @@
--- wmake/rules/FreeBSD/c++.orig Sun Apr 24 00:36:58 2005
+++ wmake/rules/FreeBSD/c++ Fri Jan 6 13:50:58 2006
@@ -1,8 +1,6 @@
.SUFFIXES: .C .cxx .cc .cpp
-c++WARN = -Wall -W -Wno-unused-parameter -Wold-style-cast
-
-CC = g++ -m32
+c++WARN = -Wall -W -Wno-unused-parameter
include $(RULES)/c++$(WM_COMPILE_OPTION)
@@ -15,7 +13,7 @@
cctoo = $(Ctoo)
cpptoo = $(Ctoo)
-LINK_LIBS = $(c++DBUG)
+LINK_LIBS = $(c++DBUG) -lstdc++
LINKLIBSO = $(CC) $(c++FLAGS) -shared
LINKEXE = $(CC) $(c++FLAGS)

View File

@ -0,0 +1,6 @@
--- wmake/rules/FreeBSD/c++Opt.orig Mon Nov 22 18:30:37 2004
+++ wmake/rules/FreeBSD/c++Opt Sun Dec 18 00:00:51 2005
@@ -1,2 +1,2 @@
c++DBUG =
-c++OPT = -O3 -ffast-math
+c++OPT = $(CXXFLAGS) -ffast-math

View File

@ -0,0 +1,6 @@
--- wmake/rules/FreeBSD/cOpt.orig Mon Nov 22 18:30:37 2004
+++ wmake/rules/FreeBSD/cOpt Sun Dec 18 10:17:09 2005
@@ -1,2 +1,2 @@
cDBUG =
-cOPT = -O3
+cOPT = $(CFLAGS)

View File

@ -0,0 +1,9 @@
--- wmake/rules/FreeBSD/general.orig Mon Apr 18 20:22:21 2005
+++ wmake/rules/FreeBSD/general Sat Dec 24 00:40:11 2005
@@ -1,5 +1,4 @@
-CPP = /lib/cpp -D$(WM_ARCH)
-LD = ld -melf_i386
+CPP += -D$(WM_ARCH)
include $(RULES)/X

View File

@ -0,0 +1,32 @@
--------------------------------------------------------------------------------
OpenFOAM requires environment variable settings contained in files in
%%PREFIX%%/%%REALNAME%%/.%%REALNAME%%-%%VER%%.
a) EITHER, if running bash or ksh (if in doubt type 'echo $SHELL'),
source the .%%REALNAME%%-%%VER%%/bashrc file by adding the following line to
the end of your $HOME/.bashrc file:
. %%PREFIX%%/%%REALNAME%%/.%%REALNAME%%-%%VER%%/bashrc
Then update the environment variables by sourcing the $HOME/.bashrc
file by typing in the terminal:
. $HOME/.bashrc
b) OR, if running tcsh or csh, source the .%%REALNAME%%-%%VER%%/cshrc file by
adding the following line to the end of your $HOME/.cshrc file:
source %%PREFIX%%/%%REALNAME%%/.%%REALNAME%%-%%VER%%/cshrc
Then update the environment variables by sourcing the $HOME/.cshrc
file by typing in the terminal:
source $HOME/.cshrc
If you plan to run FoamX, copy its directories to your $HOME:
mkdir -p $HOME/.%%REALNAME%%-%%VER%%/apps
cp -R %%PREFIX%%/%%REALNAME%%/.%%REALNAME%%-%%VER%%/apps/FoamX \
$HOME/.%%REALNAME%%-%%VER%%/apps
Then, you could run foamInstallationTest to check your installaton.
See %%PREFIX%%/%%REALNAME%%/README, § 6, to get started.
--------------------------------------------------------------------------------

View File

@ -0,0 +1,24 @@
The OpenFOAM (Open Field Operation and Manipulation) CFD Toolbox can simulate
anything from complex fluid flows involving chemical reactions, turbulence and
heat transfer, to solid dynamics, electromagnetics and the pricing of financial
options.
The core technology of OpenFOAM is a flexible set of efficient C++ modules.
These are used to build a wealth of: solvers, to simulate specific problems in
engineering mechanics; utilities, to perform pre- and post-processing tasks
ranging from simple data manipulations to visualisation and mesh processing;
libraries, to create toolboxes that are accessible to the solvers/utilities,
such as libraries of physical models. It is supplied with numerous pre-
configured solvers, utilities and libraries and so can be used like any typical
simulation package. Its structure and hierarchical design are open, so that its
solvers, utilities and libraries are fully extensible.
OpenFOAM uses finite volume numerics to solve systems of partial differential
equations ascribed on any 3D unstructured mesh of polyhedral cells. The fluid
flow solvers are developed within a robust, implicit, pressure-velocity,
iterative solution framework, although alternative techniques are applied to
other continuum mechanics solvers. Domain decomposition parallelism is funda-
mental to the design of OpenFOAM and integrated at a low level so that solvers
can generally be developed without the need for any parallel-specific coding.
WWW: http://www.opencfd.co.uk/openfoam/index.html

9023
science/openfoam/pkg-plist Normal file

File diff suppressed because it is too large Load Diff