FEATURE: Windows porting changes. Author: Hrvoje Jasak. Merge: Hrvoje Jasak.

This commit is contained in:
Hrvoje Jasak 2015-08-11 14:44:55 +01:00
commit b82b255988
8 changed files with 69 additions and 41 deletions

1
.gitignore vendored
View file

@ -41,6 +41,7 @@ lnInclude
# build folders - anywhere # build folders - anywhere
linux*Gcc*/ linux*Gcc*/
linux*Icc*/ linux*Icc*/
MINGW32*Gcc*/
darwin*Gcc*/ darwin*Gcc*/
darwin*Intel*/ darwin*Intel*/
linuxming*/ linuxming*/

View file

@ -51,7 +51,13 @@ already have some of these system tools.
may already be available in other packages (such as Strawberry Perl), although may already be available in other packages (such as Strawberry Perl), although
you need to be careful of the version numbers. you need to be careful of the version numbers.
3) Download and install MSYS (see reference list below). 3) Download and install MSYS (see reference list below). If this is your first
use of MSYS, create a file fstab in cMinGW/1.0/etc with single-line contents:
c/mingw /mingw
to mount your home directory. From Windows, you will find your home directory
under c:/MinGW/msys/1.0/home/<user name>
4) Download the foam-extend source code from http://sourceforge.net/projects/openfoam-extend/ 4) Download the foam-extend source code from http://sourceforge.net/projects/openfoam-extend/

10
etc/bashrc.mingw Normal file → Executable file
View file

