GIT: Initial commit after latest foundation merge

This commit is contained in:
andy
2016-04-25 11:40:48 +01:00
4003 changed files with 74634 additions and 37783 deletions

54
etc/config.csh/CGAL Normal file
View File

@ -0,0 +1,54 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
# \\/ 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
# config.csh/CGAL
#
# Description
# Setup file for CGAL (& boost) include/libraries.
# Sourced from OpenFOAM-<VERSION>/etc/cshrc
##------------------------------------------------------------------------------
set boost_version=boost-system
set cgal_version=CGAL-4.7
setenv BOOST_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version
setenv CGAL_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using CGAL and boost"
echo " $cgal_version at $CGAL_ARCH_PATH"
echo " $boost_version at $BOOST_ARCH_PATH"
endif
if ( -d "$CGAL_ARCH_PATH" ) then
_foamAddLib $CGAL_ARCH_PATH/lib
endif
if ( -d "$BOOST_ARCH_PATH" ) then
_foamAddLib $BOOST_ARCH_PATH/lib
endif
unset boost_version cgal_version
#------------------------------------------------------------------------------

83
etc/config.csh/aliases Normal file
View File

@ -0,0 +1,83 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ 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/config.csh/aliases
#
# Description
# Aliases for working with OpenFOAM
# Sourced from OpenFOAM-<VERSION>/etc/cshrc and/or ~/.cshrc
#
#------------------------------------------------------------------------------
# Change compiled version aliases
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias wmSET 'source $WM_PROJECT_DIR/etc/cshrc'
alias wm64 'wmSET WM_ARCH_OPTION=64'
alias wm32 'wmSET WM_ARCH_OPTION=32'
alias wmSP 'wmSET WM_PRECISION_OPTION=SP'
alias wmDP 'wmSET WM_PRECISION_OPTION=DP'
# refresh the environment
alias wmREFRESH 'wmSET $FOAM_SETTINGS'
# clear env
alias wmUNSET 'source $WM_PROJECT_DIR/etc/config.csh/unset'
# Toggle wmakeScheduler on/off
# - also need to set WM_HOSTS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias wmSchedON 'setenv WM_SCHEDULER $WM_PROJECT_DIR/wmake/wmakeScheduler'
alias wmSchedOFF 'unsetenv WM_SCHEDULER'
# Change ParaView version
# ~~~~~~~~~~~~~~~~~~~~~~~
alias foamPV 'source `$WM_PROJECT_DIR/etc/config.csh/paraview` ParaView_VERSION=\!*; echo paraview-$ParaView_VERSION'
# Change directory aliases
# ~~~~~~~~~~~~~~~~~~~~~~~~
alias src 'cd $FOAM_SRC'
alias lib 'cd $FOAM_LIBBIN'
alias run 'cd $FOAM_RUN'
alias foam 'cd $WM_PROJECT_DIR'
alias foamsrc 'cd $FOAM_SRC/$WM_PROJECT'
alias foamfv 'cd $FOAM_SRC/finiteVolume'
alias app 'cd $FOAM_APP'
alias util 'cd $FOAM_UTILITIES'
alias sol 'cd $FOAM_SOLVERS'
alias tut 'cd $FOAM_TUTORIALS'
alias foamApps 'cd $FOAM_APP'
alias foamSol 'cd $FOAM_SOLVERS'
alias foamTuts 'cd $FOAM_TUTORIALS'
alias foamUtils 'cd $FOAM_UTILITIES'
alias foam3rdParty 'cd $WM_THIRD_PARTY_DIR'
if ( $?WM_PROJECT_SITE ) then
alias foamSite 'cd $WM_PROJECT_SITE'
else
alias foamSite 'cd $WM_PROJECT_INST_DIR/site'
endif
#------------------------------------------------------------------------------

54
etc/config.csh/ensight Normal file
View File

@ -0,0 +1,54 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ 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
# config.csh/ensight
#
# Description
# Setup file for Ensight
# Sourced from OpenFOAM-*/etc/cshrc
#
#------------------------------------------------------------------------------
# fallback value
if (! $?CEI_HOME) then
setenv CEI_HOME /usr/local/ensight/CEI
endif
if ( -r $CEI_HOME ) then
# special treatment for 32bit OpenFOAM and 64bit Ensight
if ($WM_ARCH == linux && `uname -m` == x86_64) then
setenv CEI_ARCH linux_2.6_32
endif
# add to path
setenv PATH ${CEI_HOME}/bin:${PATH}
setenv ENSIGHT9_INPUT dummy
setenv ENSIGHT9_READER $FOAM_LIBBIN
else
unsetenv CEI_HOME
endif
#------------------------------------------------------------------------------

