FEATURE: Updates to coupled solver and linear solvers. Author: Hrvoje Jasak. Merge: Dominik Christ.
This commit is contained in:
commit
fac323eb99
61 changed files with 1813 additions and 250 deletions
33
ThirdParty/AllMake.stage1
vendored
33
ThirdParty/AllMake.stage1
vendored
|
@ -62,22 +62,35 @@ echo
|
||||||
|
|
||||||
# Gcc and companion libraries
|
# Gcc and companion libraries
|
||||||
#
|
#
|
||||||
# Uncomment the following 3 lines for gcc-4.4.5. You need gmp and mpfr for gcc-4.4.5
|
# Uncomment the following 4 lines for gcc-4.9.2. You need gmp, mpfr and mpc for gcc-4.9.2
|
||||||
#( rpm_make -p gmp-5.0.1 -s gmp-5.0.1.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz )
|
#( rpm_make -p gmp-5.1.2 -s gmp-5.1.2.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.1.2.tar.bz2 )
|
||||||
#( rpm_make -p mpfr-3.0.1 -s mpfr-3.0.1.spec -u ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.0.1.tar.gz )
|
#( rpm_make -p mpfr-3.1.2 -s mpfr-3.1.2.spec -u ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.2.tar.gz )
|
||||||
#( rpm_make -p gcc-4.4.5 -s gcc-4.4.5.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.4.5/gcc-4.4.5.tar.gz )
|
#( rpm_make -p mpc-1.0.1 -s mpc-1.0.1.spec -u http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz )
|
||||||
|
#( rpm_make -p gcc-4.9.2 -s gcc-4.9.2.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.gz )
|
||||||
|
#
|
||||||
|
# Uncomment the following 4 lines for gcc-4.7.4. You need gmp, mpfr and mpc for gcc-4.7.4
|
||||||
|
#( rpm_make -p gmp-5.1.2 -s gmp-5.1.2.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.1.2.tar.bz2 )
|
||||||
|
#( rpm_make -p mpfr-3.1.2 -s mpfr-3.1.2.spec -u ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.2.tar.gz )
|
||||||
|
#( rpm_make -p mpc-1.0.1 -s mpc-1.0.1.spec -u http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz )
|
||||||
|
#( rpm_make -p gcc-4.7.4 -s gcc-4.7.4.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.4/gcc-4.7.4.tar.gz )
|
||||||
|
#
|
||||||
|
# Uncomment the following 4 lines for gcc-4.6.4. You need gmp, mpfr and mpc for gcc-4.6.4
|
||||||
|
#( rpm_make -p gmp-5.1.2 -s gmp-5.1.2.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.1.2.tar.bz2 )
|
||||||
|
#( rpm_make -p mpfr-3.1.2 -s mpfr-3.1.2.spec -u ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.2.tar.gz )
|
||||||
|
#( rpm_make -p mpc-1.0.1 -s mpc-1.0.1.spec -u http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz )
|
||||||
|
#( rpm_make -p gcc-4.6.4 -s gcc-4.6.4.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.6.4/gcc-4.6.4.tar.gz )
|
||||||
#
|
#
|
||||||
# Uncomment the following 4 lines for gcc-4.5.1. You need gmp, mpfr and mpc for gcc-4.5.1
|
# Uncomment the following 4 lines for gcc-4.5.1. You need gmp, mpfr and mpc for gcc-4.5.1
|
||||||
#( rpm_make -p gmp-5.0.1 -s gmp-5.0.1.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz )
|
#( rpm_make -p gmp-5.0.1 -s gmp-5.0.1.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz )
|
||||||
#( rpm_make -p mpfr-3.0.1 -s mpfr-3.0.1.spec -u ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.0.1.tar.gz )
|
#( rpm_make -p mpfr-3.0.1 -s mpfr-3.0.1.spec -u ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.0.1.tar.gz )
|
||||||
#( rpm_make -p mpc-0.8.2 -s mpc-0.8.2.spec -u http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz )
|
#( rpm_make -p mpc-0.8.2 -s mpc-0.8.2.spec -u http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz )
|
||||||
#( rpm_make -p gcc-4.5.1 -s gcc-4.5.1.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.5.1/gcc-4.5.1.tar.gz )
|
#( rpm_make -p gcc-4.5.1 -s gcc-4.5.1.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.5.1/gcc-4.5.1.tar.gz )
|
||||||
|
#
|
||||||
# Uncomment the following 4 lines for gcc-4.6.3. You need gmp, mpfr and mpc for gcc-4.6.3
|
# Uncomment the following 3 lines for gcc-4.4.5. You need gmp and mpfr for gcc-4.4.5
|
||||||
#( rpm_make -p gmp-5.0.5 -s gmp-5.0.5.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.5.tar.bz2 )
|
#( rpm_make -p gmp-5.0.1 -s gmp-5.0.1.spec -u ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.gz )
|
||||||
#( rpm_make -p mpfr-3.1.0 -s mpfr-3.1.0.spec -u ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.0.tar.gz )
|
#( rpm_make -p mpfr-3.0.1 -s mpfr-3.0.1.spec -u ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.0.1.tar.gz )
|
||||||
#( rpm_make -p mpc-0.9 -s mpc-0.9.spec -u http://www.multiprecision.org/mpc/download/mpc-0.9.tar.gz )
|
#( rpm_make -p gcc-4.4.5 -s gcc-4.4.5.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.4.5/gcc-4.4.5.tar.gz )
|
||||||
#( rpm_make -p gcc-4.6.3 -s gcc-4.6.3.spec -u ftp://ftp.gnu.org/gnu/gcc/gcc-4.6.3/gcc-4.6.3.tar.gz )
|
#
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
#( rpm_make -p Python-2.7 -s Python-2.7.spec -u http://www.python.org/ftp/python/2.7/Python-2.7.tgz )
|
#( rpm_make -p Python-2.7 -s Python-2.7.spec -u http://www.python.org/ftp/python/2.7/Python-2.7.tgz )
|
||||||
|
|
12
ThirdParty/rpmBuild/SOURCES/ParaView-4.2.0.patch_darwin
vendored
Normal file
12
ThirdParty/rpmBuild/SOURCES/ParaView-4.2.0.patch_darwin
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
diff -ruN ParaView-4.2.0_orig/Applications/ParaView-4.2.0_extra_install_Darwin.cmake ParaView-4.2.0/Applications/ParaView-4.2.0_extra_install_Darwin.cmake
|
||||||
|
--- ParaView-4.2.0_orig/Applications/ParaView-4.2.0_extra_install_Darwin.cmake 1969-12-31 19:00:00.000000000 -0500
|
||||||
|
+++ ParaView-4.2.0/Applications/ParaView-4.2.0_extra_install_Darwin.cmake 2013-10-02 19:00:00.000000000 -0400
|
||||||
|
@@ -0,0 +1,8 @@
|
||||||
|
+#
|
||||||
|
+# Additional install rules for Mac OS X platforms
|
||||||
|
+#
|
||||||
|
+INSTALL (DIRECTORY ../../buildObj/bin/paraview.app
|
||||||
|
+ DESTINATION ${PV_INSTALL_BIN_DIR}
|
||||||
|
+ USE_SOURCE_PERMISSIONS
|
||||||
|
+ COMPONENT Runtime)
|
||||||
|
+
|
274
ThirdParty/rpmBuild/SPECS/ParaView-4.2.0.spec
vendored
Normal file
274
ThirdParty/rpmBuild/SPECS/ParaView-4.2.0.spec
vendored
Normal file
|
@ -0,0 +1,274 @@
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | foam-extend: Open Source CFD
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | For copyright notice see file Copyright
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of foam-extend.
|
||||||
|
#
|
||||||
|
# foam-extend 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.
|
||||||
|
#
|
||||||
|
# foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# RPM spec file for ParaView-4.2.0
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# RPM spec file for creating a relocatable RPM
|
||||||
|
#
|
||||||
|
# Authors:
|
||||||
|
# Martin Beaudoin, Hydro-Quebec, (2010)
|
||||||
|
# Andreas Feymark, Chalmers University of Technology, (2013)
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
|
||||||
|
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
|
||||||
|
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
|
||||||
|
|
||||||
|
# Disable the generation of debuginfo packages
|
||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
|
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
|
||||||
|
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
|
||||||
|
%define _tmppath %{_topdir}/tmp
|
||||||
|
|
||||||
|
# Will install the package directly $WM_THIRD_PARTY_DIR
|
||||||
|
# Some comments about package relocation:
|
||||||
|
# By using this prefix for the Prefix: parameter in this file, you will make this
|
||||||
|
# package relocatable.
|
||||||
|
#
|
||||||
|
# This is fine, as long as your software is itself relocatable.
|
||||||
|
#
|
||||||
|
# Simply take note that libraries built with libtool are not relocatable because the
|
||||||
|
# prefix we specify will be hard-coded in the library .la files.
|
||||||
|
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
|
||||||
|
#
|
||||||
|
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
|
||||||
|
# not be able to reutilize this RPM, even though it is relocatable. You will need to
|
||||||
|
# regenerate the RPM.
|
||||||
|
#
|
||||||
|
%define _prefix %{_WM_THIRD_PARTY_DIR}
|
||||||
|
|
||||||
|
%define name ParaView
|
||||||
|
%define release %{_WM_OPTIONS}
|
||||||
|
%define version 4.2.0
|
||||||
|
|
||||||
|
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
|
||||||
|
|
||||||
|
BuildRoot: %{buildroot}
|
||||||
|
Summary: ParaView
|
||||||
|
License: Unkown
|
||||||
|
Name: %{name}
|
||||||
|
Version: %{version}
|
||||||
|
Release: %{release}
|
||||||
|
URL: http://www.paraview.org/files/v4.2/
|
||||||
|
Source: %url/%{name}-v%{version}-source.tar.gz
|
||||||
|
Prefix: %{_prefix}
|
||||||
|
Group: Development/Tools
|
||||||
|
Patch0: paraview-4.2.0.patch_darwin
|
||||||
|
|
||||||
|
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Here, we define default compiling options for cmake
|
||||||
|
#
|
||||||
|
# One can override the option on the commande line : --define='MACRO EXPR'
|
||||||
|
#
|
||||||
|
%{!?_withVerbose: %define _withVerbose false}
|
||||||
|
%{!?_withMesa: %define _withMesa false}
|
||||||
|
%{!?_withMPI: %define _withMPI false}
|
||||||
|
%{!?_withPython: %define _withPython false}
|
||||||
|
%{!?_withQt: %define _withQt true}
|
||||||
|
%{!?_qmakePath: %define _qmakePath Undefined}
|
||||||
|
%{!?_mesaIncludePath: %define _mesaIncludePath Undefined}
|
||||||
|
%{!?_mesaLibPath: %define _mesaLibPath Undefined}
|
||||||
|
%{!?_pythonLibPath: %define _pythonLibPath Undefined}
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{summary}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{name}-v%{version}-source
|
||||||
|
|
||||||
|
%ifos darwin
|
||||||
|
%patch0 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%build
|
||||||
|
#
|
||||||
|
# set CMake cache variables
|
||||||
|
#
|
||||||
|
addCMakeVariable()
|
||||||
|
{
|
||||||
|
while [ -n "$1" ]
|
||||||
|
do
|
||||||
|
CMAKE_VARIABLES="$CMAKE_VARIABLES -D$1"
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# export WM settings in a form that GNU configure recognizes
|
||||||
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
||||||
|
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
||||||
|
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
||||||
|
|
||||||
|
set +x
|
||||||
|
echo ""
|
||||||
|
echo "Compilation options:"
|
||||||
|
echo " _withVerbose : %{_withVerbose}"
|
||||||
|
echo " _withMesa : %{_withMesa}"
|
||||||
|
echo " _withMPI : %{_withMPI}"
|
||||||
|
echo " _withPython : %{_withPython}"
|
||||||
|
echo " _withQt : %{_withQt}"
|
||||||
|
echo " _qmakePath : %{_qmakePath}"
|
||||||
|
echo " _mesaIncludePath : %{_mesaIncludePath}"
|
||||||
|
echo " _mesaLibPath : %{_mesaLibPath}"
|
||||||
|
echo " _pythonLibPath : %{_pythonLibPath}"
|
||||||
|
echo ""
|
||||||
|
set -x
|
||||||
|
|
||||||
|
# start with these general settings
|
||||||
|
addCMakeVariable VTK_USE_TK:BOOL=OFF
|
||||||
|
addCMakeVariable BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF
|
||||||
|
addCMakeVariable CMAKE_BUILD_TYPE:STRING=Release
|
||||||
|
|
||||||
|
# include development files in "make install"
|
||||||
|
addCMakeVariable PARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON
|
||||||
|
|
||||||
|
# new alternative to "make HTMLDocumentation"
|
||||||
|
addCMakeVariable PARAVIEW_GENERATE_PROXY_DOCUMENTATION:BOOL=ON
|
||||||
|
|
||||||
|
%ifos darwin
|
||||||
|
# Additional installation rules for Mac OS X
|
||||||
|
addCMakeVariable PARAVIEW_EXTRA_INSTALL_RULES_FILE:FILEPATH=%{_topdir}/BUILD/%{name}-%{version}/Applications/ParaView-3.8.1_extra_install_Darwin.cmake
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Add the value of _qmakePath for QT_QMAKE_EXECUTABLE
|
||||||
|
addCMakeVariable QT_QMAKE_EXECUTABLE:FILEPATH=%{_qmakePath}
|
||||||
|
|
||||||
|
echo "CMAKE_VARIABLES: $CMAKE_VARIABLES"
|
||||||
|
|
||||||
|
mkdir -p ./buildObj
|
||||||
|
cd ./buildObj
|
||||||
|
|
||||||
|
cmake \
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH=%{_installPrefix} \
|
||||||
|
$CMAKE_VARIABLES \
|
||||||
|
..
|
||||||
|
|
||||||
|
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
|
||||||
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
|
%install
|
||||||
|
# On OpenSUSE, rpmbuild, will choke when detecting unreferenced symlinks
|
||||||
|
# created during installation.
|
||||||
|
# Qt version 4.6.3 will generate some unreferenced symlinks when
|
||||||
|
# ParaView is compiled and installed. By enabling the following
|
||||||
|
# environment variable, the command brp-symlink will still complain
|
||||||
|
# about missing link targets, but it won't stop rpmbuild from generating
|
||||||
|
# the final rpm.
|
||||||
|
# For all other Unix distros, this is a no-op.
|
||||||
|
export NO_BRP_STALE_LINK_ERROR=yes
|
||||||
|
|
||||||
|
cd buildObj
|
||||||
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
# Creation of foam-extend specific .csh and .sh files"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Generating foam-extend specific .csh and .sh files for the package %{name}-%{version}"
|
||||||
|
echo ""
|
||||||
|
#
|
||||||
|
# Generate package specific .sh file for foam-extend
|
||||||
|
#
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
|
||||||
|
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
|
||||||
|
# Load %{name}-%{version} libraries and binaries if available
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export PARAVIEW_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||||
|
export PARAVIEW_BIN_DIR=\$PARAVIEW_DIR/bin
|
||||||
|
export PARAVIEW_LIB_DIR=\$PARAVIEW_DIR/lib
|
||||||
|
export PARAVIEW_INCLUDE_DIR=\$PARAVIEW_DIR/include/paraview-4.2
|
||||||
|
|
||||||
|
export PARAVIEW_VERSION=%{version}
|
||||||
|
|
||||||
|
# NB: It is important to set the PV_PLUGIN_PATH location to a directory containing only the ParaView plugins.
|
||||||
|
# Otherwise, paraview will try to automatically autoload each and every dynamic library it can find in the
|
||||||
|
# specified directory to see if a given library is a paraview plugin.
|
||||||
|
# In the case of \$FOAM_LIBBIN, with over 80 libraries, this is a total waste of time that will slow down the
|
||||||
|
# startup of paraview or even make paraview crash on startup.
|
||||||
|
export PV_PLUGIN_PATH=\$FOAM_LIBBIN/paraview_plugins
|
||||||
|
|
||||||
|
[ -d \$PARAVIEW_LIB_DIR/paraview-4.2 ] && _foamAddLib \$PARAVIEW_LIB_DIR/paraview-4.2
|
||||||
|
|
||||||
|
# Enable access to the package applications if present
|
||||||
|
[ -d \$PARAVIEW_BIN_DIR ] && _foamAddPath \$PARAVIEW_BIN_DIR
|
||||||
|
|
||||||
|
# Additional binary path if running on Mac OS X
|
||||||
|
[ -d \$PARAVIEW_BIN_DIR/paraview.app/Contents/MacOS ] && _foamAddPath \$PARAVIEW_BIN_DIR/paraview.app/Contents/MacOS
|
||||||
|
|
||||||
|
DOT_SH_EOF
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate package specific .csh file for foam-extend
|
||||||
|
#
|
||||||
|
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
|
||||||
|
# Load %{name}-%{version} libraries and binaries if available
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
setenv PARAVIEW_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||||
|
setenv PARAVIEW_BIN_DIR \$PARAVIEW_DIR/bin
|
||||||
|
setenv PARAVIEW_LIB_DIR \$PARAVIEW_DIR/lib
|
||||||
|
setenv PARAVIEW_INCLUDE_DIR \$PARAVIEW_DIR/include/paraview-4.2
|
||||||
|
|
||||||
|
setenv PARAVIEW_VERSION %{version}
|
||||||
|
|
||||||
|
# NB: It is important to set the PV_PLUGIN_PATH location to a directory containing only the ParaView plugins.
|
||||||
|
# Otherwise, paraview will try to automatically autoload each and every dynamic library it can find in the
|
||||||
|
# specified directory to see if a given library is a paraview plugin.
|
||||||
|
# In the case of \$FOAM_LIBBIN, with over 80 libraries, this is a total waste of time that will slow down the
|
||||||
|
# startup of paraview or even make paraview crash on startup.
|
||||||
|
setenv PV_PLUGIN_PATH \$FOAM_LIBBIN/paraview_plugins
|
||||||
|
|
||||||
|
if ( -e \$PARAVIEW_BIN_DIR ) then
|
||||||
|
_foamAddPath \$PARAVIEW_BIN_DIR
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ( -e \$PARAVIEW_LIB_DIR/paraview-4.2 ) then
|
||||||
|
_foamAddLib \$PARAVIEW_LIB_DIR/paraview-4.2
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
# Additional binary path if running on Mac OS X
|
||||||
|
if ( -e \$PARAVIEW_BIN_DIR/paraview.app/Contents/MacOS ) then
|
||||||
|
_foamAddPath \$PARAVIEW_BIN_DIR/paraview.app/Contents/MacOS
|
||||||
|
endif
|
||||||
|
DOT_CSH_EOF
|
||||||
|
|
||||||
|
#finally, generate a .tgz file for systems where using rpm for installing packages
|
||||||
|
# as a non-root user might be a problem.
|
||||||
|
(mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||||
|
|
||||||
|
%clean
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_installPrefix}
|
||||||
|
|
174
ThirdParty/rpmBuild/SPECS/gcc-4.7.4.spec
vendored
Normal file
174
ThirdParty/rpmBuild/SPECS/gcc-4.7.4.spec
vendored
Normal file
|
@ -0,0 +1,174 @@
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | foam-extend: Open Source CFD
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | For copyright notice see file Copyright
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of foam-extend.
|
||||||
|
#
|
||||||
|
# foam-extend 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.
|
||||||
|
#
|
||||||
|
# foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# RPM spec file for gcc-4.7.4
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# RPM spec file for creating a relocatable RPM
|
||||||
|
#
|
||||||
|
# Author:
|
||||||
|
# Hrvoje Jasak, Wikki Ltd. (2015)
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
|
||||||
|
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
|
||||||
|
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
|
||||||
|
|
||||||
|
# Disable the generation of debuginfo packages
|
||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
|
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
|
||||||
|
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
|
||||||
|
%define _tmppath %{_topdir}/tmp
|
||||||
|
|
||||||
|
# Will install the package directly $WM_THIRD_PARTY_DIR
|
||||||
|
# Some comments about package relocation:
|
||||||
|
# By using this prefix for the Prefix: parameter in thi file, you will make this
|
||||||
|
# package relocatable.
|
||||||
|
#
|
||||||
|
# This is fine, as long as your software is itself relocatable.
|
||||||
|
#
|
||||||
|
# Simply take note that libraries built with libtool are not relocatable because the
|
||||||
|
# prefix we specify will be hard-coded in the library .la files.
|
||||||
|
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
|
||||||
|
#
|
||||||
|
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
|
||||||
|
# not be able to reutilize this RPM, even though it is relocatable. You will need to
|
||||||
|
# regenerate the RPM.
|
||||||
|
#
|
||||||
|
%define _prefix %{_WM_THIRD_PARTY_DIR}
|
||||||
|
|
||||||
|
%define name gcc
|
||||||
|
%define release %{_WM_OPTIONS}
|
||||||
|
%define version 4.7.4
|
||||||
|
|
||||||
|
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
|
||||||
|
|
||||||
|
BuildRoot: %{buildroot}
|
||||||
|
Summary: gcc
|
||||||
|
License: Unkown
|
||||||
|
Name: %{name}
|
||||||
|
Version: %{version}
|
||||||
|
Release: %{release}
|
||||||
|
URL: ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.4
|
||||||
|
Source: %url/%{name}-%{version}.tar.gz
|
||||||
|
Prefix: %{_prefix}
|
||||||
|
Group: Development/Tools
|
||||||
|
|
||||||
|
|
||||||
|
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{summary}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%build
|
||||||
|
# export WM settings in a form that GNU configure recognizes
|
||||||
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
||||||
|
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
||||||
|
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
||||||
|
|
||||||
|
GMP_VERSION=gmp-5.1.2
|
||||||
|
MPFR_VERSION=mpfr-3.1.2
|
||||||
|
MPC_VERSION=mpc-1.0.1
|
||||||
|
|
||||||
|
mkdir ./objBuildDir
|
||||||
|
cd ./objBuildDir
|
||||||
|
|
||||||
|
../configure \
|
||||||
|
--prefix=%{_installPrefix} \
|
||||||
|
--enable-languages=c,c++ \
|
||||||
|
--enable-shared \
|
||||||
|
--disable-multilib \
|
||||||
|
--with-mpc=$WM_THIRD_PARTY_DIR/packages/$MPC_VERSION/platforms/$WM_OPTIONS \
|
||||||
|
--with-gmp=$WM_THIRD_PARTY_DIR/packages/$GMP_VERSION/platforms/$WM_OPTIONS \
|
||||||
|
--with-mpfr=$WM_THIRD_PARTY_DIR/packages/$MPFR_VERSION/platforms/$WM_OPTIONS
|
||||||
|
|
||||||
|
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
|
||||||
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
|
%install
|
||||||
|
cd ./objBuildDir
|
||||||
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
# Creation of foam-extend specific .csh and .sh files"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Generating foam-extend specific .csh and .sh files for the package %{name}-%{version}"
|
||||||
|
echo ""
|
||||||
|
#
|
||||||
|
# Generate package specific .sh file for foam-extend
|
||||||
|
#
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
|
||||||
|
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
|
||||||
|
# Load %{name}-%{version} libraries and binaries if available
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export GCC_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||||
|
|
||||||
|
[ -d \$GCC_DIR/lib ] && _foamAddLib \$GCC_DIR/lib
|
||||||
|
|
||||||
|
[ -d \$GCC_DIR/lib64 ] && _foamAddLib \$GCC_DIR/lib64
|
||||||
|
|
||||||
|
# Enable access to the package applications if present
|
||||||
|
[ -d \$GCC_DIR/bin ] && _foamAddPath \$GCC_DIR/bin
|
||||||
|
DOT_SH_EOF
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate package specific .csh file for foam-extend
|
||||||
|
#
|
||||||
|
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
|
||||||
|
# Load %{name}-%{version} libraries and binaries if available
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
setenv GCC_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||||
|
|
||||||
|
if ( -e \$GCC_DIR/lib ) then
|
||||||
|
_foamAddLib \$GCC_DIR/lib
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ( -e \$GCC_DIR/lib64 ) then
|
||||||
|
_foamAddLib \$GCC_DIR/lib64
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ( -e \$GCC_DIR/bin ) then
|
||||||
|
_foamAddPath \$GCC_DIR/bin
|
||||||
|
endif
|
||||||
|
DOT_CSH_EOF
|
||||||
|
|
||||||
|
#finally, generate a .tgz file for systems where using rpm for installing packages
|
||||||
|
# as a non-root user might be a problem.
|
||||||
|
(mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||||
|
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_installPrefix}
|
174
ThirdParty/rpmBuild/SPECS/gcc-4.9.2.spec
vendored
Normal file
174
ThirdParty/rpmBuild/SPECS/gcc-4.9.2.spec
vendored
Normal file
|
@ -0,0 +1,174 @@
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | foam-extend: Open Source CFD
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | For copyright notice see file Copyright
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of foam-extend.
|
||||||
|
#
|
||||||
|
# foam-extend 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.
|
||||||
|
#
|
||||||
|
# foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# RPM spec file for gcc-4.9.2
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# RPM spec file for creating a relocatable RPM
|
||||||
|
#
|
||||||
|
# Author:
|
||||||
|
# Hrvoje Jasak, Wikki Ltd. (2015)
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
|
||||||
|
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
|
||||||
|
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
|
||||||
|
|
||||||
|
# Disable the generation of debuginfo packages
|
||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
|
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
|
||||||
|
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
|
||||||
|
%define _tmppath %{_topdir}/tmp
|
||||||
|
|
||||||
|
# Will install the package directly $WM_THIRD_PARTY_DIR
|
||||||
|
# Some comments about package relocation:
|
||||||
|
# By using this prefix for the Prefix: parameter in thi file, you will make this
|
||||||
|
# package relocatable.
|
||||||
|
#
|
||||||
|
# This is fine, as long as your software is itself relocatable.
|
||||||
|
#
|
||||||
|
# Simply take note that libraries built with libtool are not relocatable because the
|
||||||
|
# prefix we specify will be hard-coded in the library .la files.
|
||||||
|
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
|
||||||
|
#
|
||||||
|
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
|
||||||
|
# not be able to reutilize this RPM, even though it is relocatable. You will need to
|
||||||
|
# regenerate the RPM.
|
||||||
|
#
|
||||||
|
%define _prefix %{_WM_THIRD_PARTY_DIR}
|
||||||
|
|
||||||
|
%define name gcc
|
||||||
|
%define release %{_WM_OPTIONS}
|
||||||
|
%define version 4.9.2
|
||||||
|
|
||||||
|
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
|
||||||
|
|
||||||
|
BuildRoot: %{buildroot}
|
||||||
|
Summary: gcc
|
||||||
|
License: Unkown
|
||||||
|
Name: %{name}
|
||||||
|
Version: %{version}
|
||||||
|
Release: %{release}
|
||||||
|
URL: ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.2
|
||||||
|
Source: %url/%{name}-%{version}.tar.gz
|
||||||
|
Prefix: %{_prefix}
|
||||||
|
Group: Development/Tools
|
||||||
|
|
||||||
|
|
||||||
|
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{summary}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%build
|
||||||
|
# export WM settings in a form that GNU configure recognizes
|
||||||
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
||||||
|
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
||||||
|
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
||||||
|
|
||||||
|
GMP_VERSION=gmp-5.1.2
|
||||||
|
MPFR_VERSION=mpfr-3.1.2
|
||||||
|
MPC_VERSION=mpc-1.0.1
|
||||||
|
|
||||||
|
mkdir ./objBuildDir
|
||||||
|
cd ./objBuildDir
|
||||||
|
|
||||||
|
../configure \
|
||||||
|
--prefix=%{_installPrefix} \
|
||||||
|
--enable-languages=c,c++ \
|
||||||
|
--enable-shared \
|
||||||
|
--disable-multilib \
|
||||||
|
--with-mpc=$WM_THIRD_PARTY_DIR/packages/$MPC_VERSION/platforms/$WM_OPTIONS \
|
||||||
|
--with-gmp=$WM_THIRD_PARTY_DIR/packages/$GMP_VERSION/platforms/$WM_OPTIONS \
|
||||||
|
--with-mpfr=$WM_THIRD_PARTY_DIR/packages/$MPFR_VERSION/platforms/$WM_OPTIONS
|
||||||
|
|
||||||
|
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
|
||||||
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
|
%install
|
||||||
|
cd ./objBuildDir
|
||||||
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
# Creation of foam-extend specific .csh and .sh files"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Generating foam-extend specific .csh and .sh files for the package %{name}-%{version}"
|
||||||
|
echo ""
|
||||||
|
#
|
||||||
|
# Generate package specific .sh file for foam-extend
|
||||||
|
#
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
|
||||||
|
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
|
||||||
|
# Load %{name}-%{version} libraries and binaries if available
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export GCC_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||||
|
|
||||||
|
[ -d \$GCC_DIR/lib ] && _foamAddLib \$GCC_DIR/lib
|
||||||
|
|
||||||
|
[ -d \$GCC_DIR/lib64 ] && _foamAddLib \$GCC_DIR/lib64
|
||||||
|
|
||||||
|
# Enable access to the package applications if present
|
||||||
|
[ -d \$GCC_DIR/bin ] && _foamAddPath \$GCC_DIR/bin
|
||||||
|
DOT_SH_EOF
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate package specific .csh file for foam-extend
|
||||||
|
#
|
||||||
|
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
|
||||||
|
# Load %{name}-%{version} libraries and binaries if available
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
setenv GCC_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||||
|
|
||||||
|
if ( -e \$GCC_DIR/lib ) then
|
||||||
|
_foamAddLib \$GCC_DIR/lib
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ( -e \$GCC_DIR/lib64 ) then
|
||||||
|
_foamAddLib \$GCC_DIR/lib64
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ( -e \$GCC_DIR/bin ) then
|
||||||
|
_foamAddPath \$GCC_DIR/bin
|
||||||
|
endif
|
||||||
|
DOT_CSH_EOF
|
||||||
|
|
||||||
|
#finally, generate a .tgz file for systems where using rpm for installing packages
|
||||||
|
# as a non-root user might be a problem.
|
||||||
|
(mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||||
|
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_installPrefix}
|
155
ThirdParty/rpmBuild/SPECS/gmp-4.3.2.spec
vendored
Normal file
155
ThirdParty/rpmBuild/SPECS/gmp-4.3.2.spec
vendored
Normal file
|
@ -0,0 +1,155 @@
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | foam-extend: Open Source CFD
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | For copyright notice see file Copyright
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of foam-extend.
|
||||||
|
#
|
||||||
|
# foam-extend 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.
|
||||||
|
#
|
||||||
|
# foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# RPM spec file for gmp-4.3.2
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# RPM spec file for creating a relocatable RPM
|
||||||
|
#
|
||||||
|
# Author:
|
||||||
|
# Martin Beaudoin, Hydro-Quebec, (2010)
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
|
||||||
|
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
|
||||||
|
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
|
||||||
|
|
||||||
|
# Disable the generation of debuginfo packages
|
||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
|
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
|
||||||
|
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
|
||||||
|
%define _tmppath %{_topdir}/tmp
|
||||||
|
|
||||||
|
# Will install the package directly $WM_THIRD_PARTY_DIR
|
||||||
|
# Some comments about package relocation:
|
||||||
|
# By using this prefix for the Prefix: parameter in thi file, you will make this
|
||||||
|
# package relocatable.
|
||||||
|
#
|
||||||
|
# This is fine, as long as your software is itself relocatable.
|
||||||
|
#
|
||||||
|
# Simply take note that libraries built with libtool are not relocatable because the
|
||||||
|
# prefix we specify will be hard-coded in the library .la files.
|
||||||
|
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
|
||||||
|
#
|
||||||
|
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
|
||||||
|
# not be able to reutilize this RPM, even though it is relocatable. You will need to
|
||||||
|
# regenerate the RPM.
|
||||||
|
#
|
||||||
|
%define _prefix %{_WM_THIRD_PARTY_DIR}
|
||||||
|
|
||||||
|
%define name gmp
|
||||||
|
%define release %{_WM_OPTIONS}
|
||||||
|
%define version 4.3.2
|
||||||
|
|
||||||
|
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
|
||||||
|
|
||||||
|
BuildRoot: %{buildroot}
|
||||||
|
Summary: gmp
|
||||||
|
License: Unkown
|
||||||
|
Name: %{name}
|
||||||
|
Version: %{version}
|
||||||
|
Release: %{release}
|
||||||
|
URL: ftp://ftp.gnu.org/gnu/gmp
|
||||||
|
Source: %url/%{name}-%{version}.tar.bz2
|
||||||
|
Prefix: %{_prefix}
|
||||||
|
Group: Development/Tools
|
||||||
|
|
||||||
|
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{summary}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%build
|
||||||
|
# export WM settings in a form that GNU configure recognizes
|
||||||
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
||||||
|
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
||||||
|
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
||||||
|
|
||||||
|
./configure --prefix=%{_installPrefix}
|
||||||
|
|
||||||
|
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
|
||||||
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
|
%install
|
||||||
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
# Creation of foam-extend specific .csh and .sh files"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Generating foam-extend specific .csh and .sh files for the package %{name}-%{version}"
|
||||||
|
echo ""
|
||||||
|
#
|
||||||
|
# Generate package specific .sh file for foam-extend
|
||||||
|
#
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
|
||||||
|
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
|
||||||
|
# Load %{name}-%{version} libraries and binaries if available
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export GMP_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||||
|
|
||||||
|
[ -d \$GMP_DIR/lib ] && _foamAddLib \$GMP_DIR/lib
|
||||||
|
|
||||||
|
# Enable access to the package applications if present
|
||||||
|
[ -d \$GMP_DIR/bin ] && _foamAddPath \$GMP_DIR/bin
|
||||||
|
DOT_SH_EOF
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate package specific .csh file for foam-extend
|
||||||
|
#
|
||||||
|
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
|
||||||
|
# Load %{name}-%{version} libraries and binaries if available
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
setenv GMP_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||||
|
|
||||||
|
if ( -e \$GMP_DIR/lib ) then
|
||||||
|
_foamAddLib \$GMP_DIR/lib
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ( -e \$GMP_DIR/bin ) then
|
||||||
|
_foamAddPath \$GMP_DIR/bin
|
||||||
|
endif
|
||||||
|
DOT_CSH_EOF
|
||||||
|
|
||||||
|
#finally, generate a .tgz file for systems where using rpm for installing packages
|
||||||
|
# as a non-root user might be a problem.
|
||||||
|
(mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_installPrefix}/etc
|
||||||
|
%{_installPrefix}/include
|
||||||
|
%{_installPrefix}/lib
|
||||||
|
%{_installPrefix}/share
|
||||||
|
|
157
ThirdParty/rpmBuild/SPECS/mpfr-2.4.2.spec
vendored
Normal file
157
ThirdParty/rpmBuild/SPECS/mpfr-2.4.2.spec
vendored
Normal file
|
@ -0,0 +1,157 @@
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | foam-extend: Open Source CFD
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | For copyright notice see file Copyright
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of foam-extend.
|
||||||
|
#
|
||||||
|
# foam-extend 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.
|
||||||
|
#
|
||||||
|
# foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# RPM spec file for mpfr-2.4.2
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# RPM spec file for creating a relocatable RPM
|
||||||
|
#
|
||||||
|
# Author:
|
||||||
|
# Martin Beaudoin, Hydro-Quebec, (2010)
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
|
||||||
|
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
|
||||||
|
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
|
||||||
|
|
||||||
|
# Disable the generation of debuginfo packages
|
||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
|
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
|
||||||
|
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
|
||||||
|
%define _tmppath %{_topdir}/tmp
|
||||||
|
|
||||||
|
# Will install the package directly $WM_THIRD_PARTY_DIR
|
||||||
|
# Some comments about package relocation:
|
||||||
|
# By using this prefix for the Prefix: parameter in thi file, you will make this
|
||||||
|
# package relocatable.
|
||||||
|
#
|
||||||
|
# This is fine, as long as your software is itself relocatable.
|
||||||
|
#
|
||||||
|
# Simply take note that libraries built with libtool are not relocatable because the
|
||||||
|
# prefix we specify will be hard-coded in the library .la files.
|
||||||
|
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
|
||||||
|
#
|
||||||
|
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
|
||||||
|
# not be able to reutilize this RPM, even though it is relocatable. You will need to
|
||||||
|
# regenerate the RPM.
|
||||||
|
#
|
||||||
|
%define _prefix %{_WM_THIRD_PARTY_DIR}
|
||||||
|
|
||||||
|
%define name mpfr
|
||||||
|
%define release %{_WM_OPTIONS}
|
||||||
|
%define version 2.4.2
|
||||||
|
|
||||||
|
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
|
||||||
|
|
||||||
|
BuildRoot: %{buildroot}
|
||||||
|
Summary: mpfr
|
||||||
|
License: Unkown
|
||||||
|
Name: %{name}
|
||||||
|
Version: %{version}
|
||||||
|
Release: %{release}
|
||||||
|
URL: http://www.mpfr.org/mpfr-current
|
||||||
|
Source: %url/%{name}-%{version}.tar.gz
|
||||||
|
Prefix: %{_prefix}
|
||||||
|
Group: Development/Tools
|
||||||
|
|
||||||
|
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{summary}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%build
|
||||||
|
# export WM settings in a form that GNU configure recognizes
|
||||||
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
||||||
|
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
||||||
|
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
||||||
|
|
||||||
|
GMP_VERSION=gmp-5.1.2
|
||||||
|
./configure \
|
||||||
|
--prefix=%{_installPrefix} \
|
||||||
|
--with-gmp=$WM_THIRD_PARTY_DIR/packages/$GMP_VERSION/platforms/$WM_OPTIONS
|
||||||
|
|
||||||
|
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
|
||||||
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
|
%install
|
||||||
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
|
# Creation of foam-extend specific .csh and .sh files"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Generating foam-extend specific .csh and .sh files for the package %{name}-%{version}"
|
||||||
|
echo ""
|
||||||
|
#
|
||||||
|
# Generate package specific .sh file for foam-extend
|
||||||
|
#
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
|
||||||
|
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
|
||||||
|
# Load %{name}-%{version} libraries and binaries if available
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export MPFR_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||||
|
|
||||||
|
[ -d \$MPFR_DIR/lib ] && _foamAddLib \$MPFR_DIR/lib
|
||||||
|
|
||||||
|
# Enable access to the package applications if present
|
||||||
|
[ -d \$MPFR_DIR/bin ] && _foamAddPath \$MPFR_DIR/bin
|
||||||
|
DOT_SH_EOF
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate package specific .csh file for foam-extend
|
||||||
|
#
|
||||||
|
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
|
||||||
|
# Load %{name}-%{version} libraries and binaries if available
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
setenv MPFR_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||||
|
|
||||||
|
if ( -e \$MPFR_DIR/lib ) then
|
||||||
|
_foamAddLib \$MPFR_DIR/lib
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ( -e \$MPFR_DIR/bin ) then
|
||||||
|
_foamAddPath \$MPFR_DIR/bin
|
||||||
|
endif
|
||||||
|
DOT_CSH_EOF
|
||||||
|
|
||||||
|
#finally, generate a .tgz file for systems where using rpm for installing packages
|
||||||
|
# as a non-root user might be a problem.
|
||||||
|
(mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||||
|
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_installPrefix}
|
||||||
|
|
183
ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.8.6.spec
vendored
Normal file
183
ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.8.6.spec
vendored
Normal file
|
@ -0,0 +1,183 @@
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | foam-extend: Open Source CFD
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | For copyright notice see file Copyright
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of foam-extend.
|
||||||
|
#
|
||||||
|
# foam-extend 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.
|
||||||
|
#
|
||||||
|
# foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# RPM spec file for qt-everywhere-opensource-src-4.8.6
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# RPM spec file for creating a relocatable RPM
|
||||||
|
#
|
||||||
|
# Author:
|
||||||
|
# Martin Beaudoin, Hydro-Quebec, (2014)
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
|
||||||
|
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
|
||||||
|
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
|
||||||
|
|
||||||
|
# Disable the generation of debuginfo packages
|
||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
|
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
|
||||||
|
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
|
||||||
|
%define _tmppath %{_topdir}/tmp
|
||||||
|
|
||||||
|
# Will install the package directly $WM_THIRD_PARTY_DIR
|
||||||
|
# Some comments about package relocation:
|
||||||
|
# By using this prefix for the Prefix: parameter in this file, you will make this
|
||||||
|
# package relocatable.
|
||||||
|
#
|
||||||
|
# This is fine, as long as your software is itself relocatable.
|
||||||
|
#
|
||||||
|
# Simply take note that libraries built with libtool are not relocatable because the
|
||||||
|
# prefix we specify will be hard-coded in the library .la files.
|
||||||
|
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
|
||||||
|
#
|
||||||
|
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
|
||||||
|
# not be able to reutilize this RPM, even though it is relocatable. You will need to
|
||||||
|
# regenerate the RPM.
|
||||||
|
#
|
||||||
|
%define _prefix %{_WM_THIRD_PARTY_DIR}
|
||||||
|
|
||||||
|
%define name qt-everywhere-opensource-src
|
||||||
|
%define release %{_WM_OPTIONS}
|
||||||
|
%define version 4.8.6
|
||||||
|
|
||||||
|
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
|
||||||
|
|
||||||
|
%define _unpackaged_files_terminate_build 0
|
||||||
|
%define _missing_doc_files_terminate_build 0
|
||||||
|
|
||||||
|
BuildRoot: %{buildroot}
|
||||||
|
Summary: qt-everywhere-opensource-src
|
||||||
|
License: Unkown
|
||||||
|
Name: %{name}
|
||||||
|
Version: %{version}
|
||||||
|
Release: %{release}
|
||||||
|
URL: http://download.qt-project.org/official_releases/qt/4.8/4.8.6
|
||||||
|
Source: %url/%{name}-%{version}.tar.gz
|
||||||
|
Prefix: %{_prefix}
|
||||||
|
Group: Development/Tools
|
||||||
|
|
||||||
|
|
||||||
|
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{summary}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%build
|
||||||
|
# export WM settings in a form that GNU configure recognizes
|
||||||
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
||||||
|
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
||||||
|
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
||||||
|
|
||||||
|
%ifos darwin
|
||||||
|
# Under Mac OS X, Qt 4.8 will only compile using the stock native g++ compiler supplied with Xcode.
|
||||||
|
# If your native Mac OS X g++ compiler is not located under /usr/bin, simply adjust the redefinition of the following variables accordingly.
|
||||||
|
# This is ugly, I know...
|
||||||
|
export CC=/usr/bin/gcc
|
||||||
|
export CXX=/usr/bin/g++
|
||||||
|
export PATH=/usr/bin:$PATH
|
||||||
|
%endif
|
||||||
|
|
||||||
|
./configure \
|
||||||
|
-opensource --confirm-license=yes \
|
||||||
|
-release -shared \
|
||||||
|
-nomake examples -nomake demos \
|
||||||
|
--prefix=%{_installPrefix}
|
||||||
|
|
||||||
|
# Explicitely specify LD_LIBRARY_PATH so it can find QT own libraries
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/lib
|
||||||
|
|
||||||
|
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
|
||||||
|
make -j $WM_NCOMPPROCS
|
||||||
|
|
||||||
|
%install
|
||||||
|
# Makefiles generated by qmake do not to support the DESTDIR= option
|
||||||
|
# We need to use the INSTALL_ROOT= option instead
|
||||||
|
|
||||||
|
# Somehow, we need to clean up for the RPM to install properly
|
||||||
|
rm -rf %{_installPrefix}
|
||||||
|
|
||||||
|
make install INSTALL_ROOT=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
# Creation of foam-extend specific .csh and .sh files"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Generating foam-extend specific .csh and .sh files for the package %{name}-%{version}"
|
||||||
|
echo ""
|
||||||
|
#
|
||||||
|
# Generate package specific .sh file for foam-extend
|
||||||
|
#
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
|
||||||
|
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
|
||||||
|
# Load %{name}-%{version} libraries and binaries if available
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export QT_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||||
|
export QT_BIN_DIR=\$QT_DIR/bin
|
||||||
|
export QT_LIB_DIR=\$QT_DIR/lib
|
||||||
|
|
||||||
|
# Enable access to the runtime package applications
|
||||||
|
[ -d \$QT_BIN_DIR ] && _foamAddPath \$QT_BIN_DIR
|
||||||
|
[ -d \$QT_LIB_DIR ] && _foamAddLib \$QT_LIB_DIR
|
||||||
|
DOT_SH_EOF
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate package specific .csh file for foam-extend
|
||||||
|
#
|
||||||
|
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
|
||||||
|
# Load %{name}-%{version} libraries and binaries if available
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
setenv QT_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||||
|
setenv QT_BIN_DIR \$QT_DIR/bin
|
||||||
|
setenv QT_LIB_DIR \$QT_DIR/lib
|
||||||
|
|
||||||
|
if ( -e \$QT_BIN_DIR ) then
|
||||||
|
_foamAddPath \$QT_BIN_DIR
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ( -e \$QT_LIB_DIR ) then
|
||||||
|
_foamAddLib \$QT_LIB_DIR
|
||||||
|
endif
|
||||||
|
DOT_CSH_EOF
|
||||||
|
|
||||||
|
#finally, generate a .tgz file for systems where using rpm for installing packages
|
||||||
|
# as a non-root user might be a problem.
|
||||||
|
(mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version})
|
||||||
|
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_installPrefix}
|
||||||
|
|
||||||
|
|
32
applications/solvers/coupled/pUCoupledFoam/boundPU.H
Normal file
32
applications/solvers/coupled/pUCoupledFoam/boundPU.H
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
// Bound the pressure
|
||||||
|
dimensionedScalar p1 = min(p);
|
||||||
|
dimensionedScalar p2 = max(p);
|
||||||
|
|
||||||
|
if (p1 < pMin || p2 > pMax)
|
||||||
|
{
|
||||||
|
Info<< "p: " << p1.value() << " " << p2.value()
|
||||||
|
<< ". Bounding." << endl;
|
||||||
|
|
||||||
|
p.max(pMin);
|
||||||
|
p.min(pMax);
|
||||||
|
p.correctBoundaryConditions();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bound the velocity
|
||||||
|
volScalarField magU = mag(U);
|
||||||
|
dimensionedScalar U1 = max(magU);
|
||||||
|
|
||||||
|
if (U1 > UMax)
|
||||||
|
{
|
||||||
|
Info<< "U: " << U1.value() << ". Bounding." << endl;
|
||||||
|
|
||||||
|
volScalarField Ulimiter = pos(magU - UMax)*UMax/(magU + smallU)
|
||||||
|
+ neg(magU - UMax);
|
||||||
|
Ulimiter.max(scalar(0));
|
||||||
|
Ulimiter.min(scalar(1));
|
||||||
|
|
||||||
|
U *= Ulimiter;
|
||||||
|
U.correctBoundaryConditions();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
// Check convergence
|
||||||
|
if (maxResidual < convergenceCriterion)
|
||||||
|
{
|
||||||
|
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
|
||||||
|
runTime.writeAndEnd();
|
||||||
|
Info<< "latestTime = " << runTime.timeName() << endl;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
// initialize values for convergence checks
|
||||||
|
|
||||||
|
scalar maxResidual = 0;
|
||||||
|
scalar convergenceCriterion = 0;
|
|
@ -52,11 +52,14 @@ int main(int argc, char *argv[])
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
# include "createFields.H"
|
# include "createFields.H"
|
||||||
# include "initContinuityErrs.H"
|
# include "initContinuityErrs.H"
|
||||||
# include "readBlockSolverControls.H"
|
# include "initConvergenceCheck.H"
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
while (runTime.loop())
|
while (runTime.loop())
|
||||||
{
|
{
|
||||||
|
# include "readBlockSolverControls.H"
|
||||||
|
# include "readFieldBounds.H"
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
p.storePrevIter();
|
p.storePrevIter();
|
||||||
|
@ -74,7 +77,7 @@ int main(int argc, char *argv[])
|
||||||
# include "couplingTerms.H"
|
# include "couplingTerms.H"
|
||||||
|
|
||||||
// Solve the block matrix
|
// Solve the block matrix
|
||||||
UpEqn.solve();
|
maxResidual = cmptMax(UpEqn.solve().initialResidual());
|
||||||
|
|
||||||
// Retrieve solution
|
// Retrieve solution
|
||||||
UpEqn.retrieveSolution(0, U.internalField());
|
UpEqn.retrieveSolution(0, U.internalField());
|
||||||
|
@ -87,6 +90,8 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
# include "continuityErrs.H"
|
# include "continuityErrs.H"
|
||||||
|
|
||||||
|
# include "boundPU.H"
|
||||||
|
|
||||||
p.relax();
|
p.relax();
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
@ -95,6 +100,8 @@ int main(int argc, char *argv[])
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
|
|
||||||
|
# include "convergenceCheck.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0;
|
scalar pRefValue = 0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("blockSolver"), pRefCell, pRefValue);
|
setRefCell
|
||||||
|
(
|
||||||
|
p,
|
||||||
|
mesh.solutionDict().subDict("blockSolver"),
|
||||||
|
pRefCell,
|
||||||
|
pRefValue
|
||||||
|
);
|
||||||
|
|
||||||
|
mesh.solutionDict().subDict("blockSolver").readIfPresent
|
||||||
|
(
|
||||||
|
"convergence",
|
||||||
|
convergenceCriterion
|
||||||
|
);
|
||||||
|
|
14
applications/solvers/coupled/pUCoupledFoam/readFieldBounds.H
Normal file
14
applications/solvers/coupled/pUCoupledFoam/readFieldBounds.H
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
// Read field bounds
|
||||||
|
dictionary fieldBounds = mesh.solutionDict().subDict("fieldBounds");
|
||||||
|
|
||||||
|
// Pressure bounds
|
||||||
|
dimensionedScalar pMin("pMin", p.dimensions(), 0);
|
||||||
|
dimensionedScalar pMax("pMax", p.dimensions(), 0);
|
||||||
|
|
||||||
|
fieldBounds.lookup(p.name()) >> pMin.value() >> pMax.value();
|
||||||
|
|
||||||
|
// Velocity bound
|
||||||
|
dimensionedScalar UMax("UMax", U.dimensions(), 0);
|
||||||
|
|
||||||
|
fieldBounds.lookup(U.name()) >> UMax.value();
|
||||||
|
dimensionedScalar smallU("smallU", dimVelocity, 1e-10);
|
|
@ -35,7 +35,7 @@ Description
|
||||||
#include "wallFvPatch.H"
|
#include "wallFvPatch.H"
|
||||||
|
|
||||||
#include "EulerDdtScheme.H"
|
#include "EulerDdtScheme.H"
|
||||||
#include "CrankNicholsonDdtScheme.H"
|
#include "CrankNicolsonDdtScheme.H"
|
||||||
#include "backwardDdtScheme.H"
|
#include "backwardDdtScheme.H"
|
||||||
|
|
||||||
#include "tetFemMatrices.H"
|
#include "tetFemMatrices.H"
|
||||||
|
@ -480,7 +480,7 @@ bool freeSurface::movePoints(const scalarField& interfacePhi)
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
ddtScheme
|
ddtScheme
|
||||||
== fv::CrankNicholsonDdtScheme<vector>::typeName
|
== fv::CrankNicolsonDdtScheme<vector>::typeName
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
sweptVolCorr *= (1.0/2.0)*DB().deltaT().value();
|
sweptVolCorr *= (1.0/2.0)*DB().deltaT().value();
|
||||||
|
@ -890,7 +890,7 @@ bool freeSurface::moveMeshPoints()
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
ddtScheme
|
ddtScheme
|
||||||
== fv::CrankNicholsonDdtScheme<vector>::typeName
|
== fv::CrankNicolsonDdtScheme<vector>::typeName
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
sweptVolCorr *= (1.0/2.0)*DB().deltaT().value();
|
sweptVolCorr *= (1.0/2.0)*DB().deltaT().value();
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
# aliases.csh
|
# aliases.csh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Aliases for working with OpenFOAM
|
# Aliases for working with FOAM
|
||||||
# Sourced from OpenFOAM-??/etc/cshrc and/or ~/.cshrc
|
# Sourced from FOAM-??/etc/cshrc and/or ~/.cshrc
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
# aliases.sh
|
# aliases.sh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Aliases for working with OpenFOAM
|
# Aliases for working with FOAM
|
||||||
# Sourced from OpenFOAM-??/etc/bashrc and/or ~/.bashrc
|
# Sourced from FOAM-??/etc/bashrc and/or ~/.bashrc
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Setup file for Ensight 8.?
|
# Setup file for Ensight 8.?
|
||||||
# Sourced from OpenFOAM-?.?/etc/bashrc
|
# Sourced from FOAM-?.?/etc/bashrc
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | For copyright notice see file Copyright
|
# \\ / A nd | For copyright notice see file Copyright
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of foam-extend.
|
# This file is part of foam-extend.
|
||||||
#
|
#
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Startup File for Ensight 8.?.
|
# Startup File for Ensight 8.?.
|
||||||
# Sourced from OpenFOAM-?.?/etc/cshrc
|
# Sourced from FOAM-?.?/etc/cshrc
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Setup file for paraview-3.x
|
# Setup file for paraview-3.x
|
||||||
# Sourced from OpenFOAM-*/etc/bashrc
|
# Sourced from FOAM-*/etc/bashrc
|
||||||
#
|
#
|
||||||
# Note
|
# Note
|
||||||
# The env. variable 'ParaView_DIR' is required for building plugins
|
# The env. variable 'ParaView_DIR' is required for building plugins
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Setup file for paraview-3.x
|
# Setup file for paraview-3.x
|
||||||
# Sourced from OpenFOAM-*/etc/cshrc
|
# Sourced from FOAM-*/etc/cshrc
|
||||||
#
|
#
|
||||||
# Note
|
# Note
|
||||||
# The env. variable 'ParaView_DIR' is required for building plugins
|
# The env. variable 'ParaView_DIR' is required for building plugins
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
# etc/bashrc
|
# etc/bashrc
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Startup file for OpenFOAM
|
# Startup file for FOAM
|
||||||
# Sourced from ~/.profile or ~/.bashrc
|
# Sourced from ~/.profile or ~/.bashrc
|
||||||
# Should be usable by any POSIX-compliant shell (eg, ksh)
|
# Should be usable by any POSIX-compliant shell (eg, ksh)
|
||||||
#
|
#
|
||||||
|
@ -43,7 +43,7 @@ export FOAM_DEV=1
|
||||||
# USER EDITABLE PART
|
# USER EDITABLE PART
|
||||||
#
|
#
|
||||||
# either set $FOAM_INST_DIR before sourcing this file or set
|
# either set $FOAM_INST_DIR before sourcing this file or set
|
||||||
# $foamInstall below to where OpenFOAM is installed
|
# $foamInstall below to where FOAM is installed
|
||||||
#
|
#
|
||||||
# Location of FOAM installation
|
# Location of FOAM installation
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -379,7 +379,7 @@ SunOS)
|
||||||
cat <<USAGE
|
cat <<USAGE
|
||||||
|
|
||||||
Your "$WM_ARCH" operating system is not supported by this release
|
Your "$WM_ARCH" operating system is not supported by this release
|
||||||
of OpenFOAM. For further assistance, please contact www.extend-project.de
|
of foam-extend. For further assistance, please contact www.foam-extend.org
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -22,7 +22,7 @@ Documentation
|
||||||
doxyDocDirs
|
doxyDocDirs
|
||||||
(
|
(
|
||||||
"$WM_PROJECT_USER_DIR/Doxygen/html"
|
"$WM_PROJECT_USER_DIR/Doxygen/html"
|
||||||
"~OpenFOAM/Doxygen/html"
|
"~foam/Doxygen/html"
|
||||||
"$WM_PROJECT_DIR/doc/Doxygen/html"
|
"$WM_PROJECT_DIR/doc/Doxygen/html"
|
||||||
);
|
);
|
||||||
doxySourceFileExts
|
doxySourceFileExts
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
# etc/cshrc
|
# etc/cshrc
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Startup file for OpenFOAM
|
# Startup file for FOAM
|
||||||
# Sourced from ~/.login or ~/.cshrc
|
# Sourced from ~/.login or ~/.cshrc
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
|
@ -25,16 +25,17 @@
|
||||||
# etc/prefs.csh
|
# etc/prefs.csh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Preset variables for the OpenFOAM configuration - C-Shell shell syntax.
|
# Preset variables for the FOAM configuration - C-Shell shell syntax.
|
||||||
#
|
#
|
||||||
# The prefs.csh file will be sourced by the OpenFOAM etc/cshrc when it is
|
# The prefs.csh file will be sourced by the FOAM etc/cshrc when it is
|
||||||
# found
|
# found
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
## Specify system compiler
|
## Specify system compiler
|
||||||
## ~~~~~~~~~~~~~~~~~~~~~~~
|
## ~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
#set compilerInstall=system
|
#set compilerInstall=System
|
||||||
|
#set compilerInstall=FOAM
|
||||||
|
|
||||||
# Specify system openmpi
|
# Specify system openmpi
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -161,11 +162,11 @@
|
||||||
#setenv ParaView_MAJOR 3.7
|
#setenv ParaView_MAJOR 3.7
|
||||||
|
|
||||||
|
|
||||||
# System identifier for the OpenFOAM CDash test harness on openfoam-extend
|
# System identifier for the FOAM CDash test harness on foam-extend
|
||||||
#
|
#
|
||||||
# By default, your system FQN/hostname will be used as the system identifier
|
# By default, your system FQN/hostname will be used as the system identifier
|
||||||
# when publishing your test harness results on the OpenFOAM CDash server
|
# when publishing your test harness results on the FOAM CDash server
|
||||||
# on openfoam-extend.
|
# on foam-extend.
|
||||||
# You can override your identifier using this environment variable
|
# You can override your identifier using this environment variable
|
||||||
#setenv CDASH_SUBMIT_LOCAL_HOST_ID choose_your_CDash_system_identifer
|
#setenv CDASH_SUBMIT_LOCAL_HOST_ID choose_your_CDash_system_identifer
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,9 @@
|
||||||
# etc/prefs.sh
|
# etc/prefs.sh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Preset variables for the OpenFOAM configuration - POSIX shell syntax.
|
# Preset variables for the FOAM configuration - POSIX shell syntax.
|
||||||
#
|
#
|
||||||
# The prefs.sh file will be sourced by the OpenFOAM etc/bashrc when it is
|
# The prefs.sh file will be sourced by the FOAM etc/bashrc when it is
|
||||||
# found
|
# found
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
@ -36,7 +36,8 @@ export FOAM_VERBOSE=1
|
||||||
|
|
||||||
# Specify system compiler
|
# Specify system compiler
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
compilerInstall=System
|
#compilerInstall=System
|
||||||
|
#compilerInstall=FOAM
|
||||||
|
|
||||||
# Specify system openmpi
|
# Specify system openmpi
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -171,11 +172,11 @@ compilerInstall=System
|
||||||
#export ParaView_MAJOR=3.7
|
#export ParaView_MAJOR=3.7
|
||||||
|
|
||||||
|
|
||||||
# System identifier for the OpenFOAM CDash test harness on openfoam-extend
|
# System identifier for the FOAM CDash test harness on foam-extend
|
||||||
#
|
#
|
||||||
# By default, your system FQN/hostname will be used as the system identifier
|
# By default, your system FQN/hostname will be used as the system identifier
|
||||||
# when publishing your test harness results on the OpenFOAM CDash server
|
# when publishing your test harness results on the FOAM CDash server
|
||||||
# on openfoam-extend.
|
# on foam-extend.
|
||||||
# You can override your identifier using this environment variable
|
# You can override your identifier using this environment variable
|
||||||
#export CDASH_SUBMIT_LOCAL_HOST_ID=choose_your_CDash_system_identifer
|
#export CDASH_SUBMIT_LOCAL_HOST_ID=choose_your_CDash_system_identifer
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
# etc/settings.csh
|
# etc/settings.csh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Startup file for OpenFOAM
|
# Startup file for FOAM
|
||||||
# Sourced from OpenFOAM-??/etc/cshrc
|
# Sourced from FOAM-??/etc/cshrc
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ setenv FOAM_LIB $WM_PROJECT_DIR/lib
|
||||||
setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS
|
setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS
|
||||||
setenv FOAM_SRC $WM_PROJECT_DIR/src
|
setenv FOAM_SRC $WM_PROJECT_DIR/src
|
||||||
|
|
||||||
# shared site configuration - similar naming convention as ~OpenFOAM expansion
|
# shared site configuration - similar naming convention as ~FOAM expansion
|
||||||
setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
|
setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
|
||||||
setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
|
setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ setenv FOAM_UTILITIES $FOAM_APP/utilities
|
||||||
setenv FOAM_SOLVERS $FOAM_APP/solvers
|
setenv FOAM_SOLVERS $FOAM_APP/solvers
|
||||||
setenv FOAM_RUN $WM_PROJECT_USER_DIR/run
|
setenv FOAM_RUN $WM_PROJECT_USER_DIR/run
|
||||||
|
|
||||||
# add OpenFOAM scripts and wmake to the path
|
# add FOAM scripts and wmake to the path
|
||||||
set path=($WM_DIR $WM_PROJECT_DIR/bin $path)
|
set path=($WM_DIR $WM_PROJECT_DIR/bin $path)
|
||||||
|
|
||||||
_foamAddPath $FOAM_APPBIN
|
_foamAddPath $FOAM_APPBIN
|
||||||
|
@ -80,20 +80,36 @@ _foamAddLib $FOAM_USER_LIBBIN
|
||||||
|
|
||||||
# Select compiler installation
|
# Select compiler installation
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# compilerInstall = OpenFOAM | System
|
# compilerInstall = FOAM | System
|
||||||
#set compilerInstall=OpenFOAM
|
#set compilerInstall=FOAM
|
||||||
#set compilerInstall=System
|
#set compilerInstall=System
|
||||||
if ( ! $?compilerInstall ) then
|
if ( ! $?compilerInstall ) then
|
||||||
setenv compilerInstall System
|
setenv compilerInstall System
|
||||||
endif
|
endif
|
||||||
|
|
||||||
switch ("$compilerInstall")
|
switch ("$compilerInstall")
|
||||||
case OpenFOAM:
|
case FOAM:
|
||||||
switch ("$WM_COMPILER")
|
switch ("$WM_COMPILER")
|
||||||
case Gcc:
|
case Gcc:
|
||||||
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/packages/gcc-4.6.4/platforms/$WM_OPTIONS
|
||||||
_foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.1.2/platforms/$WM_OPTIONS/etc/gmp-5.1.2.csh
|
||||||
_foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.1.2/platforms/$WM_OPTIONS/etc/mpfr-3.1.2.csh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpc-1.0.1/platforms/$WM_OPTIONS/etc/mpc-1.0.1.csh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.6.4/platforms/$WM_OPTIONS/etc/gcc-4.6.4.csh
|
||||||
|
breaksw
|
||||||
|
case Gcc49:
|
||||||
|
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/packages/gcc-4.9.2/platforms/$WM_OPTIONS
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.1.2/platforms/$WM_OPTIONS/etc/gmp-5.1.2.csh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.1.2/platforms/$WM_OPTIONS/etc/mpfr-3.1.2.csh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpc-1.0.1/platforms/$WM_OPTIONS/etc/mpc-1.0.1.csh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.9.2/platforms/$WM_OPTIONS/etc/gcc-4.9.2.csh
|
||||||
|
breaksw
|
||||||
|
case Gcc47:
|
||||||
|
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/packages/gcc-4.7.4/platforms/$WM_OPTIONS
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.1.2/platforms/$WM_OPTIONS/etc/gmp-5.1.2.csh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.1.2/platforms/$WM_OPTIONS/etc/mpfr-3.1.2.csh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpc-1.0.1/platforms/$WM_OPTIONS/etc/mpc-1.0.1.csh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.7.4/platforms/$WM_OPTIONS/etc/gcc-4.7.4.csh
|
||||||
breaksw
|
breaksw
|
||||||
case Gcc45:
|
case Gcc45:
|
||||||
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/packages/gcc-4.5.1/platforms/$WM_OPTIONS
|
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/packages/gcc-4.5.1/platforms/$WM_OPTIONS
|
||||||
|
@ -104,18 +120,10 @@ case OpenFOAM:
|
||||||
breaksw
|
breaksw
|
||||||
case Gcc44:
|
case Gcc44:
|
||||||
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS
|
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS
|
||||||
_foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.0.1/platforms/$WM_OPTIONS/etc/mpfr-3.0.1.csh
|
|
||||||
_foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.0.1/platforms/$WM_OPTIONS/etc/gmp-5.0.1.csh
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.0.1/platforms/$WM_OPTIONS/etc/gmp-5.0.1.csh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.0.1/platforms/$WM_OPTIONS/etc/mpfr-3.0.1.csh
|
||||||
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS/etc/gcc-4.4.5.csh
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS/etc/gcc-4.4.5.csh
|
||||||
breaksw
|
breaksw
|
||||||
case Gcc43:
|
|
||||||
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
|
||||||
_foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
|
||||||
_foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
|
||||||
breaksw
|
|
||||||
case Gcc42:
|
|
||||||
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
|
||||||
breaksw
|
|
||||||
endsw
|
endsw
|
||||||
|
|
||||||
# Check that the compiler directory can be found
|
# Check that the compiler directory can be found
|
||||||
|
@ -530,8 +538,8 @@ endif
|
||||||
|
|
||||||
# QT
|
# QT
|
||||||
# ~~~~~
|
# ~~~~~
|
||||||
if ( $?QT_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/qt-everywhere-opensource-src-4.8.5/platforms/$WM_OPTIONS )then
|
if ( $?QT_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/qt-everywhere-opensource-src-4.8.6/platforms/$WM_OPTIONS )then
|
||||||
_foamSource $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.8.5/platforms/$WM_OPTIONS/etc/qt-everywhere-opensource-src-4.8.5.csh
|
_foamSource $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.8.6/platforms/$WM_OPTIONS/etc/qt-everywhere-opensource-src-4.8.6.csh
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# PARAVIEW
|
# PARAVIEW
|
||||||
|
|
52
etc/settings.sh
Executable file → Normal file
52
etc/settings.sh
Executable file → Normal file
|
@ -26,8 +26,8 @@
|
||||||
# etc/settings.sh
|
# etc/settings.sh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Startup file for OpenFOAM
|
# Startup file for FOAM
|
||||||
# Sourced from OpenFOAM-??/etc/bashrc
|
# Sourced from FOAM-??/etc/bashrc
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ export FOAM_LIB=$WM_PROJECT_DIR/lib
|
||||||
export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS
|
export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS
|
||||||
export FOAM_SRC=$WM_PROJECT_DIR/src
|
export FOAM_SRC=$WM_PROJECT_DIR/src
|
||||||
|
|
||||||
# shared site configuration - similar naming convention as ~OpenFOAM expansion
|
# shared site configuration - similar naming convention as ~FOAM expansion
|
||||||
export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
|
export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
|
||||||
export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
|
export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ export FOAM_UTILITIES=$FOAM_APP/utilities
|
||||||
export FOAM_SOLVERS=$FOAM_APP/solvers
|
export FOAM_SOLVERS=$FOAM_APP/solvers
|
||||||
export FOAM_RUN=$WM_PROJECT_USER_DIR/run
|
export FOAM_RUN=$WM_PROJECT_USER_DIR/run
|
||||||
|
|
||||||
# add OpenFOAM scripts and wmake to the path
|
# add FOAM scripts and wmake to the path
|
||||||
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
|
||||||
|
@ -118,22 +118,38 @@ unset compilerBin compilerLib
|
||||||
|
|
||||||
# Select compiler installation
|
# Select compiler installation
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# compilerInstall = OpenFOAM | System
|
# compilerInstall = FOAM | System
|
||||||
#
|
#
|
||||||
# We can override the value of compilerInstall from prefs.sh
|
# We can override the value of compilerInstall from prefs.sh
|
||||||
: ${compilerInstall:=System}
|
: ${compilerInstall:=System}
|
||||||
|
|
||||||
# Or we can force it right here
|
# Or we can force it right here
|
||||||
#compilerInstall=OpenFOAM
|
#compilerInstall=FOAM
|
||||||
#compilerInstall=System
|
#compilerInstall=System
|
||||||
|
|
||||||
case "${compilerInstall:-OpenFOAM}" in
|
case "${compilerInstall}" in
|
||||||
OpenFOAM)
|
FOAM)
|
||||||
case "$WM_COMPILER" in
|
case "$WM_COMPILER" in
|
||||||
Gcc)
|
Gcc)
|
||||||
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/packages/gcc-4.6.4/platforms/$WM_OPTIONS
|
||||||
_foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.1.2/platforms/$WM_OPTIONS/etc/gmp-5.1.2.sh
|
||||||
_foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.1.2/platforms/$WM_OPTIONS/etc/mpfr-3.1.2.sh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpc-1.0.1/platforms/$WM_OPTIONS/etc/mpc-1.0.1.sh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.6.4/platforms/$WM_OPTIONS/etc/gcc-4.6.4.csh
|
||||||
|
;;
|
||||||
|
Gcc49)
|
||||||
|
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/packages/gcc-4.9.2/platforms/$WM_OPTIONS
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.1.2/platforms/$WM_OPTIONS/etc/gmp-5.1.2.sh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.1.2/platforms/$WM_OPTIONS/etc/mpfr-3.1.2.sh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpc-1.0.1/platforms/$WM_OPTIONS/etc/mpc-1.0.1.sh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.9.2/platforms/$WM_OPTIONS/etc/gcc-4.9.2.csh
|
||||||
|
;;
|
||||||
|
Gcc47)
|
||||||
|
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/packages/gcc-4.7.4/platforms/$WM_OPTIONS
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.1.2/platforms/$WM_OPTIONS/etc/gmp-5.1.2.sh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.1.2/platforms/$WM_OPTIONS/etc/mpfr-3.1.2.sh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpc-1.0.1/platforms/$WM_OPTIONS/etc/mpc-1.0.1.sh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.7.4/platforms/$WM_OPTIONS/etc/gcc-4.7.4.csh
|
||||||
;;
|
;;
|
||||||
Gcc45)
|
Gcc45)
|
||||||
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/packages/gcc-4.5.1/platforms/$WM_OPTIONS
|
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/packages/gcc-4.5.1/platforms/$WM_OPTIONS
|
||||||
|
@ -144,18 +160,10 @@ OpenFOAM)
|
||||||
;;
|
;;
|
||||||
Gcc44)
|
Gcc44)
|
||||||
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS
|
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS
|
||||||
_foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.0.1/platforms/$WM_OPTIONS/etc/mpfr-3.0.1.sh
|
|
||||||
_foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.0.1/platforms/$WM_OPTIONS/etc/gmp-5.0.1.sh
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.0.1/platforms/$WM_OPTIONS/etc/gmp-5.0.1.sh
|
||||||
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.0.1/platforms/$WM_OPTIONS/etc/mpfr-3.0.1.sh
|
||||||
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS/etc/gcc-4.4.5.sh
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS/etc/gcc-4.4.5.sh
|
||||||
;;
|
;;
|
||||||
Gcc43)
|
|
||||||
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
|
||||||
_foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
|
||||||
_foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
|
||||||
;;
|
|
||||||
Gcc42)
|
|
||||||
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Check that the compiler directory can be found
|
# Check that the compiler directory can be found
|
||||||
|
@ -641,8 +649,8 @@ export MPI_BUFFER_SIZE
|
||||||
|
|
||||||
# Load QT
|
# Load QT
|
||||||
# ~~~~~~~
|
# ~~~~~~~
|
||||||
[ ! -z "$QT_THIRD_PARTY" ] && [ -e $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.8.5/platforms/$WM_OPTIONS ] && {
|
[ ! -z "$QT_THIRD_PARTY" ] && [ -e $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.8.6/platforms/$WM_OPTIONS ] && {
|
||||||
_foamSource $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.8.5/platforms/$WM_OPTIONS/etc/qt-everywhere-opensource-src-4.8.5.sh
|
_foamSource $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.8.6/platforms/$WM_OPTIONS/etc/qt-everywhere-opensource-src-4.8.6.sh
|
||||||
}
|
}
|
||||||
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " QT_DIR is initialized to: $QT_DIR"
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " QT_DIR is initialized to: $QT_DIR"
|
||||||
|
|
||||||
|
|
|
@ -328,7 +328,7 @@ $(ddtSchemes)/SLTSDdtScheme/SLTSDdtSchemes.C
|
||||||
$(ddtSchemes)/backwardDdtScheme/backwardDdtSchemes.C
|
$(ddtSchemes)/backwardDdtScheme/backwardDdtSchemes.C
|
||||||
$(ddtSchemes)/boundedBackwardDdtScheme/boundedBackwardDdtScheme.C
|
$(ddtSchemes)/boundedBackwardDdtScheme/boundedBackwardDdtScheme.C
|
||||||
$(ddtSchemes)/boundedBackwardDdtScheme/boundedBackwardDdtSchemes.C
|
$(ddtSchemes)/boundedBackwardDdtScheme/boundedBackwardDdtSchemes.C
|
||||||
$(ddtSchemes)/CrankNicholsonDdtScheme/CrankNicholsonDdtSchemes.C
|
$(ddtSchemes)/CrankNicolsonDdtScheme/CrankNicolsonDdtSchemes.C
|
||||||
$(ddtSchemes)/steadyInertialDdtScheme/steadyInertialDdtSchemes.C
|
$(ddtSchemes)/steadyInertialDdtScheme/steadyInertialDdtSchemes.C
|
||||||
|
|
||||||
d2dt2Schemes = finiteVolume/d2dt2Schemes
|
d2dt2Schemes = finiteVolume/d2dt2Schemes
|
||||||
|
@ -344,11 +344,11 @@ $(divSchemes)/gaussDivScheme/gaussDivSchemes.C
|
||||||
|
|
||||||
gradSchemes = finiteVolume/gradSchemes
|
gradSchemes = finiteVolume/gradSchemes
|
||||||
$(gradSchemes)/gradScheme/gradSchemes.C
|
$(gradSchemes)/gradScheme/gradSchemes.C
|
||||||
$(gradSchemes)/scalarGaussGrad/scalarGaussGrad.C
|
$(gradSchemes)/gaussGrad/scalarGaussGrad.C
|
||||||
$(gradSchemes)/gaussGrad/gaussGrads.C
|
$(gradSchemes)/gaussGrad/gaussGrads.C
|
||||||
$(gradSchemes)/beGaussGrad/beGaussGrads.C
|
$(gradSchemes)/beGaussGrad/beGaussGrads.C
|
||||||
$(gradSchemes)/leastSquaresGrad/leastSquaresVectors.C
|
$(gradSchemes)/leastSquaresGrad/leastSquaresVectors.C
|
||||||
$(gradSchemes)/scalarLeastSquaresGrad/scalarLeastSquaresGrad.C
|
$(gradSchemes)/leastSquaresGrad/scalarLeastSquaresGrad.C
|
||||||
$(gradSchemes)/leastSquaresGrad/leastSquaresGrads.C
|
$(gradSchemes)/leastSquaresGrad/leastSquaresGrads.C
|
||||||
$(gradSchemes)/extendedLeastSquaresGrad/extendedLeastSquaresVectors.C
|
$(gradSchemes)/extendedLeastSquaresGrad/extendedLeastSquaresVectors.C
|
||||||
$(gradSchemes)/extendedLeastSquaresGrad/extendedLeastSquaresGrads.C
|
$(gradSchemes)/extendedLeastSquaresGrad/extendedLeastSquaresGrads.C
|
||||||
|
|
|
@ -28,7 +28,7 @@ License
|
||||||
#include "fvPatchFieldMapper.H"
|
#include "fvPatchFieldMapper.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "EulerDdtScheme.H"
|
#include "EulerDdtScheme.H"
|
||||||
#include "CrankNicholsonDdtScheme.H"
|
#include "CrankNicolsonDdtScheme.H"
|
||||||
#include "backwardDdtScheme.H"
|
#include "backwardDdtScheme.H"
|
||||||
#include "steadyStateDdtScheme.H"
|
#include "steadyStateDdtScheme.H"
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ void advectiveFvPatchField<Type>::updateCoeffs()
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
ddtScheme == fv::EulerDdtScheme<Type>::typeName
|
ddtScheme == fv::EulerDdtScheme<Type>::typeName
|
||||||
|| ddtScheme == fv::CrankNicholsonDdtScheme<Type>::typeName
|
|| ddtScheme == fv::CrankNicolsonDdtScheme<Type>::typeName
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this->refValue() =
|
this->refValue() =
|
||||||
|
@ -318,7 +318,7 @@ void advectiveFvPatchField<Type>::updateCoeffs()
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
ddtScheme == fv::EulerDdtScheme<Type>::typeName
|
ddtScheme == fv::EulerDdtScheme<Type>::typeName
|
||||||
|| ddtScheme == fv::CrankNicholsonDdtScheme<Type>::typeName
|
|| ddtScheme == fv::CrankNicolsonDdtScheme<Type>::typeName
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this->refValue() = field.oldTime().boundaryField()[patchi];
|
this->refValue() = field.oldTime().boundaryField()[patchi];
|
||||||
|
|
|
@ -28,7 +28,7 @@ Description
|
||||||
Advective outflow boundary condition based on solving DDt(psi, U) = 0
|
Advective outflow boundary condition based on solving DDt(psi, U) = 0
|
||||||
at the boundary.
|
at the boundary.
|
||||||
|
|
||||||
The standard (Euler, backward, CrankNicholson) time schemes are
|
The standard (Euler, backward, CrankNicolson) time schemes are
|
||||||
supported. Additionally an optional mechanism to relax the value at
|
supported. Additionally an optional mechanism to relax the value at
|
||||||
the boundary to a specified far-field value is provided which is
|
the boundary to a specified far-field value is provided which is
|
||||||
switched on by specifying the relaxation length-scale lInf and the
|
switched on by specifying the relaxation length-scale lInf and the
|
||||||
|
|
|
@ -52,7 +52,8 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
|
||||||
"fvPatchField<Type>::New(const word&, const fvPatch&, "
|
"fvPatchField<Type>::New(const word&, const fvPatch&, "
|
||||||
"const DimensionedField<Type, volMesh>&)"
|
"const DimensionedField<Type, volMesh>&)"
|
||||||
) << "Unknown patch field type " << patchFieldType
|
) << "Unknown patch field type " << patchFieldType
|
||||||
<< endl << endl
|
<< " for field " << iF.name() << " on patch " << p.name()
|
||||||
|
<< nl << nl
|
||||||
<< "Valid patchField types are :" << endl
|
<< "Valid patchField types are :" << endl
|
||||||
<< patchConstructorTablePtr_->sortedToc()
|
<< patchConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
|
@ -109,6 +110,7 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
|
||||||
"const dictionary&)",
|
"const dictionary&)",
|
||||||
dict
|
dict
|
||||||
) << "Unknown patch field type " << patchFieldType
|
) << "Unknown patch field type " << patchFieldType
|
||||||
|
<< " for field " << iF.name() << " on patch " << p.name()
|
||||||
<< " for patch type " << p.type() << endl << endl
|
<< " for patch type " << p.type() << endl << endl
|
||||||
<< "Valid patch field types are :" << endl
|
<< "Valid patch field types are :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
|
@ -137,8 +139,8 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
|
||||||
"const DimensionedField<Type, volMesh>&, "
|
"const DimensionedField<Type, volMesh>&, "
|
||||||
"const dictionary&)",
|
"const dictionary&)",
|
||||||
dict
|
dict
|
||||||
) << "inconsistent patch and patchField types for field "
|
) << "Inconsistent patch and patchField types for field "
|
||||||
<< iF.name() << "\n"
|
<< iF.name() << " on patch " << p.name() << "\n"
|
||||||
<< " patch type " << p.type()
|
<< " patch type " << p.type()
|
||||||
<< " and patchField type " << patchFieldType
|
<< " and patchField type " << patchFieldType
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
|
@ -177,7 +179,9 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
|
||||||
"fvPatchField<Type>::New(const fvPatchField<Type>&, "
|
"fvPatchField<Type>::New(const fvPatchField<Type>&, "
|
||||||
"const fvPatch&, const DimensionedField<Type, volMesh>&, "
|
"const fvPatch&, const DimensionedField<Type, volMesh>&, "
|
||||||
"const fvPatchFieldMapper&)"
|
"const fvPatchFieldMapper&)"
|
||||||
) << "unknown patch field type " << ptf.type() << endl << endl
|
) << "unknown patch field type " << ptf.type()
|
||||||
|
<< " for field " << iF.name() << " on patch " << p.name()
|
||||||
|
<< nl << nl
|
||||||
<< "Valid patchField types are :" << endl
|
<< "Valid patchField types are :" << endl
|
||||||
<< patchMapperConstructorTablePtr_->sortedToc()
|
<< patchMapperConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
|
|
|
@ -23,7 +23,7 @@ License
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "CrankNicholsonDdtScheme.H"
|
#include "CrankNicolsonDdtScheme.H"
|
||||||
#include "surfaceInterpolate.H"
|
#include "surfaceInterpolate.H"
|
||||||
#include "fvcDiv.H"
|
#include "fvcDiv.H"
|
||||||
#include "fvMatrices.H"
|
#include "fvMatrices.H"
|
||||||
|
@ -42,7 +42,7 @@ namespace fv
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class GeoField>
|
template<class GeoField>
|
||||||
CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
|
CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
|
||||||
(
|
(
|
||||||
const IOobject& io,
|
const IOobject& io,
|
||||||
const fvMesh& mesh
|
const fvMesh& mesh
|
||||||
|
@ -60,7 +60,7 @@ CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class GeoField>
|
template<class GeoField>
|
||||||
CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
|
CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
|
||||||
(
|
(
|
||||||
const IOobject& io,
|
const IOobject& io,
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
|
@ -74,7 +74,7 @@ CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class GeoField>
|
template<class GeoField>
|
||||||
label CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>::
|
label CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::
|
||||||
startTimeIndex() const
|
startTimeIndex() const
|
||||||
{
|
{
|
||||||
return startTimeIndex_;
|
return startTimeIndex_;
|
||||||
|
@ -83,7 +83,7 @@ startTimeIndex() const
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class GeoField>
|
template<class GeoField>
|
||||||
GeoField& CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>::
|
GeoField& CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::
|
||||||
operator()()
|
operator()()
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -92,7 +92,7 @@ operator()()
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class GeoField>
|
template<class GeoField>
|
||||||
void CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>::
|
void CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::
|
||||||
operator=(const GeoField& gf)
|
operator=(const GeoField& gf)
|
||||||
{
|
{
|
||||||
GeoField::operator=(gf);
|
GeoField::operator=(gf);
|
||||||
|
@ -101,8 +101,8 @@ operator=(const GeoField& gf)
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class GeoField>
|
template<class GeoField>
|
||||||
CrankNicholsonDdtScheme<Type>::DDt0Field<GeoField>&
|
CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>&
|
||||||
CrankNicholsonDdtScheme<Type>::ddt0_
|
CrankNicolsonDdtScheme<Type>::ddt0_
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const dimensionSet& dims
|
const dimensionSet& dims
|
||||||
|
@ -183,7 +183,7 @@ CrankNicholsonDdtScheme<Type>::ddt0_
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class GeoField>
|
template<class GeoField>
|
||||||
bool CrankNicholsonDdtScheme<Type>::evaluate
|
bool CrankNicolsonDdtScheme<Type>::evaluate
|
||||||
(
|
(
|
||||||
const DDt0Field<GeoField>& ddt0
|
const DDt0Field<GeoField>& ddt0
|
||||||
) const
|
) const
|
||||||
|
@ -193,7 +193,7 @@ bool CrankNicholsonDdtScheme<Type>::evaluate
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class GeoField>
|
template<class GeoField>
|
||||||
scalar CrankNicholsonDdtScheme<Type>::coef_
|
scalar CrankNicolsonDdtScheme<Type>::coef_
|
||||||
(
|
(
|
||||||
const DDt0Field<GeoField>& ddt0
|
const DDt0Field<GeoField>& ddt0
|
||||||
) const
|
) const
|
||||||
|
@ -211,7 +211,7 @@ scalar CrankNicholsonDdtScheme<Type>::coef_
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class GeoField>
|
template<class GeoField>
|
||||||
scalar CrankNicholsonDdtScheme<Type>::coef0_
|
scalar CrankNicolsonDdtScheme<Type>::coef0_
|
||||||
(
|
(
|
||||||
const DDt0Field<GeoField>& ddt0
|
const DDt0Field<GeoField>& ddt0
|
||||||
) const
|
) const
|
||||||
|
@ -229,7 +229,7 @@ scalar CrankNicholsonDdtScheme<Type>::coef0_
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class GeoField>
|
template<class GeoField>
|
||||||
dimensionedScalar CrankNicholsonDdtScheme<Type>::rDtCoef_
|
dimensionedScalar CrankNicolsonDdtScheme<Type>::rDtCoef_
|
||||||
(
|
(
|
||||||
const DDt0Field<GeoField>& ddt0
|
const DDt0Field<GeoField>& ddt0
|
||||||
) const
|
) const
|
||||||
|
@ -240,7 +240,7 @@ dimensionedScalar CrankNicholsonDdtScheme<Type>::rDtCoef_
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class GeoField>
|
template<class GeoField>
|
||||||
dimensionedScalar CrankNicholsonDdtScheme<Type>::rDtCoef0_
|
dimensionedScalar CrankNicolsonDdtScheme<Type>::rDtCoef0_
|
||||||
(
|
(
|
||||||
const DDt0Field<GeoField>& ddt0
|
const DDt0Field<GeoField>& ddt0
|
||||||
) const
|
) const
|
||||||
|
@ -251,7 +251,7 @@ dimensionedScalar CrankNicholsonDdtScheme<Type>::rDtCoef0_
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class GeoField>
|
template<class GeoField>
|
||||||
tmp<GeoField> CrankNicholsonDdtScheme<Type>::offCentre_
|
tmp<GeoField> CrankNicolsonDdtScheme<Type>::offCentre_
|
||||||
(
|
(
|
||||||
const GeoField& ddt0
|
const GeoField& ddt0
|
||||||
) const
|
) const
|
||||||
|
@ -281,7 +281,7 @@ const FieldField<fvPatchField, Type>& ff
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
CrankNicholsonDdtScheme<Type>::fvcDdt
|
CrankNicolsonDdtScheme<Type>::fvcDdt
|
||||||
(
|
(
|
||||||
const dimensioned<Type>& dt
|
const dimensioned<Type>& dt
|
||||||
)
|
)
|
||||||
|
@ -343,7 +343,7 @@ CrankNicholsonDdtScheme<Type>::fvcDdt
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
CrankNicholsonDdtScheme<Type>::fvcDdt
|
CrankNicolsonDdtScheme<Type>::fvcDdt
|
||||||
(
|
(
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
)
|
)
|
||||||
|
@ -432,7 +432,7 @@ CrankNicholsonDdtScheme<Type>::fvcDdt
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
CrankNicholsonDdtScheme<Type>::fvcDdt
|
CrankNicolsonDdtScheme<Type>::fvcDdt
|
||||||
(
|
(
|
||||||
const dimensionedScalar& rho,
|
const dimensionedScalar& rho,
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
|
@ -522,7 +522,7 @@ CrankNicholsonDdtScheme<Type>::fvcDdt
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
CrankNicholsonDdtScheme<Type>::fvcDdt
|
CrankNicolsonDdtScheme<Type>::fvcDdt
|
||||||
(
|
(
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
|
@ -622,7 +622,7 @@ CrankNicholsonDdtScheme<Type>::fvcDdt
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<fvMatrix<Type> >
|
tmp<fvMatrix<Type> >
|
||||||
CrankNicholsonDdtScheme<Type>::fvmDdt
|
CrankNicolsonDdtScheme<Type>::fvmDdt
|
||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>& vf
|
GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
)
|
)
|
||||||
|
@ -705,7 +705,7 @@ CrankNicholsonDdtScheme<Type>::fvmDdt
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<fvMatrix<Type> >
|
tmp<fvMatrix<Type> >
|
||||||
CrankNicholsonDdtScheme<Type>::fvmDdt
|
CrankNicolsonDdtScheme<Type>::fvmDdt
|
||||||
(
|
(
|
||||||
const dimensionedScalar& rho,
|
const dimensionedScalar& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& vf
|
GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
|
@ -787,7 +787,7 @@ CrankNicholsonDdtScheme<Type>::fvmDdt
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<fvMatrix<Type> >
|
tmp<fvMatrix<Type> >
|
||||||
CrankNicholsonDdtScheme<Type>::fvmDdt
|
CrankNicolsonDdtScheme<Type>::fvmDdt
|
||||||
(
|
(
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& vf
|
GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
|
@ -877,8 +877,8 @@ CrankNicholsonDdtScheme<Type>::fvmDdt
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<typename CrankNicholsonDdtScheme<Type>::fluxFieldType>
|
tmp<typename CrankNicolsonDdtScheme<Type>::fluxFieldType>
|
||||||
CrankNicholsonDdtScheme<Type>::fvcDdtPhiCorr
|
CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr
|
||||||
(
|
(
|
||||||
const volScalarField& rA,
|
const volScalarField& rA,
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& U,
|
const GeometricField<Type, fvPatchField, volMesh>& U,
|
||||||
|
@ -964,8 +964,8 @@ CrankNicholsonDdtScheme<Type>::fvcDdtPhiCorr
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<typename CrankNicholsonDdtScheme<Type>::fluxFieldType>
|
tmp<typename CrankNicolsonDdtScheme<Type>::fluxFieldType>
|
||||||
CrankNicholsonDdtScheme<Type>::fvcDdtPhiCorr
|
CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr
|
||||||
(
|
(
|
||||||
const volScalarField& rA,
|
const volScalarField& rA,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
|
@ -1157,7 +1157,7 @@ CrankNicholsonDdtScheme<Type>::fvcDdtPhiCorr
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"CrankNicholsonDdtScheme<Type>::fvcDdtPhiCorr"
|
"CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr"
|
||||||
) << "dimensions of phi are not correct"
|
) << "dimensions of phi are not correct"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
|
|
||||||
|
@ -1168,7 +1168,7 @@ CrankNicholsonDdtScheme<Type>::fvcDdtPhiCorr
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<surfaceScalarField> CrankNicholsonDdtScheme<Type>::meshPhi
|
tmp<surfaceScalarField> CrankNicolsonDdtScheme<Type>::meshPhi
|
||||||
(
|
(
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
)
|
)
|
|
@ -22,19 +22,19 @@ License
|
||||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::fv::CrankNicholsonDdtScheme
|
Foam::fv::CrankNicolsonDdtScheme
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Second-oder CrankNicholson implicit ddt using the current and
|
Second-oder CrankNicolson implicit ddt using the current and
|
||||||
previous time-step fields as well as the previous time-step ddt.
|
previous time-step fields as well as the previous time-step ddt.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
CrankNicholsonDdtScheme.C
|
CrankNicolsonDdtScheme.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef CrankNicholsonDdtScheme_H
|
#ifndef CrankNicolsonDdtScheme_H
|
||||||
#define CrankNicholsonDdtScheme_H
|
#define CrankNicolsonDdtScheme_H
|
||||||
|
|
||||||
#include "ddtScheme.H"
|
#include "ddtScheme.H"
|
||||||
|
|
||||||
|
@ -49,11 +49,11 @@ namespace fv
|
||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class CrankNicholsonDdtScheme Declaration
|
Class CrankNicolsonDdtScheme Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
class CrankNicholsonDdtScheme
|
class CrankNicolsonDdtScheme
|
||||||
:
|
:
|
||||||
public fv::ddtScheme<Type>
|
public fv::ddtScheme<Type>
|
||||||
{
|
{
|
||||||
|
@ -105,10 +105,10 @@ class CrankNicholsonDdtScheme
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
CrankNicholsonDdtScheme(const CrankNicholsonDdtScheme&);
|
CrankNicolsonDdtScheme(const CrankNicolsonDdtScheme&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const CrankNicholsonDdtScheme&);
|
void operator=(const CrankNicolsonDdtScheme&);
|
||||||
|
|
||||||
template<class GeoField>
|
template<class GeoField>
|
||||||
DDt0Field<GeoField>& ddt0_
|
DDt0Field<GeoField>& ddt0_
|
||||||
|
@ -149,20 +149,20 @@ class CrankNicholsonDdtScheme
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("CrankNicholson");
|
TypeName("CrankNicolson");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh
|
//- Construct from mesh
|
||||||
CrankNicholsonDdtScheme(const fvMesh& mesh)
|
CrankNicolsonDdtScheme(const fvMesh& mesh)
|
||||||
:
|
:
|
||||||
ddtScheme<Type>(mesh),
|
ddtScheme<Type>(mesh),
|
||||||
ocCoeff_(1.0)
|
ocCoeff_(1.0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//- Construct from mesh and Istream
|
//- Construct from mesh and Istream
|
||||||
CrankNicholsonDdtScheme(const fvMesh& mesh, Istream& is)
|
CrankNicolsonDdtScheme(const fvMesh& mesh, Istream& is)
|
||||||
:
|
:
|
||||||
ddtScheme<Type>(mesh, is),
|
ddtScheme<Type>(mesh, is),
|
||||||
ocCoeff_(readScalar(is))
|
ocCoeff_(readScalar(is))
|
||||||
|
@ -171,7 +171,7 @@ public:
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
"CrankNicholsonDdtScheme(const fvMesh& mesh, Istream& is)",
|
"CrankNicolsonDdtScheme(const fvMesh& mesh, Istream& is)",
|
||||||
is
|
is
|
||||||
) << "coefficient = " << ocCoeff_
|
) << "coefficient = " << ocCoeff_
|
||||||
<< " should be >= 0 and <= 1"
|
<< " should be >= 0 and <= 1"
|
||||||
|
@ -253,7 +253,7 @@ public:
|
||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
tmp<surfaceScalarField> CrankNicholsonDdtScheme<scalar>::fvcDdtPhiCorr
|
tmp<surfaceScalarField> CrankNicolsonDdtScheme<scalar>::fvcDdtPhiCorr
|
||||||
(
|
(
|
||||||
const volScalarField& rA,
|
const volScalarField& rA,
|
||||||
const volScalarField& U,
|
const volScalarField& U,
|
||||||
|
@ -262,7 +262,7 @@ tmp<surfaceScalarField> CrankNicholsonDdtScheme<scalar>::fvcDdtPhiCorr
|
||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
tmp<surfaceScalarField> CrankNicholsonDdtScheme<scalar>::fvcDdtPhiCorr
|
tmp<surfaceScalarField> CrankNicolsonDdtScheme<scalar>::fvcDdtPhiCorr
|
||||||
(
|
(
|
||||||
const volScalarField& rA,
|
const volScalarField& rA,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
|
@ -282,7 +282,7 @@ tmp<surfaceScalarField> CrankNicholsonDdtScheme<scalar>::fvcDdtPhiCorr
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "CrankNicholsonDdtScheme.C"
|
# include "CrankNicolsonDdtScheme.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
@ -25,7 +25,7 @@ Description
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "CrankNicholsonDdtScheme.H"
|
#include "CrankNicolsonDdtScheme.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
@ -34,7 +34,7 @@ namespace Foam
|
||||||
{
|
{
|
||||||
namespace fv
|
namespace fv
|
||||||
{
|
{
|
||||||
makeFvDdtScheme(CrankNicholsonDdtScheme)
|
makeFvDdtScheme(CrankNicolsonDdtScheme)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,6 +163,8 @@ public:
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "scalarGaussGrad.H"
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "gaussGrad.C"
|
# include "gaussGrad.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,7 +27,7 @@ Description
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "scalarGaussGrad.H"
|
#include "gaussGrad.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ tmp<BlockLduSystem<vector, vector> > gaussGrad<scalar>::fvmGrad
|
||||||
{
|
{
|
||||||
const fvPatchScalarField& pf = vf.boundaryField()[patchI];
|
const fvPatchScalarField& pf = vf.boundaryField()[patchI];
|
||||||
const fvPatch& patch = pf.patch();
|
const fvPatch& patch = pf.patch();
|
||||||
const vectorField& Sf = patch.Sf();
|
const vectorField& pSf = patch.Sf();
|
||||||
const fvsPatchScalarField& pw = tweights().boundaryField()[patchI];
|
const fvsPatchScalarField& pw = tweights().boundaryField()[patchI];
|
||||||
const labelList& fc = patch.faceCells();
|
const labelList& fc = patch.faceCells();
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ tmp<BlockLduSystem<vector, vector> > gaussGrad<scalar>::fvmGrad
|
||||||
// Diag contribution
|
// Diag contribution
|
||||||
forAll (pf, faceI)
|
forAll (pf, faceI)
|
||||||
{
|
{
|
||||||
d[fc[faceI]] += internalCoeffs[faceI]*Sf[faceI];
|
d[fc[faceI]] += internalCoeffs[faceI]*pSf[faceI];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (patch.coupled())
|
if (patch.coupled())
|
||||||
|
@ -94,8 +94,8 @@ tmp<BlockLduSystem<vector, vector> > gaussGrad<scalar>::fvmGrad
|
||||||
CoeffField<vector>::linearTypeField& pcoupleLower =
|
CoeffField<vector>::linearTypeField& pcoupleLower =
|
||||||
bs.coupleLower()[patchI].asLinear();
|
bs.coupleLower()[patchI].asLinear();
|
||||||
|
|
||||||
const vectorField pcl = -pw*Sf;
|
const vectorField pcl = -pw*pSf;
|
||||||
const vectorField pcu = pcl + Sf;
|
const vectorField pcu = pcl + pSf;
|
||||||
|
|
||||||
// Coupling contributions
|
// Coupling contributions
|
||||||
pcoupleLower -= pcl;
|
pcoupleLower -= pcl;
|
||||||
|
@ -108,7 +108,7 @@ tmp<BlockLduSystem<vector, vector> > gaussGrad<scalar>::fvmGrad
|
||||||
// Boundary contribution
|
// Boundary contribution
|
||||||
forAll (pf, faceI)
|
forAll (pf, faceI)
|
||||||
{
|
{
|
||||||
source[fc[faceI]] -= boundaryCoeffs[faceI]*Sf[faceI];
|
source[fc[faceI]] -= boundaryCoeffs[faceI]*pSf[faceI];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -119,6 +119,8 @@ public:
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "scalarLeastSquaresGrad.H"
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "leastSquaresGrad.C"
|
# include "leastSquaresGrad.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -36,6 +36,12 @@ namespace Foam
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::scalar Foam::leastSquaresVectors::smallDotProdTol_
|
||||||
|
(
|
||||||
|
debug::tolerances("leastSquaresSmallDotProdTol", 0.1)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh)
|
Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh)
|
||||||
|
@ -121,15 +127,15 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
|
||||||
forAll (lsP.boundaryField(), patchI)
|
forAll (lsP.boundaryField(), patchI)
|
||||||
{
|
{
|
||||||
const fvPatch& p = mesh().boundary()[patchI];
|
const fvPatch& p = mesh().boundary()[patchI];
|
||||||
const unallocLabelList& faceCells = p.patch().faceCells();
|
const unallocLabelList& fc = p.patch().faceCells();
|
||||||
|
|
||||||
// Better version of d-vectors: Zeljko Tukovic, 25/Apr/2010
|
// Better version of d-vectors: Zeljko Tukovic, 25/Apr/2010
|
||||||
const vectorField pd = p.delta();
|
const vectorField pd = p.delta();
|
||||||
|
|
||||||
forAll(pd, patchFaceI)
|
forAll (pd, pFaceI)
|
||||||
{
|
{
|
||||||
const vector& d = pd[patchFaceI];
|
const vector& d = pd[pFaceI];
|
||||||
dd[faceCells[patchFaceI]] += (1.0/magSqr(d))*sqr(d);
|
dd[fc[pFaceI]] += (1.0/magSqr(d))*sqr(d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,9 +153,12 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
|
||||||
),
|
),
|
||||||
mesh(),
|
mesh(),
|
||||||
dimensionedSymmTensor("zero", dimless, symmTensor::zero),
|
dimensionedSymmTensor("zero", dimless, symmTensor::zero),
|
||||||
"zeroGradient"
|
zeroGradientFvPatchScalarField::typeName
|
||||||
);
|
);
|
||||||
symmTensorField& invDd = volInvDd.internalField();
|
symmTensorField& invDd = volInvDd.internalField();
|
||||||
|
|
||||||
|
// Invert least squares matrix using Householder transformations to avoid
|
||||||
|
// badly posed cells
|
||||||
// invDd = inv(dd);
|
// invDd = inv(dd);
|
||||||
invDd = hinv(dd);
|
invDd = hinv(dd);
|
||||||
|
|
||||||
|
@ -158,6 +167,10 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
|
||||||
volInvDd.boundaryField().evaluateCoupled();
|
volInvDd.boundaryField().evaluateCoupled();
|
||||||
|
|
||||||
// Revisit all faces and calculate the lsP and lsN vectors
|
// Revisit all faces and calculate the lsP and lsN vectors
|
||||||
|
vectorField& lsPIn = lsP.internalField();
|
||||||
|
vectorField& lsNIn = lsN.internalField();
|
||||||
|
|
||||||
|
// Least squares vectors on internal faces
|
||||||
forAll (owner, faceI)
|
forAll (owner, faceI)
|
||||||
{
|
{
|
||||||
label own = owner[faceI];
|
label own = owner[faceI];
|
||||||
|
@ -166,16 +179,17 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
|
||||||
vector d = C[nei] - C[own];
|
vector d = C[nei] - C[own];
|
||||||
scalar magSfByMagSqrd = 1.0/magSqr(d);
|
scalar magSfByMagSqrd = 1.0/magSqr(d);
|
||||||
|
|
||||||
lsP[faceI] = magSfByMagSqrd*(invDd[own] & d);
|
lsPIn[faceI] = magSfByMagSqrd*(invDd[own] & d);
|
||||||
lsN[faceI] = -magSfByMagSqrd*(invDd[nei] & d);
|
lsNIn[faceI] = -magSfByMagSqrd*(invDd[nei] & d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Least squares vectors on boundary faces
|
||||||
forAll (lsP.boundaryField(), patchI)
|
forAll (lsP.boundaryField(), patchI)
|
||||||
{
|
{
|
||||||
fvsPatchVectorField& patchLsP = lsP.boundaryField()[patchI];
|
fvsPatchVectorField& patchLsP = lsP.boundaryField()[patchI];
|
||||||
fvsPatchVectorField& patchLsN = lsN.boundaryField()[patchI];
|
fvsPatchVectorField& patchLsN = lsN.boundaryField()[patchI];
|
||||||
const fvPatch& p = mesh().boundary()[patchI];
|
const fvPatch& p = mesh().boundary()[patchI];
|
||||||
const unallocLabelList& faceCells = p.faceCells();
|
const unallocLabelList& fc = p.faceCells();
|
||||||
|
|
||||||
// Better version of d-vectors: Zeljko Tukovic, 25/Apr/2010
|
// Better version of d-vectors: Zeljko Tukovic, 25/Apr/2010
|
||||||
const vectorField pd = p.delta();
|
const vectorField pd = p.delta();
|
||||||
|
@ -185,29 +199,215 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
|
||||||
const symmTensorField invDdNei =
|
const symmTensorField invDdNei =
|
||||||
volInvDd.boundaryField()[patchI].patchNeighbourField();
|
volInvDd.boundaryField()[patchI].patchNeighbourField();
|
||||||
|
|
||||||
forAll(pd, patchFaceI)
|
forAll (pd, pFaceI)
|
||||||
{
|
{
|
||||||
const vector& d = pd[patchFaceI];
|
const vector& d = pd[pFaceI];
|
||||||
|
|
||||||
patchLsP[patchFaceI] = (1.0/magSqr(d))
|
patchLsP[pFaceI] = (1.0/magSqr(d))*(invDd[fc[pFaceI]] & d);
|
||||||
*(invDd[faceCells[patchFaceI]] & d);
|
|
||||||
|
|
||||||
patchLsN[patchFaceI] = - (1.0/magSqr(d))
|
patchLsN[pFaceI] = - (1.0/magSqr(d))*(invDdNei[pFaceI] & d);
|
||||||
*(invDdNei[patchFaceI] & d);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
forAll(pd, patchFaceI)
|
forAll (pd, pFaceI)
|
||||||
{
|
{
|
||||||
const vector& d = pd[patchFaceI];
|
const vector& d = pd[pFaceI];
|
||||||
|
|
||||||
patchLsP[patchFaceI] = (1.0/magSqr(d))
|
patchLsP[pFaceI] = (1.0/magSqr(d))*(invDd[fc[pFaceI]] & d);
|
||||||
*(invDd[faceCells[patchFaceI]] & d);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# if 0
|
||||||
|
|
||||||
|
// Coefficient sign correction on least squares vectors
|
||||||
|
// The sign of the coefficient must be positive to ensure correct
|
||||||
|
// behaviour in coupled systems. This is checked by evaluating
|
||||||
|
// dot-product of the P/N vectors with the face area vector.
|
||||||
|
// If the dot-product is negative, cell is marked for use with the
|
||||||
|
// Gauss gradient, which is unconditionally positive
|
||||||
|
// HJ, 21/Apr/2015
|
||||||
|
|
||||||
|
// First loop: detect cells with bad least squares vectors
|
||||||
|
Info<< "NEW LEAST SQUARES VECTORS" << endl;
|
||||||
|
// Use Gauss Gradient field: set to 1 if Gauss is needed
|
||||||
|
volScalarField useGaussGrad
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"useGaussGrad",
|
||||||
|
mesh().pointsInstance(),
|
||||||
|
mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh(),
|
||||||
|
dimensionedScalar("zero", dimVolume, 0),
|
||||||
|
zeroGradientFvPatchScalarField::typeName
|
||||||
|
);
|
||||||
|
|
||||||
|
const surfaceVectorField& Sf = mesh().Sf();
|
||||||
|
const surfaceScalarField& w = mesh().weights();
|
||||||
|
|
||||||
|
const vectorField& SfIn = Sf.internalField();
|
||||||
|
const scalarField& wIn = w.internalField();
|
||||||
|
scalarField& uggIn = useGaussGrad.internalField();
|
||||||
|
|
||||||
|
// Check internal faces
|
||||||
|
forAll (owner, faceI)
|
||||||
|
{
|
||||||
|
if
|
||||||
|
(
|
||||||
|
(lsPIn[faceI] & SfIn[faceI])/(mag(lsPIn[faceI])*mag(SfIn[faceI]))
|
||||||
|
< smallDotProdTol_
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// Least square points in the wrong direction for owner
|
||||||
|
// Use Gauss gradient
|
||||||
|
uggIn[owner[faceI]] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
(lsNIn[faceI] & SfIn[faceI])/(mag(lsNIn[faceI])*mag(SfIn[faceI]))
|
||||||
|
> -smallDotProdTol_
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// Least square points in the wrong direction for owner.
|
||||||
|
// Note that Sf points into neighbour cell
|
||||||
|
// Use Gauss gradient
|
||||||
|
uggIn[neighbour[faceI]] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
forAll (lsP.boundaryField(), patchI)
|
||||||
|
{
|
||||||
|
fvsPatchVectorField& patchLsP = lsP.boundaryField()[patchI];
|
||||||
|
const vectorField& pSf = Sf.boundaryField()[patchI];
|
||||||
|
const fvPatch& p = mesh().boundary()[patchI];
|
||||||
|
const unallocLabelList& fc = p.faceCells();
|
||||||
|
|
||||||
|
// Same check for coupled and uncoupled
|
||||||
|
forAll (patchLsP, pFaceI)
|
||||||
|
{
|
||||||
|
if
|
||||||
|
(
|
||||||
|
(patchLsP[pFaceI] & pSf[pFaceI])/
|
||||||
|
(mag(patchLsP[pFaceI])*mag(pSf[pFaceI]))
|
||||||
|
< smallDotProdTol_
|
||||||
|
)
|
||||||
|
{
|
||||||
|
uggIn[fc[pFaceI]] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update boundary conditions for coupled boundaries. This synchronises
|
||||||
|
// the Gauss grad indication field
|
||||||
|
useGaussGrad.boundaryField().evaluateCoupled();
|
||||||
|
|
||||||
|
// Replace least square vectors with weighted Gauss gradient vectors
|
||||||
|
// for marked cells
|
||||||
|
|
||||||
|
// Prepare cell volumes with parallel communications
|
||||||
|
volScalarField cellV
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"cellV",
|
||||||
|
mesh().pointsInstance(),
|
||||||
|
mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh(),
|
||||||
|
dimensionedScalar("zero", dimVolume, 0),
|
||||||
|
zeroGradientFvPatchScalarField::typeName
|
||||||
|
);
|
||||||
|
cellV.internalField() = mesh().V();
|
||||||
|
|
||||||
|
// Evaluate coupled to exchange coupled neighbour field data
|
||||||
|
// across coupled boundaries. HJ, 18/Mar/2015
|
||||||
|
cellV.boundaryField().evaluateCoupled();
|
||||||
|
|
||||||
|
const scalarField& cellVIn = cellV.internalField();
|
||||||
|
|
||||||
|
// Internal faces
|
||||||
|
forAll (owner, faceI)
|
||||||
|
{
|
||||||
|
label own = owner[faceI];
|
||||||
|
label nei = neighbour[faceI];
|
||||||
|
|
||||||
|
if (uggIn[own] > SMALL)
|
||||||
|
{
|
||||||
|
// Gauss gradient for owner cell
|
||||||
|
lsPIn[faceI] = (1 - wIn[faceI])*SfIn[faceI]/cellVIn[own];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (uggIn[nei] > SMALL)
|
||||||
|
{
|
||||||
|
// Gauss gradient for neighbour cell
|
||||||
|
lsNIn[faceI] = -wIn[faceI]*SfIn[faceI]/cellVIn[nei];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Boundary faces
|
||||||
|
forAll (lsP.boundaryField(), patchI)
|
||||||
|
{
|
||||||
|
fvsPatchVectorField& patchLsP = lsP.boundaryField()[patchI];
|
||||||
|
fvsPatchVectorField& patchLsN = lsN.boundaryField()[patchI];
|
||||||
|
const fvPatch& p = mesh().boundary()[patchI];
|
||||||
|
const unallocLabelList& fc = p.faceCells();
|
||||||
|
|
||||||
|
const fvsPatchScalarField& pw = w.boundaryField()[patchI];
|
||||||
|
const vectorField& pSf = Sf.boundaryField()[patchI];
|
||||||
|
|
||||||
|
// Get indicator for local side
|
||||||
|
const fvPatchScalarField& ugg = useGaussGrad.boundaryField()[patchI];
|
||||||
|
const scalarField pUgg = ugg.patchInternalField();
|
||||||
|
|
||||||
|
if (p.coupled())
|
||||||
|
{
|
||||||
|
const scalarField cellVInNei =
|
||||||
|
cellV.boundaryField()[patchI].patchNeighbourField();
|
||||||
|
|
||||||
|
// Get indicator for neighbour side
|
||||||
|
const scalarField nUgg = ugg.patchNeighbourField();
|
||||||
|
|
||||||
|
forAll (pUgg, pFaceI)
|
||||||
|
{
|
||||||
|
if (pUgg[pFaceI] > SMALL)
|
||||||
|
{
|
||||||
|
// Gauss grad for owner cell
|
||||||
|
patchLsP[pFaceI] =
|
||||||
|
(1 - pw[pFaceI])*pSf[pFaceI]/cellVIn[fc[pFaceI]];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nUgg[pFaceI] > SMALL)
|
||||||
|
{
|
||||||
|
// Gauss gradient for neighbour cell
|
||||||
|
patchLsN[pFaceI] =
|
||||||
|
-pw[pFaceI]*pSf[pFaceI]/cellVInNei[pFaceI];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
forAll (pUgg, pFaceI)
|
||||||
|
{
|
||||||
|
if (pUgg[pFaceI] > SMALL)
|
||||||
|
{
|
||||||
|
// Gauss grad for owner cell
|
||||||
|
patchLsP[pFaceI] =
|
||||||
|
(1 - pw[pFaceI])*pSf[pFaceI]/cellVIn[fc[pFaceI]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "leastSquaresVectors::makeLeastSquaresVectors() :"
|
Info<< "leastSquaresVectors::makeLeastSquaresVectors() :"
|
||||||
|
|
|
@ -74,6 +74,12 @@ public:
|
||||||
TypeName("leastSquaresVectors");
|
TypeName("leastSquaresVectors");
|
||||||
|
|
||||||
|
|
||||||
|
// Static data members
|
||||||
|
|
||||||
|
//- Point merge tolerance
|
||||||
|
static const scalar smallDotProdTol_;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct given an fvMesh
|
//- Construct given an fvMesh
|
||||||
|
|
|
@ -27,7 +27,7 @@ Description
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "scalarLeastSquaresGrad.H"
|
#include "leastSquaresGrad.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ tmp<BlockLduSystem<vector, vector> > leastSquaresGrad<scalar>::fvmGrad
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("zero", dimVolume, 0),
|
dimensionedScalar("zero", dimVolume, 0),
|
||||||
"zeroGradient"
|
zeroGradientFvPatchScalarField::typeName
|
||||||
);
|
);
|
||||||
cellV.internalField() = mesh.V();
|
cellV.internalField() = mesh.V();
|
||||||
cellV.correctBoundaryConditions();
|
cellV.correctBoundaryConditions();
|
Binary file not shown.
|
@ -200,27 +200,25 @@ void Foam::BlockMatrixAgglomeration<Type>::calcAgglomeration()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Collect solo equations
|
// Collect solo equations
|
||||||
label nSolo = 0;
|
|
||||||
|
|
||||||
forAll (zeroCluster, eqnI)
|
forAll (zeroCluster, eqnI)
|
||||||
{
|
{
|
||||||
if (zeroCluster[eqnI])
|
if (zeroCluster[eqnI])
|
||||||
{
|
{
|
||||||
// Found solo equation
|
// Found solo equation
|
||||||
nSolo++;
|
nSolo_++;
|
||||||
|
|
||||||
agglomIndex_[eqnI] = nCoarseEqns_;
|
agglomIndex_[eqnI] = nCoarseEqns_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nSolo > 0)
|
if (nSolo_ > 0)
|
||||||
{
|
{
|
||||||
// Found solo equations
|
// Found solo equations
|
||||||
nCoarseEqns_++;
|
nCoarseEqns_++;
|
||||||
|
|
||||||
if (BlockLduMatrix<Type>::debug >= 2)
|
if (BlockLduMatrix<Type>::debug >= 3)
|
||||||
{
|
{
|
||||||
Pout<< "Found " << nSolo << " weakly connected equations."
|
Pout<< "Found " << nSolo_ << " weakly connected equations."
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -347,7 +345,7 @@ void Foam::BlockMatrixAgglomeration<Type>::calcAgglomeration()
|
||||||
|
|
||||||
reduce(coarsen_, andOp<bool>());
|
reduce(coarsen_, andOp<bool>());
|
||||||
|
|
||||||
if (BlockLduMatrix<Type>::debug >= 2)
|
if (BlockLduMatrix<Type>::debug >= 3)
|
||||||
{
|
{
|
||||||
Pout << "Coarse level size: " << nCoarseEqns_;
|
Pout << "Coarse level size: " << nCoarseEqns_;
|
||||||
|
|
||||||
|
@ -379,6 +377,7 @@ Foam::BlockMatrixAgglomeration<Type>::BlockMatrixAgglomeration
|
||||||
normPtr_(BlockCoeffNorm<Type>::New(dict)),
|
normPtr_(BlockCoeffNorm<Type>::New(dict)),
|
||||||
agglomIndex_(matrix_.lduAddr().size()),
|
agglomIndex_(matrix_.lduAddr().size()),
|
||||||
groupSize_(groupSize),
|
groupSize_(groupSize),
|
||||||
|
nSolo_(0),
|
||||||
nCoarseEqns_(0),
|
nCoarseEqns_(0),
|
||||||
coarsen_(false)
|
coarsen_(false)
|
||||||
{
|
{
|
||||||
|
@ -441,6 +440,8 @@ Foam::BlockMatrixAgglomeration<Type>::restrictMatrix() const
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
// Does the matrix have solo equations
|
||||||
|
bool soloEqns = nSolo_ > 0;
|
||||||
|
|
||||||
// Storage for block neighbours and coefficients
|
// Storage for block neighbours and coefficients
|
||||||
|
|
||||||
|
@ -468,6 +469,13 @@ Foam::BlockMatrixAgglomeration<Type>::restrictMatrix() const
|
||||||
label rmUpperAddr = agglomIndex_[upperAddr[fineCoeffi]];
|
label rmUpperAddr = agglomIndex_[upperAddr[fineCoeffi]];
|
||||||
label rmLowerAddr = agglomIndex_[lowerAddr[fineCoeffi]];
|
label rmLowerAddr = agglomIndex_[lowerAddr[fineCoeffi]];
|
||||||
|
|
||||||
|
// If the coefficient touches block zero and solo equations are
|
||||||
|
// present, skip it
|
||||||
|
if (soloEqns && (rmUpperAddr == 0 || rmLowerAddr == 0))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (rmUpperAddr == rmLowerAddr)
|
if (rmUpperAddr == rmLowerAddr)
|
||||||
{
|
{
|
||||||
// For each fine coeff inside of a coarse cluster keep the address
|
// For each fine coeff inside of a coarse cluster keep the address
|
||||||
|
@ -563,6 +571,16 @@ Foam::BlockMatrixAgglomeration<Type>::restrictMatrix() const
|
||||||
|
|
||||||
forAll(coeffRestrictAddr, fineCoeffi)
|
forAll(coeffRestrictAddr, fineCoeffi)
|
||||||
{
|
{
|
||||||
|
label rmUpperAddr = agglomIndex_[upperAddr[fineCoeffi]];
|
||||||
|
label rmLowerAddr = agglomIndex_[lowerAddr[fineCoeffi]];
|
||||||
|
|
||||||
|
// If the coefficient touches block zero and solo equations are
|
||||||
|
// present, skip it
|
||||||
|
if (soloEqns && (rmUpperAddr == 0 || rmLowerAddr == 0))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (coeffRestrictAddr[fineCoeffi] >= 0)
|
if (coeffRestrictAddr[fineCoeffi] >= 0)
|
||||||
{
|
{
|
||||||
coeffRestrictAddr[fineCoeffi] =
|
coeffRestrictAddr[fineCoeffi] =
|
||||||
|
@ -765,6 +783,16 @@ Foam::BlockMatrixAgglomeration<Type>::restrictMatrix() const
|
||||||
|
|
||||||
forAll(coeffRestrictAddr, fineCoeffI)
|
forAll(coeffRestrictAddr, fineCoeffI)
|
||||||
{
|
{
|
||||||
|
label rmUpperAddr = agglomIndex_[upperAddr[fineCoeffI]];
|
||||||
|
label rmLowerAddr = agglomIndex_[lowerAddr[fineCoeffI]];
|
||||||
|
|
||||||
|
// If the coefficient touches block zero and
|
||||||
|
// solo equations are present, skip it
|
||||||
|
if (soloEqns && (rmUpperAddr == 0 || rmLowerAddr == 0))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
label cCoeff = coeffRestrictAddr[fineCoeffI];
|
label cCoeff = coeffRestrictAddr[fineCoeffI];
|
||||||
|
|
||||||
if (cCoeff >= 0)
|
if (cCoeff >= 0)
|
||||||
|
@ -837,6 +865,16 @@ Foam::BlockMatrixAgglomeration<Type>::restrictMatrix() const
|
||||||
|
|
||||||
forAll(coeffRestrictAddr, fineCoeffI)
|
forAll(coeffRestrictAddr, fineCoeffI)
|
||||||
{
|
{
|
||||||
|
label rmUpperAddr = agglomIndex_[upperAddr[fineCoeffI]];
|
||||||
|
label rmLowerAddr = agglomIndex_[lowerAddr[fineCoeffI]];
|
||||||
|
|
||||||
|
// If the coefficient touches block zero and
|
||||||
|
// solo equations are present, skip it
|
||||||
|
if (soloEqns && (rmUpperAddr == 0 || rmLowerAddr == 0))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
label cCoeff = coeffRestrictAddr[fineCoeffI];
|
label cCoeff = coeffRestrictAddr[fineCoeffI];
|
||||||
|
|
||||||
if (cCoeff >= 0)
|
if (cCoeff >= 0)
|
||||||
|
|
|
@ -74,6 +74,9 @@ class BlockMatrixAgglomeration
|
||||||
//- Group size
|
//- Group size
|
||||||
label groupSize_;
|
label groupSize_;
|
||||||
|
|
||||||
|
//- Number of solo cells
|
||||||
|
label nSolo_;
|
||||||
|
|
||||||
//- Number of coarse equations
|
//- Number of coarse equations
|
||||||
label nCoarseEqns_;
|
label nCoarseEqns_;
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,7 @@ class BlockMatrixCoarsening
|
||||||
//- Minimum number of coarse level equations
|
//- Minimum number of coarse level equations
|
||||||
label minCoarseEqns_;
|
label minCoarseEqns_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
|
|
|
@ -224,7 +224,7 @@ void Foam::coarseBlockAmgLevel<Type>::solve
|
||||||
// Switch of debug in top-level direct solve
|
// Switch of debug in top-level direct solve
|
||||||
label oldDebug = BlockLduMatrix<Type>::debug;
|
label oldDebug = BlockLduMatrix<Type>::debug;
|
||||||
|
|
||||||
if (BlockLduMatrix<Type>::debug >= 3)
|
if (BlockLduMatrix<Type>::debug >= 4)
|
||||||
{
|
{
|
||||||
BlockLduMatrix<Type>::debug = 1;
|
BlockLduMatrix<Type>::debug = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,14 +66,9 @@ class BlockCoeffMaxNorm
|
||||||
//- Control data dictionary
|
//- Control data dictionary
|
||||||
dictionary dict_;
|
dictionary dict_;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected data types
|
|
||||||
|
|
||||||
|
|
||||||
// Protected data
|
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
//- Return dictionary
|
//- Return dictionary
|
||||||
|
@ -82,6 +77,7 @@ protected:
|
||||||
return dict_;
|
return dict_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
|
|
|
@ -179,27 +179,25 @@ void Foam::pamgPolicy::calcChild()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Collect solo equations
|
// Collect solo equations
|
||||||
label nSolo = 0;
|
|
||||||
|
|
||||||
forAll (zeroCluster, eqnI)
|
forAll (zeroCluster, eqnI)
|
||||||
{
|
{
|
||||||
if (zeroCluster[eqnI])
|
if (zeroCluster[eqnI])
|
||||||
{
|
{
|
||||||
// Found solo equation
|
// Found solo equation
|
||||||
nSolo++;
|
nSolo_++;
|
||||||
|
|
||||||
child_[eqnI] = nCoarseEqns_;
|
child_[eqnI] = nCoarseEqns_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nSolo > 0)
|
if (nSolo_ > 0)
|
||||||
{
|
{
|
||||||
// Found solo equations
|
// Found solo equations
|
||||||
nCoarseEqns_++;
|
nCoarseEqns_++;
|
||||||
|
|
||||||
if (lduMatrix::debug >= 2)
|
if (lduMatrix::debug >= 2)
|
||||||
{
|
{
|
||||||
Pout << "Found " << nSolo << " weakly connected equations."
|
Pout<< "Found " << nSolo_ << " weakly connected equations."
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -334,6 +332,7 @@ Foam::pamgPolicy::pamgPolicy
|
||||||
amgPolicy(groupSize, minCoarseEqns),
|
amgPolicy(groupSize, minCoarseEqns),
|
||||||
matrix_(matrix),
|
matrix_(matrix),
|
||||||
child_(),
|
child_(),
|
||||||
|
nSolo_(0),
|
||||||
nCoarseEqns_(0),
|
nCoarseEqns_(0),
|
||||||
coarsen_(false)
|
coarsen_(false)
|
||||||
{
|
{
|
||||||
|
@ -395,6 +394,9 @@ Foam::autoPtr<Foam::amgMatrix> Foam::pamgPolicy::restrictMatrix
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
||||||
|
// Does the matrix have solo equations
|
||||||
|
bool soloEqns = nSolo_ > 0;
|
||||||
|
|
||||||
// Storage for block neighbours and coefficients
|
// Storage for block neighbours and coefficients
|
||||||
|
|
||||||
// Guess initial maximum number of neighbours in block
|
// Guess initial maximum number of neighbours in block
|
||||||
|
@ -409,6 +411,9 @@ Foam::autoPtr<Foam::amgMatrix> Foam::pamgPolicy::restrictMatrix
|
||||||
scalarList blockCoeffsData(maxNnbrs*nCoarseEqns_, 0.0);
|
scalarList blockCoeffsData(maxNnbrs*nCoarseEqns_, 0.0);
|
||||||
|
|
||||||
// Create face-restriction addressing
|
// Create face-restriction addressing
|
||||||
|
// Note: value of coeffRestrictAddr for off-diagonal coefficients
|
||||||
|
// touching solo cells will be invalid
|
||||||
|
// HJ, 7/Apr/2015
|
||||||
labelList coeffRestrictAddr(nFineCoeffs);
|
labelList coeffRestrictAddr(nFineCoeffs);
|
||||||
|
|
||||||
// Initial neighbour array (not in upper-triangle order)
|
// Initial neighbour array (not in upper-triangle order)
|
||||||
|
@ -418,17 +423,24 @@ Foam::autoPtr<Foam::amgMatrix> Foam::pamgPolicy::restrictMatrix
|
||||||
label nCoarseCoeffs = 0;
|
label nCoarseCoeffs = 0;
|
||||||
|
|
||||||
// Loop through all fine coeffs
|
// Loop through all fine coeffs
|
||||||
forAll (upperAddr, fineCoeffi)
|
forAll (upperAddr, fineCoeffI)
|
||||||
{
|
{
|
||||||
label rmUpperAddr = child_[upperAddr[fineCoeffi]];
|
label rmUpperAddr = child_[upperAddr[fineCoeffI]];
|
||||||
label rmLowerAddr = child_[lowerAddr[fineCoeffi]];
|
label rmLowerAddr = child_[lowerAddr[fineCoeffI]];
|
||||||
|
|
||||||
|
// If the coefficient touches block zero and solo equations are
|
||||||
|
// present, skip it
|
||||||
|
if (soloEqns && (rmUpperAddr == 0 || rmLowerAddr == 0))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (rmUpperAddr == rmLowerAddr)
|
if (rmUpperAddr == rmLowerAddr)
|
||||||
{
|
{
|
||||||
// For each fine coeff inside of a coarse cluster keep the address
|
// For each fine coeff inside of a coarse cluster keep the address
|
||||||
// of the cluster corresponding to the coeff in the
|
// of the cluster corresponding to the coeff in the
|
||||||
// coeffRestrictAddr as a negative index
|
// coeffRestrictAddr as a negative index
|
||||||
coeffRestrictAddr[fineCoeffi] = -(rmUpperAddr + 1);
|
coeffRestrictAddr[fineCoeffI] = -(rmUpperAddr + 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -455,7 +467,7 @@ Foam::autoPtr<Foam::amgMatrix> Foam::pamgPolicy::restrictMatrix
|
||||||
if (initCoarseNeighb[ccCoeffs[i]] == cNei)
|
if (initCoarseNeighb[ccCoeffs[i]] == cNei)
|
||||||
{
|
{
|
||||||
nbrFound = true;
|
nbrFound = true;
|
||||||
coeffRestrictAddr[fineCoeffi] = ccCoeffs[i];
|
coeffRestrictAddr[fineCoeffI] = ccCoeffs[i];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -485,7 +497,7 @@ Foam::autoPtr<Foam::amgMatrix> Foam::pamgPolicy::restrictMatrix
|
||||||
|
|
||||||
ccCoeffs[ccnCoeffs] = nCoarseCoeffs;
|
ccCoeffs[ccnCoeffs] = nCoarseCoeffs;
|
||||||
initCoarseNeighb[nCoarseCoeffs] = cNei;
|
initCoarseNeighb[nCoarseCoeffs] = cNei;
|
||||||
coeffRestrictAddr[fineCoeffi] = nCoarseCoeffs;
|
coeffRestrictAddr[fineCoeffI] = nCoarseCoeffs;
|
||||||
ccnCoeffs++;
|
ccnCoeffs++;
|
||||||
|
|
||||||
// New coarse coeff created
|
// New coarse coeff created
|
||||||
|
@ -518,12 +530,22 @@ Foam::autoPtr<Foam::amgMatrix> Foam::pamgPolicy::restrictMatrix
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll(coeffRestrictAddr, fineCoeffi)
|
forAll (coeffRestrictAddr, fineCoeffI)
|
||||||
{
|
{
|
||||||
if (coeffRestrictAddr[fineCoeffi] >= 0)
|
label rmUpperAddr = child_[upperAddr[fineCoeffI]];
|
||||||
|
label rmLowerAddr = child_[lowerAddr[fineCoeffI]];
|
||||||
|
|
||||||
|
// If the coefficient touches block zero and solo equations are
|
||||||
|
// present, skip it
|
||||||
|
if (soloEqns && (rmUpperAddr == 0 || rmLowerAddr == 0))
|
||||||
{
|
{
|
||||||
coeffRestrictAddr[fineCoeffi] =
|
continue;
|
||||||
coarseCoeffMap[coeffRestrictAddr[fineCoeffi]];
|
}
|
||||||
|
|
||||||
|
if (coeffRestrictAddr[fineCoeffI] >= 0)
|
||||||
|
{
|
||||||
|
coeffRestrictAddr[fineCoeffI] =
|
||||||
|
coarseCoeffMap[coeffRestrictAddr[fineCoeffI]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -698,6 +720,16 @@ Foam::autoPtr<Foam::amgMatrix> Foam::pamgPolicy::restrictMatrix
|
||||||
|
|
||||||
forAll (coeffRestrictAddr, fineCoeffI)
|
forAll (coeffRestrictAddr, fineCoeffI)
|
||||||
{
|
{
|
||||||
|
label rmUpperAddr = child_[upperAddr[fineCoeffI]];
|
||||||
|
label rmLowerAddr = child_[lowerAddr[fineCoeffI]];
|
||||||
|
|
||||||
|
// If the coefficient touches block zero and solo equations are
|
||||||
|
// present, skip it
|
||||||
|
if (soloEqns && (rmUpperAddr == 0 || rmLowerAddr == 0))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
label cCoeff = coeffRestrictAddr[fineCoeffI];
|
label cCoeff = coeffRestrictAddr[fineCoeffI];
|
||||||
|
|
||||||
if (cCoeff >= 0)
|
if (cCoeff >= 0)
|
||||||
|
@ -723,6 +755,16 @@ Foam::autoPtr<Foam::amgMatrix> Foam::pamgPolicy::restrictMatrix
|
||||||
|
|
||||||
forAll (coeffRestrictAddr, fineCoeffI)
|
forAll (coeffRestrictAddr, fineCoeffI)
|
||||||
{
|
{
|
||||||
|
label rmUpperAddr = child_[upperAddr[fineCoeffI]];
|
||||||
|
label rmLowerAddr = child_[lowerAddr[fineCoeffI]];
|
||||||
|
|
||||||
|
// If the coefficient touches block zero and solo equations are
|
||||||
|
// present, skip it
|
||||||
|
if (soloEqns && (rmUpperAddr == 0 || rmLowerAddr == 0))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
label cCoeff = coeffRestrictAddr[fineCoeffI];
|
label cCoeff = coeffRestrictAddr[fineCoeffI];
|
||||||
|
|
||||||
if (cCoeff >= 0)
|
if (cCoeff >= 0)
|
||||||
|
|
|
@ -59,9 +59,12 @@ class pamgPolicy
|
||||||
//- Reference to matrix
|
//- Reference to matrix
|
||||||
const lduMatrix& matrix_;
|
const lduMatrix& matrix_;
|
||||||
|
|
||||||
//- Child array
|
//- Child array: for each fine equation give coarse cluster index
|
||||||
labelField child_;
|
labelField child_;
|
||||||
|
|
||||||
|
//- Number of solo cells
|
||||||
|
label nSolo_;
|
||||||
|
|
||||||
//- Number of coarse equations
|
//- Number of coarse equations
|
||||||
label nCoarseEqns_;
|
label nCoarseEqns_;
|
||||||
|
|
||||||
|
|
|
@ -263,7 +263,9 @@ void Foam::fineAmgLevel::scaleX
|
||||||
// Scale x
|
// Scale x
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
scalingVector[0]*scalingVector[1] <= 0
|
mag(scalingVector[0]) > GREAT
|
||||||
|
|| mag(scalingVector[1]) > GREAT
|
||||||
|
|| scalingVector[0]*scalingVector[1] <= 0
|
||||||
|| mag(scalingVector[0]) < mag(scalingVector[1])
|
|| mag(scalingVector[0]) < mag(scalingVector[1])
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
|
@ -236,7 +236,10 @@ Foam::lduSolverPerformance Foam::deflationSolver::solve
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
nDirs < maxDirs_
|
nDirs < maxDirs_
|
||||||
&& R[qI][qI] > 1e-3*Foam::max(R[0][0], R[1][1])
|
&& (
|
||||||
|
R[qI][qI] > GREAT
|
||||||
|
|| R[qI][qI] > 1e-3*Foam::max(R[0][0], R[1][1])
|
||||||
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Z.set(nDirs, new scalarField(Q[qI]));
|
Z.set(nDirs, new scalarField(Q[qI]));
|
||||||
|
|
|
@ -68,13 +68,21 @@ solvers
|
||||||
}
|
}
|
||||||
|
|
||||||
blockSolver
|
blockSolver
|
||||||
{}
|
{
|
||||||
|
convergence 1e-6;
|
||||||
|
}
|
||||||
|
|
||||||
SIMPLE
|
SIMPLE
|
||||||
{
|
{
|
||||||
nNonOrthoCorrectors 0;
|
nNonOrthoCorrectors 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fieldBounds
|
||||||
|
{
|
||||||
|
U 500;
|
||||||
|
p -5e4 5e4;
|
||||||
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
{
|
{
|
||||||
U 0.95;
|
U 0.95;
|
||||||
|
|
|
@ -82,7 +82,9 @@ solvers
|
||||||
}
|
}
|
||||||
|
|
||||||
blockSolver
|
blockSolver
|
||||||
{}
|
{
|
||||||
|
convergence 1e-6;
|
||||||
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
{
|
{
|
||||||
|
@ -91,6 +93,12 @@ relaxationFactors
|
||||||
epsilon 0.9;
|
epsilon 0.9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fieldBounds
|
||||||
|
{
|
||||||
|
U 500;
|
||||||
|
p -5e4 5e4;
|
||||||
|
}
|
||||||
|
|
||||||
SIMPLE
|
SIMPLE
|
||||||
{
|
{
|
||||||
nNonOrthoCorrectors 0;
|
nNonOrthoCorrectors 0;
|
||||||
|
|
|
@ -69,10 +69,18 @@ solvers
|
||||||
|
|
||||||
blockSolver
|
blockSolver
|
||||||
{
|
{
|
||||||
|
convergence 1e-6;
|
||||||
|
|
||||||
pRefCell 0;
|
pRefCell 0;
|
||||||
pRefValue 0;
|
pRefValue 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fieldBounds
|
||||||
|
{
|
||||||
|
U 500;
|
||||||
|
p -5e4 5e4;
|
||||||
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
{
|
{
|
||||||
U 0.999;
|
U 0.999;
|
||||||
|
|
|
@ -16,7 +16,7 @@ FoamFile
|
||||||
|
|
||||||
ddtSchemes
|
ddtSchemes
|
||||||
{
|
{
|
||||||
default CrankNicholson 0.9;
|
default CrankNicolson 0.9;
|
||||||
}
|
}
|
||||||
|
|
||||||
gradSchemes
|
gradSchemes
|
||||||
|
|
Reference in a new issue