@ -47,8 +47,8 @@ set_system_paths() {
export PARAVIEW_HOME=$PROGRAMS_HOME/ParaView-4.3.1 export PARAVIEW_HOME=$PROGRAMS_HOME/ParaView-4.3.1
#export PERL_HOME=$PROGRAMS_HOME/strawberry-perl-5.20.2.1-64bit/perl #export PERL_HOME=$PROGRAMS_HOME/strawberry-perl-5.20.2.1-64bit/perl
export PEXPORTS_HOME=$PROGRAMS_HOME/pexports export PEXPORTS_HOME=$PROGRAMS_HOME/pexports
#export PYTHON_HOME=$PROGRAMS_HOME/Python27 export PYTHON_HOME=$PROGRAMS_HOME/Python27
#export SUBVERSION_HOME=$PROGRAMS_HOME/svn-win32-1.8.13 export SUBVERSION_HOME=$PROGRAMS_HOME/svn-win32-1.8.13
export WGET_HOME=$PROGRAMS_HOME/wget-1.11.4-1 export WGET_HOME=$PROGRAMS_HOME/wget-1.11.4-1
export ZIP_HOME="/c/Program Files/7-Zip" export ZIP_HOME="/c/Program Files/7-Zip"
} }
@ -58,14 +58,15 @@ add_to_path() {
echo "Adding user-defined installed system tools to PATH ..." echo "Adding user-defined installed system tools to PATH ..."
export PATH=$ZIP_HOME:$PATH export PATH=$ZIP_HOME:$PATH
export PATH=$WGET_HOME/bin:$PATH export PATH=$WGET_HOME/bin:$PATH
#export PATH=$PYTHON_HOME:$PATH export PATH=$PYTHON_HOME:$PATH
#export PATH=$SUBVERSION_HOME/bin:$PATH export PATH=$SUBVERSION_HOME/bin:$PATH
export PATH=$GIT_HOME/cmd:$PATH export PATH=$GIT_HOME/cmd:$PATH
#export PATH=$PERL_HOME/bin:$PATH #export PATH=$PERL_HOME/bin:$PATH
export PATH=$CMAKE_HOME/bin:$PATH export PATH=$CMAKE_HOME/bin:$PATH
export PATH=$MPI_ROOTDIR/bin:$PATH export PATH=$MPI_ROOTDIR/bin:$PATH
export PATH=$PEXPORTS_HOME/bin:$PATH export PATH=$PEXPORTS_HOME/bin:$PATH
export PATH=$MINGW_HOME/bin:$PATH export PATH=$MINGW_HOME/bin:$PATH
export PATH=$PARAVIEW_HOME/bin:$PATH
} }
# }}} # }}}
@ -119,6 +120,7 @@ check_versions() {
} }
finish() { finish() {
export PATH=$PATH:$LD_LIBRARY_PATH
echo echo
echo echo
echo "FOAM_INST_DIR=$FOAM_INST_DIR" echo "FOAM_INST_DIR=$FOAM_INST_DIR"

View file

@ -151,9 +151,9 @@ export SCOTCH_INCLUDE_DIR=$SCOTCH_DIR/include
#export QT_BIN_DIR=$QT_DIR/bin #export QT_BIN_DIR=$QT_DIR/bin
# System installed ParaView # System installed ParaView
#export PARAVIEW_SYSTEM=1 export PARAVIEW_SYSTEM=1
#export PARAVIEW_DIR=path_to_system_installed_paraview export PARAVIEW_DIR=/c/Programs/ParaView-4.3.1
#export PARAVIEW_BIN_DIR=$PARAVIEW_DIR/bin export PARAVIEW_BIN_DIR=$PARAVIEW_DIR/bin
# System installed bison # System installed bison
#export BISON_SYSTEM=1 #export BISON_SYSTEM=1

View file

@ -194,7 +194,6 @@ case OPENMPI:
_foamSource $WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS/etc/$mpi_version.csh _foamSource $WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS/etc/$mpi_version.csh
endif endif
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
unset mpi_version unset mpi_version
breaksw breaksw
@ -291,7 +290,6 @@ case SYSTEMOPENMPI:
echo " PLIBS : $PLIBS" echo " PLIBS : $PLIBS"
endif endif
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
unset mpi_version unset mpi_version
breaksw breaksw
@ -321,7 +319,6 @@ case MVAPICH2:
echo " PLIBS : $PLIBS" echo " PLIBS : $PLIBS"
endif endif
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
unset mpi_version unset mpi_version
breaksw breaksw
@ -334,7 +331,6 @@ case MPICH:
_foamAddPath $MPI_ARCH_PATH/bin _foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib _foamAddLib $MPI_ARCH_PATH/lib
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
unset mpi_version unset mpi_version
breaksw breaksw
@ -347,8 +343,6 @@ case MPICH-GM:
_foamAddPath $MPI_ARCH_PATH/bin _foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib _foamAddLib $MPI_ARCH_PATH/lib
_foamAddLib $GM_LIB_PATH _foamAddLib $GM_LIB_PATH
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpich-gm
breaksw breaksw
case HPMPI: case HPMPI:
@ -372,23 +366,18 @@ case HPMPI:
echo Unknown processor type `uname -m` for Linux echo Unknown processor type `uname -m` for Linux
breaksw breaksw
endsw endsw
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/hpmpi
breaksw breaksw
case GAMMA: case GAMMA:
setenv MPI_ARCH_PATH /usr setenv MPI_ARCH_PATH /usr
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/gamma
breaksw breaksw
case MPI: case MPI:
setenv MPI_ARCH_PATH /opt/mpi setenv MPI_ARCH_PATH /opt/mpi
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpi
breaksw breaksw
case FJMPI: case FJMPI:
setenv MPI_ARCH_PATH /opt/FJSVmpi2 setenv MPI_ARCH_PATH /opt/FJSVmpi2
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpi
_foamAddPath $MPI_ARCH_PATH/bin _foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib/sparcv9 _foamAddLib $MPI_ARCH_PATH/lib/sparcv9
_foamAddLib /opt/FSUNf90/lib/sparcv9 _foamAddLib /opt/FSUNf90/lib/sparcv9
@ -397,21 +386,15 @@ case FJMPI:
case QSMPI: case QSMPI:
setenv MPI_ARCH_PATH /usr/lib/mpi setenv MPI_ARCH_PATH /usr/lib/mpi
setenv FOAM_MPI_LIBBIN FOAM_LIBBIN/qsmpi
_foamAddPath $MPI_ARCH_PATH/bin _foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib _foamAddLib $MPI_ARCH_PATH/lib
breaksw breaksw
default: default:
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/dummy
breaksw breaksw
endsw endsw
_foamAddLib $FOAM_MPI_LIBBIN
# Set the minimum MPI buffer size (used by all platforms except SGI MPI) # Set the minimum MPI buffer size (used by all platforms except SGI MPI)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
set minBufferSize=20000000 set minBufferSize=20000000

17
etc/settings.sh Normal file → Executable file
View file

@ -107,8 +107,6 @@ export FOAM_RUN=$WM_PROJECT_USER_DIR/run
export PATH=$WM_DIR:$WM_PROJECT_DIR/bin:$PATH export PATH=$WM_DIR:$WM_PROJECT_DIR/bin:$PATH
_foamAddPath $FOAM_APPBIN $FOAM_SITE_APPBIN $FOAM_USER_APPBIN _foamAddPath $FOAM_APPBIN $FOAM_SITE_APPBIN $FOAM_USER_APPBIN
# Make sure to pick up dummy versions of external libraries last
_foamAddLib $FOAM_LIBBIN/dummy
_foamAddLib $FOAM_LIBBIN $FOAM_SITE_LIBBIN $FOAM_USER_LIBBIN _foamAddLib $FOAM_LIBBIN $FOAM_SITE_LIBBIN $FOAM_USER_LIBBIN
@ -256,7 +254,6 @@ OPENMPI)
mpi_version=$MPI_VERSION_MINGW mpi_version=$MPI_VERSION_MINGW
fi fi
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
unset mpi_version unset mpi_version
;; ;;
@ -269,7 +266,6 @@ MACPORTOPENMPI)
# libDir=`mpicc-openmpi-$WM_MACPORT_MPI_VERSION --showme:libdirs` # libDir=`mpicc-openmpi-$WM_MACPORT_MPI_VERSION --showme:libdirs`
libDir=/opt/local/lib/openmpi-$WM_MACPORT_MPI_VERSION libDir=/opt/local/lib/openmpi-$WM_MACPORT_MPI_VERSION
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$FOAM_MPI
_foamAddLib $libDir _foamAddLib $libDir
unset libDir unset libDir
@ -284,7 +280,6 @@ MACPORTMPICH)
export FOAM_MPI=mpich-macports-$WM_MACPORT_MPI_VERSION export FOAM_MPI=mpich-macports-$WM_MACPORT_MPI_VERSION
export MPI_HOME=$WM_THIRD_PARTY_DIR/$FOAM_MPI export MPI_HOME=$WM_THIRD_PARTY_DIR/$FOAM_MPI
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$FOAM_MPI
libDir=/opt/local/lib/mpich-$WM_MACPORT_MPI_VERSION libDir=/opt/local/lib/mpich-$WM_MACPORT_MPI_VERSION
_foamAddLib $libDir _foamAddLib $libDir
@ -375,7 +370,6 @@ SYSTEMOPENMPI)
echo " PLIBS : $PLIBS" echo " PLIBS : $PLIBS"
fi fi
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
unset mpi_version unset mpi_version
;; ;;
@ -411,7 +405,6 @@ MVAPICH2)
echo " PLIBS : $PLIBS" echo " PLIBS : $PLIBS"
fi fi
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
unset mpi_version unset mpi_version
;; ;;
@ -424,7 +417,6 @@ MPICH)
_foamAddPath $MPI_ARCH_PATH/bin _foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib _foamAddLib $MPI_ARCH_PATH/lib
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
unset mpi_version unset mpi_version
;; ;;
@ -438,7 +430,6 @@ MPICH-GM)
_foamAddLib $MPI_ARCH_PATH/lib _foamAddLib $MPI_ARCH_PATH/lib
_foamAddLib $GM_LIB_PATH _foamAddLib $GM_LIB_PATH
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpich-gm
;; ;;
HPMPI) HPMPI)
@ -464,22 +455,18 @@ HPMPI)
;; ;;
esac esac
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/hpmpi
;; ;;
GAMMA) GAMMA)
export MPI_ARCH_PATH=/usr export MPI_ARCH_PATH=/usr
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/gamma
;; ;;
MPI) MPI)
export MPI_ARCH_PATH=/opt/mpi export MPI_ARCH_PATH=/opt/mpi
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpi
;; ;;
FJMPI) FJMPI)
export MPI_ARCH_PATH=/opt/FJSVmpi2 export MPI_ARCH_PATH=/opt/FJSVmpi2
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpi
_foamAddPath $MPI_ARCH_PATH/bin _foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib/sparcv9 _foamAddLib $MPI_ARCH_PATH/lib/sparcv9
@ -489,7 +476,6 @@ FJMPI)
QSMPI) QSMPI)
export MPI_ARCH_PATH=/usr/lib/mpi export MPI_ARCH_PATH=/usr/lib/mpi
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/qsmpi
_foamAddPath $MPI_ARCH_PATH/bin _foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib _foamAddLib $MPI_ARCH_PATH/lib
@ -497,11 +483,10 @@ QSMPI)
;; ;;
*) *)
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/dummy
;; ;;
esac esac
_foamAddLib $FOAM_MPI_LIBBIN # Removed $FOAM_MPI_LIBBIN. HJ, 8/Aug/2015
# Set the minimum MPI buffer size (used by all platforms except SGI MPI) # Set the minimum MPI buffer size (used by all platforms except SGI MPI)

View file

@ -0,0 +1,49 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
method simple;
simpleCoeffs
{
n ( 2 2 1 );
delta 0.001;
}
hierarchicalCoeffs
{
n ( 1 1 1 );
delta 0.001;
order xyz;
}
metisCoeffs
{
processorWeights ( 1 1 1 1 );
}
manualCoeffs
{
dataFile "";
}
distributed no;
roots ( );
// ************************************************************************* //

View file

@ -47,6 +47,8 @@ laplacianSchemes
laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected; laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
laplacian(1,p) Gauss linear corrected;
} }
interpolationSchemes interpolationSchemes