View File

@ -0,0 +1,51 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ 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
# config.csh/example/compiler
#
# Description
# Example of fine tuning ThirdParty compiler settings for OpenFOAM
# Sourced from OpenFOAM-<VERSION>/etc/config.csh/settings
#
#------------------------------------------------------------------------------
# Modified compiler settings
switch ("$WM_COMPILER")
case Gcc46:
case Gcc46++0x:
set gcc_version=gcc-4.6.0
set gmp_version=gmp-5.0.1
set mpfr_version=mpfr-2.4.2
set mpc_version=mpc-0.8.1
breaksw
case Gcc45:
case Gcc45++0x:
set gcc_version=gcc-4.5.2
set gmp_version=gmp-5.0.1
set mpfr_version=mpfr-2.4.2
set mpc_version=mpc-0.8.1
breaksw
endsw
#------------------------------------------------------------------------------

View File

@ -0,0 +1,36 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ 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
# config.csh/example/openmpi
#
# Description
# Example of fine tuning openmpi settings for OpenFOAM
# Sourced from OpenFOAM-<VERSION>/etc/config.csh/settings
#
#------------------------------------------------------------------------------
# Modified openmpi settings
setenv FOAM_MPI openmpi-1.4.3
#------------------------------------------------------------------------------

View File

@ -0,0 +1,46 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ 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
# config.csh/example/paraview
#
# Description
# Example of chaining to the standard config.csh/paraview with a
# different ParaView_VERSION
#
# Note
# This file could be copied to a user or site location, but should never
# replace the default shipped version as this will cause an infinite loop
#
#------------------------------------------------------------------------------
#
# Use other (shipped) paraview.csh with a different ParaView_VERSION
#
set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o config.csh/paraview`
if ( $status == 0 ) source $foamFile ParaView_VERSION=3.12.0
unset foamFile
#------------------------------------------------------------------------------

View File

@ -0,0 +1,52 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ 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
# config.csh/example/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 OpenFOAM ThirdParty compiler
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# set WM_COMPILER_TYPE=ThirdParty
## Specify compiler type
## ~~~~~~~~~~~~~~~~~~~~~
#setenv WM_COMPILER Clang
## Specify system openmpi
## ~~~~~~~~~~~~~~~~~~~~~~
# setenv WM_MPLIB SYSTEMOPENMPI
#------------------------------------------------------------------------------

277
etc/config.csh/mpi Normal file
View File

@ -0,0 +1,277 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ 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/config.csh/mpi
#
# Description
# Startup file for communications library (MPI) for OpenFOAM
# Sourced from OpenFOAM-<VERSION>/etc/bashrc
#
#------------------------------------------------------------------------------
# Communications library
# ~~~~~~~~~~~~~~~~~~~~~~
unsetenv MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN
switch ("$WM_MPLIB")
case SYSTEMOPENMPI:
# Use the system installed openmpi, get library directory via mpicc
setenv FOAM_MPI openmpi-system
set libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
# Bit of a hack: strip off 'lib' and hope this is the path to openmpi
# Include files and libraries.
setenv MPI_ARCH_PATH "${libDir:h}"
_foamAddLib $libDir
unset libDir
breaksw
case OPENMPI:
setenv FOAM_MPI openmpi-1.10.2
# Optional configuration tweaks:
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/openmpi`
setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
# Tell OpenMPI where to find its install directory
setenv OPAL_PREFIX $MPI_ARCH_PATH
_foamAddPath $MPI_ARCH_PATH/bin
# 64-bit on OpenSuSE 12.1 uses lib64 others use lib
_foamAddLib $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
_foamAddLib $MPI_ARCH_PATH/lib
_foamAddMan $MPI_ARCH_PATH/share/man
breaksw
case SYSTEMMPI:
setenv FOAM_MPI mpi-system
if ( ! ($?MPI_ROOT) ) then
echo
echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " Please set the environment variable MPI_ROOT to point to" \
" the base folder for the system MPI in use."
echo " Example:"
echo
echo " setenv MPI_ROOT /opt/mpi"
echo
else
setenv MPI_ARCH_PATH $MPI_ROOT
if ( ! ($?MPI_ARCH_FLAGS) ) then
echo
echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " MPI_ARCH_FLAGS is not set. Example:"
echo
echo ' setenv MPI_ARCH_FLAGS "-DOMPI_SKIP_MPICXX"'
echo
endif
if ( ! ($?MPI_ARCH_INC) ) then
echo
echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " MPI_ARCH_INC is not set. Example:"
echo
echo ' setenv MPI_ARCH_INC "-isystem $MPI_ROOT/include"'
echo
endif
if ( ! ($?MPI_ARCH_LIBS) ) then
echo
echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " MPI_ARCH_LIBS is not set. Example:"
echo
echo ' setenv MPI_ARCH_LIBS "-L$MPI_ROOT/lib -lmpi"'
echo
endif
endif
breaksw
case MPICH:
setenv FOAM_MPI mpich2-1.1.1p1
setenv MPI_HOME $WM_THIRD_PARTY_DIR/$FOAM_MPI
setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
_foamAddPath $MPI_ARCH_PATH/bin
# 64-bit on OpenSuSE 12.1 uses lib64 others use lib
_foamAddLib $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
_foamAddLib $MPI_ARCH_PATH/lib
_foamAddMan $MPI_ARCH_PATH/share/man
breaksw
case MPICH-GM:
setenv FOAM_MPI mpich-gm
setenv MPI_ARCH_PATH /opt/mpi
setenv MPICH_PATH $MPI_ARCH_PATH
setenv GM_LIB_PATH /opt/gm/lib64
_foamAddPath $MPI_ARCH_PATH/bin
# 64-bit on OpenSuSE 12.1 uses lib64 others use lib
_foamAddLib $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
_foamAddLib $MPI_ARCH_PATH/lib
_foamAddLib $GM_LIB_PATH
breaksw
case HPMPI:
setenv FOAM_MPI hpmpi
setenv MPI_HOME /opt/hpmpi
setenv MPI_ARCH_PATH $MPI_HOME
_foamAddPath $MPI_ARCH_PATH/bin
switch (`uname -m`)
case i686:
_foamAddLib $MPI_ARCH_PATH/lib/linux_ia32
breaksw
case x86_64:
_foamAddLib $MPI_ARCH_PATH/lib/linux_amd64
breaksw
case ia64:
_foamAddLib $MPI_ARCH_PATH/lib/linux_ia64
breaksw
default:
echo Unknown processor type `uname -m` for Linux
breaksw
endsw
breaksw
case MPI:
setenv FOAM_MPI mpi
setenv MPI_ARCH_PATH /opt/mpi
breaksw
case FJMPI:
setenv FOAM_MPI fjmpi
setenv MPI_ARCH_PATH /opt/FJSVmpi2
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib/sparcv9
_foamAddLib /opt/FSUNf90/lib/sparcv9
_foamAddLib /opt/FJSVpnidt/lib
breaksw
case QSMPI:
setenv FOAM_MPI qsmpi
setenv MPI_ARCH_PATH /usr/lib/mpi
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib
breaksw
case SGIMPI:
if ( ! $?MPI_ROOT) setenv MPI_ROOT /dummy
if ( ! -d "$MPI_ROOT" ) then
echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " MPI_ROOT not a valid mpt installation directory."
echo " Please set MPI_ROOT to the mpt installation directory."
echo " (usually done by loading the mpt module)"
echo " MPI_ROOT currently set to '$MPI_ROOT'"
endif
if ( "${MPI_ROOT:h}/" == $MPI_ROOT ) then
setenv MPI_ROOT ${MPI_ROOT:h}
endif
setenv FOAM_MPI ${MPI_ROOT:t}
setenv MPI_ARCH_PATH $MPI_ROOT
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using SGI MPT:"
echo " MPI_ROOT : $MPI_ROOT"
echo " FOAM_MPI : $FOAM_MPI"
endif
_foamAddPath $MPI_ARCH_PATH/bin
_foamAddLib $MPI_ARCH_PATH/lib
breaksw
case INTELMPI:
if ( ! $?MPI_ROOT) setenv MPI_ROOT /dummy
if ( ! -d "$MPI_ROOT" ) then
echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " MPI_ROOT not a valid mpt installation directory."
echo " Please set MPI_ROOT to the mpt installation directory."
echo " (usually done by loading the mpt module)"
echo " MPI_ROOT currently set to '$MPI_ROOT'"
endif
if ( "${MPI_ROOT:h}/" == $MPI_ROOT ) then
setenv MPI_ROOT ${MPI_ROOT:h}
endif
setenv FOAM_MPI ${MPI_ROOT:t}
setenv MPI_ARCH_PATH $MPI_ROOT
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using INTEL MPT:"
echo " MPI_ROOT : $MPI_ROOT"
echo " FOAM_MPI : $FOAM_MPI"
endif
_foamAddPath $MPI_ARCH_PATH/bin64
_foamAddLib $MPI_ARCH_PATH/lib64
breaksw
default:
setenv FOAM_MPI dummy
breaksw
endsw
# Add (non-dummy) MPI implementation
# Dummy MPI already added to LD_LIBRARY_PATH and has no external libraries
if ( "$FOAM_MPI" != dummy ) then
_foamAddLib ${FOAM_LIBBIN}/${FOAM_MPI}:${FOAM_EXT_LIBBIN}/${FOAM_MPI}
endif
# Set the minimum MPI buffer size (used by all platforms except SGI MPI)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( ! $?minBufferSize ) set minBufferSize=20000000
if ( $?MPI_BUFFER_SIZE ) then
if ( $MPI_BUFFER_SIZE < $minBufferSize ) then
setenv MPI_BUFFER_SIZE $minBufferSize
endif
else
setenv MPI_BUFFER_SIZE $minBufferSize
endif
#------------------------------------------------------------------------------

131
etc/config.csh/paraview Normal file
View File

@ -0,0 +1,131 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ 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
# config.csh/paraview
#
# Description
# Setup file for paraview-[3-5].x
# Sourced from OpenFOAM-<VERSION>/etc/cshrc or from foamPV alias
#
# Note
# The env. variables 'ParaView_DIR' and 'ParaView_MAJOR'
# are required for building plugins
#------------------------------------------------------------------------------
# clean the PATH
set cleaned=`$WM_PROJECT_DIR/bin/foamCleanPath "$PATH" "$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/cmake- $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-"`
if ( $status == 0 ) setenv PATH $cleaned
# determine the cmake to be used
unsetenv CMAKE_HOME
foreach cmake ( cmake-3.2.1 cmake-2.8.12.1 cmake-2.8.8 cmake-2.8.4 cmake-2.8.3 cmake-2.8.1 )
set cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
if ( -r $cmake ) then
setenv CMAKE_HOME $cmake
setenv PATH ${CMAKE_HOME}/bin:${PATH}
break
endif
end
#- ParaView version, automatically determine major version:
#setenv ParaView_VERSION 3.12.0
#setenv ParaView_VERSION 4.0.1
#setenv ParaView_VERSION 4.1.0
#setenv ParaView_VERSION 4.3.1
#setenv ParaView_VERSION 4.4.0
setenv ParaView_VERSION 5.0.0
setenv ParaView_MAJOR detect
# Evaluate command-line parameters for ParaView
while ( $#argv > 0 )
switch ($argv[1])
case ParaView*=*:
# name=value -> setenv name value
eval "setenv $argv[1]:s/=/ /"
breaksw
endsw
shift
end
# set MAJOR version to correspond to VERSION
# ParaView_MAJOR is "<digits>.<digits>" from ParaView_VERSION
switch ("$ParaView_VERSION")
case "$ParaView_MAJOR".*:
# version and major appear to correspond
breaksw
case [0-9]*:
# extract major from the version
setenv ParaView_MAJOR `echo ${ParaView_VERSION} | \
sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
breaksw
endsw
set paraviewInstDir=$WM_THIRD_PARTY_DIR/ParaView-${ParaView_VERSION}
set paraviewArchName=ParaView-$ParaView_VERSION
setenv ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$paraviewArchName
# set paths if binaries or source are present
if ( -r $ParaView_DIR || -r $paraviewInstDir ) then
setenv ParaView_INCLUDE_DIR $ParaView_DIR/include/paraview-${ParaView_MAJOR}
if (! -r $ParaView_INCLUDE_DIR && -r $ParaView_DIR/include/paraview-3.0) then
setenv ParaView_INCLUDE_DIR $ParaView_DIR/include/paraview-3.0
endif
set ParaView_LIB_DIR=${ParaView_DIR}/lib/paraview-${ParaView_MAJOR}
setenv PATH ${ParaView_DIR}/bin:${PATH}
setenv LD_LIBRARY_PATH "${ParaView_LIB_DIR}:${LD_LIBRARY_PATH}"
setenv PV_PLUGIN_PATH $FOAM_LIBBIN/paraview-${ParaView_MAJOR}
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using paraview"
echo " ParaView_DIR : $ParaView_DIR"
echo " ParaView_LIB_DIR : $ParaView_LIB_DIR"
echo " ParaView_INCLUDE_DIR : $ParaView_INCLUDE_DIR"
echo " PV_PLUGIN_PATH : $PV_PLUGIN_PATH"
endif
# add in python libraries if required
set paraviewPython=$ParaView_DIR/Utilities/VTKPythonWrapping
if ( -r $paraviewPython ) then
if ($?PYTHONPATH) then
setenv PYTHONPATH ${PYTHONPATH}:${paraviewPython}:$ParaView_LIB_DIR
else
setenv PYTHONPATH ${paraviewPython}:$ParaView_LIB_DIR
endif
endif
else
unsetenv PV_PLUGIN_PATH
endif
unset cleaned cmake paraviewInstDir paraviewPython
#------------------------------------------------------------------------------

346
etc/config.csh/settings Normal file
View File

@ -0,0 +1,346 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ 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/config.csh/settings
#
# Description
# Startup file for OpenFOAM
# Sourced from OpenFOAM-<VERSION>/etc/cshrc
#
#------------------------------------------------------------------------------
# Prefix to PATH
alias _foamAddPath 'setenv PATH \!*\:${PATH}'
# Prefix to LD_LIBRARY_PATH
alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}'
# Prefix to MANPATH
alias _foamAddMan 'setenv MANPATH \!*\:${MANPATH}'
#------------------------------------------------------------------------------
# Set environment variables according to system type
setenv WM_ARCH `uname -s`
# Default WM_COMPILER_LIB_ARCH for 32bit
setenv WM_COMPILER_LIB_ARCH
switch ($WM_ARCH)
case Linux:
setenv WM_ARCH linux
switch (`uname -m`)
case i686:
setenv WM_ARCH_OPTION 32
breaksw
case x86_64:
switch ($WM_ARCH_OPTION)
case 32:
setenv WM_COMPILER_ARCH 64
setenv WM_CC 'gcc'
setenv WM_CXX 'g++'
setenv WM_CFLAGS '-m32 -fPIC'
setenv WM_CXXFLAGS '-m32 -fPIC -std=c++0x'
setenv WM_LDFLAGS '-m32'
breaksw
case 64:
setenv WM_ARCH linux64
setenv WM_COMPILER_LIB_ARCH 64
setenv WM_CC 'gcc'
setenv WM_CXX 'g++'
setenv WM_CFLAGS '-m64 -fPIC'
setenv WM_CXXFLAGS '-m64 -fPIC -std=c++0x'
setenv WM_LDFLAGS '-m64'
breaksw
default:
echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32 or 64"
breaksw
endsw
breaksw
case ia64:
setenv WM_ARCH linuxIA64
setenv WM_COMPILER I64
breaksw
case ppc64:
setenv WM_ARCH linuxPPC64
setenv WM_COMPILER_LIB_ARCH 64
setenv WM_CC 'gcc'
setenv WM_CXX 'g++'
setenv WM_CFLAGS '-m64 -fPIC'
setenv WM_CXXFLAGS '-m64 -fPIC -std=c++0x'
setenv WM_LDFLAGS '-m64'
breaksw
case ppc64le:
setenv WM_ARCH linuxPPC64le
setenv WM_COMPILER_LIB_ARCH 64
setenv WM_CC 'gcc'
setenv WM_CXX 'g++'
setenv WM_CFLAGS '-m64 -fPIC'
setenv WM_CXXFLAGS '-m64 -fPIC -std=c++0x'
setenv WM_LDFLAGS '-m64'
breaksw
default:
echo Unknown processor type `uname -m` for Linux
breaksw
endsw
breaksw
case SunOS:
setenv WM_ARCH SunOS64
setenv WM_MPLIB FJMPI
setenv WM_COMPILER_LIB_ARCH 64
setenv WM_CC 'gcc'
setenv WM_CXX 'g++'
setenv WM_CFLAGS '-mabi=64 -fPIC'
setenv WM_CXXFLAGS '-mabi=64 -fPIC -std=c++0x'
setenv WM_LDFLAGS '-mabi=64 -G0'
breaksw
default:
echo
echo "Your '$WM_ARCH' operating system is not supported by this release"
echo "of OpenFOAM. For further assistance, please contact www.OpenFOAM.com"
echo
breaksw
endsw
#------------------------------------------------------------------------------
# Location of the jobControl directory
setenv FOAM_JOB_DIR $WM_PROJECT_INST_DIR/jobControl
# wmake configuration
setenv WM_DIR $WM_PROJECT_DIR/wmake
setenv WM_LINK_LANGUAGE c++
setenv WM_LABEL_OPTION Int$WM_LABEL_SIZE
setenv WM_OPTIONS $WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION$WM_COMPILE_OPTION
# Base executables/libraries
setenv FOAM_APPBIN $WM_PROJECT_DIR/platforms/$WM_OPTIONS/bin
setenv FOAM_LIBBIN $WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib
# External (ThirdParty) libraries
setenv FOAM_EXT_LIBBIN $WM_THIRD_PARTY_DIR/platforms/$WM_OPTIONS/lib
# Site-specific directory
if ( $?WM_PROJECT_SITE ) then
set siteDir=$WM_PROJECT_SITE
else
set siteDir=$WM_PROJECT_INST_DIR/site
endif
# Shared site executables/libraries
# Similar naming convention as ~OpenFOAM expansion
setenv FOAM_SITE_APPBIN $siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
setenv FOAM_SITE_LIBBIN $siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
# User executables/libraries
setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin
setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/lib
# DynamicCode templates
# - default location is the "~OpenFOAM/codeTemplates/dynamicCode" expansion
# setenv FOAM_CODE_TEMPLATES $WM_PROJECT_DIR/etc/codeTemplates/dynamicCode
# Convenience
setenv FOAM_ETC $WM_PROJECT_DIR/etc
setenv FOAM_APP $WM_PROJECT_DIR/applications
setenv FOAM_SRC $WM_PROJECT_DIR/src
setenv FOAM_TUTORIALS $WM_PROJECT_DIR/tutorials
setenv FOAM_UTILITIES $FOAM_APP/utilities
setenv FOAM_SOLVERS $FOAM_APP/solvers
setenv FOAM_RUN $WM_PROJECT_USER_DIR/run
# Add wmake to the path - not required for runtime-only environment
if ( -d "${WM_DIR}" ) setenv PATH ${WM_DIR}:${PATH}
# Add OpenFOAM scripts to the path
setenv PATH ${WM_PROJECT_DIR}/bin:${PATH}
# Add site-specific scripts to path - only if they exist
if ( -d "$siteDir/bin" ) then # Generic
_foamAddPath "$siteDir/bin"
endif
if ( -d "$siteDir/$WM_PROJECT_VERSION/bin" ) then # Version-specific
_foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin"
endif
unset siteDir
_foamAddPath ${FOAM_USER_APPBIN}:${FOAM_SITE_APPBIN}:${FOAM_APPBIN}
# Make sure to pick up dummy versions of external libraries last
_foamAddLib ${FOAM_USER_LIBBIN}:${FOAM_SITE_LIBBIN}:${FOAM_LIBBIN}:${FOAM_EXT_LIBBIN}:${FOAM_LIBBIN}/dummy
# Compiler settings
# ~~~~~~~~~~~~~~~~~
unset gcc_version gmp_version mpfr_version mpc_version
unsetenv MPFR_ARCH_PATH GMP_ARCH_PATH
# Location of compiler installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( ! $?WM_COMPILER_TYPE ) then
set WM_COMPILER_TYPE=system
echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " WM_COMPILER_TYPE not set, using '$WM_COMPILER_TYPE'"
endif
switch ("$WM_COMPILER_TYPE")
case OpenFOAM:
case ThirdParty:
# Default versions of GMP, MPFR and MPC, overide as necessary
set gmp_version=gmp-5.1.2
set mpfr_version=mpfr-3.1.2
set mpc_version=mpc-1.0.1
switch ("$WM_COMPILER")
case Gcc:
case Gcc48:
set gcc_version=gcc-4.8.5
breaksw
case Gcc45:
set gcc_version=gcc-4.5.4
breaksw
case Gcc46:
set gcc_version=gcc-4.6.4
breaksw
case Gcc47:
set gcc_version=gcc-4.7.4
breaksw
case Gcc49:
set gcc_version=gcc-4.9.3
breaksw
case Gcc51:
set gcc_version=gcc-5.1.0
breaksw
case Gcc52:
set gcc_version=gcc-5.2.0
breaksw
case Gcc53:
set gcc_version=gcc-5.3.0
breaksw
case Clang:
# Using clang - not gcc
setenv WM_CC 'clang'
setenv WM_CXX 'clang++'
set clang_version=llvm-3.7.0
breaksw
default:
echo
echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " Unknown OpenFOAM compiler type '$WM_COMPILER'"
echo " Please check your settings"
echo
breaksw
endsw
# Optional configuration tweaks:
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/compiler`
if ( $?gcc_version ) then
set gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version
set gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
set mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
if ( $?mpc_version ) then
set mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version
endif
# Check that the compiler directory can be found
if ( ! -d "$gccDir" ) then
echo
echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " Cannot find $gccDir installation."
echo " Please install this compiler version or if you wish to" \
" use the system compiler,"
echo " change the 'WM_COMPILER_TYPE' setting to 'system'"
echo
endif
_foamAddMan $gccDir/man
_foamAddPath $gccDir/bin
# Add compiler libraries to run-time environment
_foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH
# Add gmp/mpfr libraries to run-time environment
_foamAddLib $gmpDir/lib
_foamAddLib $mpfrDir/lib
# Add mpc libraries (not need for older gcc) to run-time environment
if ( $?mpc_version ) then
_foamAddLib $mpcDir/lib
endif
# Used by boost/CGAL:
setenv MPFR_ARCH_PATH $mpfrDir
setenv GMP_ARCH_PATH $gmpDir
endif
unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
if ( $?clang_version ) then
set clangDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$clang_version
# Check that the compiler directory can be found
if ( ! -d "$clangDir" ) then
echo
echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " Cannot find $clangDir installation."
echo " Please install this compiler version or if you wish to" \
" use the system compiler,"
echo " change the 'WM_COMPILER_TYPE' setting to 'system'"
echo
endif
_foamAddMan $clangDir/man
_foamAddPath $clangDir/bin
endif
unset clang_version clangDir
breaksw
case system:
# Use system compiler
breaksw
default:
echo "Warn: WM_COMPILER_TYPE='$WM_COMPILER_TYPE' is unsupported"
echo " treating as 'system' instead"
breaksw
endsw
# Cleanup environment:
# ~~~~~~~~~~~~~~~~~~~~
#- keep _foamAddPath _foamAddLib _foamAddMan
unset minBufferSize
unsetenv WM_COMPILER_TYPE
#------------------------------------------------------------------------------

194
etc/config.csh/unset Normal file
View File

@ -0,0 +1,194 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ 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/config.csh/unset
#
# Description
# Clear as many OpenFOAM environment settings as possible
#
#------------------------------------------------------------------------------
# Clean standard environment variables (PATH, LD_LIBRARY_PATH, MANPATH)
unset foamClean
if ( $?WM_PROJECT_DIR ) then
set foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
if ( ! -f "$foamClean" || ! -x "$foamClean" ) unset foamClean
endif
set foamOldDirs=""
# The old dirs to be cleaned from the various environment variables
# - remove anything under top-level directory.
# NB: the WM_PROJECT_INST_DIR might not be identical between versions
#
if ( $?WM_PROJECT_INST_DIR ) then
set foamOldDirs="$WM_PROJECT_INST_DIR"
endif
if ( $?WM_PROJECT ) then
set foamOldDirs="$HOME/$WM_PROJECT/$LOGNAME $foamOldDirs"
endif
if ( $?WM_PROJECT_SITE ) then
set foamOldDirs="$WM_PROJECT_SITE $foamOldDirs"
endif
#------------------------------------------------------------------------------
# unset WM_* environment variables
unsetenv WM_ARCH
unsetenv WM_ARCH_OPTION
unsetenv WM_CC
unsetenv WM_CFLAGS
unsetenv WM_COMPILER
unsetenv WM_COMPILER_LIB_ARCH
unsetenv WM_COMPILE_OPTION
unsetenv WM_CXX
unsetenv WM_CXXFLAGS
unsetenv WM_DIR
unsetenv WM_HOSTS
unsetenv WM_LDFLAGS
unsetenv WM_LINK_LANGUAGE
unsetenv WM_MPLIB
unsetenv WM_NCOMPPROCS
unsetenv WM_OPTIONS
unsetenv WM_OSTYPE
unsetenv WM_PRECISION_OPTION
unsetenv WM_PROJECT
unsetenv WM_PROJECT_DIR
unsetenv WM_PROJECT_INST_DIR
unsetenv WM_PROJECT_SITE
unsetenv WM_PROJECT_USER_DIR
unsetenv WM_PROJECT_VERSION
unsetenv WM_SCHEDULER
unsetenv WM_THIRD_PARTY_DIR
#------------------------------------------------------------------------------
# unset FOAM_* environment variables
unsetenv FOAM_APPBIN
unsetenv FOAM_APP
unsetenv FOAM_EXT_LIBBIN
unsetenv FOAM_CODE_TEMPLATES
unsetenv FOAM_INST_DIR
unsetenv FOAM_JOB_DIR
unsetenv FOAM_LIBBIN
unsetenv FOAM_MPI
unsetenv FOAM_RUN
unsetenv FOAM_SETTINGS
unsetenv FOAM_SIGFPE
unsetenv FOAM_SIGNAN
unsetenv FOAM_SITE_APPBIN
unsetenv FOAM_SITE_LIBBIN
unsetenv FOAM_SOLVERS
unsetenv FOAM_SRC
unsetenv FOAM_TUTORIALS
unsetenv FOAM_USER_APPBIN
unsetenv FOAM_USER_LIBBIN
unsetenv FOAM_UTILITIES
#------------------------------------------------------------------------------
# unset MPI-related environment variables
unsetenv MPI_ARCH_PATH
unsetenv MPI_BUFFER_SIZE
unsetenv OPAL_PREFIX
#------------------------------------------------------------------------------
# unset Ensight/ParaView-related environment variables
unsetenv ENSIGHT9_READER
unsetenv CMAKE_HOME
unsetenv ParaView_DIR
unsetenv ParaView_INCLUDE_DIR
unsetenv PV_PLUGIN_PATH
#------------------------------------------------------------------------------
# cleanup environment
# PATH, LD_LIBRARY_PATH, MANPATH
if ( $?foamClean ) then
set cleaned=`$foamClean "$PATH" "$foamOldDirs"`
if ( $status == 0 ) setenv PATH $cleaned
if ($?LD_LIBRARY_PATH) then
set cleaned=`$foamClean "$LD_LIBRARY_PATH" "$foamOldDirs"`
if ( $status == 0 ) setenv LD_LIBRARY_PATH $cleaned
if ( ${%LD_LIBRARY_PATH} == 0 ) unsetenv LD_LIBRARY_PATH
endif
if ($?MANPATH) then
set cleaned=`$foamClean "$MANPATH" "$foamOldDirs"`
if ( $status == 0 ) setenv MANPATH $cleaned
if ( ${%MANPATH} == 0 ) unsetenv MANPATH
endif
endif
unset cleaned foamClean foamOldDirs
#------------------------------------------------------------------------------
# cleanup aliases
unalias wmSET
unalias wm64
unalias wm32
unalias wmSP
unalias wmDP
unalias wmUNSET
unalias wmSchedON
unalias wmSchedOFF
unalias foamPV
unalias src
unalias lib
unalias run
unalias foam
unalias foamsrc
unalias foamfv
unalias app
unalias util
unalias sol
unalias tut
unalias foamApps
unalias foamSol
unalias foamTuts
unalias foamUtils
unalias foam3rdParty
unalias foamSite
#------------------------------------------------------------------------------