diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..35b705f3a
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,3 @@
+
+*.H gitlab-language=cpp
+*.C gitlab-language=cpp
\ No newline at end of file
diff --git a/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch b/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch
index 1bf93c7ad..394e0b346 100644
--- a/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch
+++ b/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch
@@ -1,6 +1,31 @@
+diff -ruN ParMGridGen-1.0_orig/Makefile ParMGridGen-1.0/Makefile
+--- ParMGridGen-1.0_orig/Makefile 2017-04-04 15:02:44.020713666 +0200
++++ ParMGridGen-1.0/Makefile 2017-04-04 15:21:48.582647336 +0200
+@@ -1,16 +1,21 @@
+ default:
++ (mkdir bin)
+ (cd MGridGen ; make)
+
+ serial:
++ (mkdir bin)
+ (cd MGridGen ; make)
+
+ parallel:
++ (mkdir bin)
+ (cd MGridGen ; make)
+ (cd ParMGridGen ; make)
+ clean:
++ (mkdir bin)
+ (cd MGridGen ; make clean)
+ (cd ParMGridGen ; make clean )
+
+ realclean:
++ (mkdir bin)
+ (cd MGridGen ; make realclean )
+ (cd ParMGridGen ; make realclean )
diff -ruN ParMGridGen-1.0_orig/Makefile.in ParMGridGen-1.0/Makefile.in
---- ParMGridGen-1.0_orig/Makefile.in 2001-12-04 16:30:33.000000000 -0800
-+++ ParMGridGen-1.0/Makefile.in 2013-08-22 20:07:33.491171127 -0700
+--- ParMGridGen-1.0_orig/Makefile.in 2017-04-04 15:02:44.012713543 +0200
++++ ParMGridGen-1.0/Makefile.in 2017-04-04 15:06:00.159742074 +0200
@@ -1,6 +1,6 @@
#--------------------------------------------------------------------------
# Which make to use
@@ -18,6 +43,15 @@ diff -ruN ParMGridGen-1.0_orig/Makefile.in ParMGridGen-1.0/Makefile.in
# Which loader to use
LD = cc
+@@ -22,7 +22,7 @@
+ LDOPTIONS = -O3
+
+ # Where to put the executable
+-BINDIR = ../..
++BINDIR = ../../bin
+
+ # Additional libraries
+ DMALLOCDIR = /usr/local
@@ -33,22 +33,25 @@
# In which directories to look for any additional libraries
diff --git a/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch_darwin b/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch_darwin
index 29a9db97c..2f793fb40 100644
--- a/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch_darwin
+++ b/ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch_darwin
@@ -79,8 +79,8 @@ diff -ruN ParMGridGen-1.0_orig/MGridGen/Programs/Makefile ParMGridGen-1.0/MGridG
ifeq ($(ddmalloc),yes)
DEBUGFLAGS := $(DEBUGFLAGS) -DDMALLOC -DDEBUG
diff -ruN ParMGridGen-1.0_orig/Makefile.in ParMGridGen-1.0/Makefile.in
---- ParMGridGen-1.0_orig/Makefile.in 2011-12-24 13:54:44.000000000 -0500
-+++ ParMGridGen-1.0/Makefile.in 2011-12-24 13:49:26.000000000 -0500
+--- ParMGridGen-1.0_orig/Makefile.in 2001-12-05 01:30:33.000000000 +0100
++++ ParMGridGen-1.0/Makefile.in 2017-04-04 15:36:04.695980033 +0200
@@ -1,6 +1,6 @@
#--------------------------------------------------------------------------
# Which make to use
@@ -98,6 +98,15 @@ diff -ruN ParMGridGen-1.0_orig/Makefile.in ParMGridGen-1.0/Makefile.in
# Which loader to use
LD = cc
+@@ -22,7 +22,7 @@
+ LDOPTIONS = -O3
+
+ # Where to put the executable
+-BINDIR = ../..
++BINDIR = ../../bin
+
+ # Additional libraries
+ DMALLOCDIR = /usr/local
@@ -33,22 +33,25 @@
# In which directories to look for any additional libraries
@@ -129,3 +138,28 @@ diff -ruN ParMGridGen-1.0_orig/Makefile.in ParMGridGen-1.0/Makefile.in
#--------------------------------------------------------------------------
#
+diff -ruN ParMGridGen-1.0_orig/Makefile ParMGridGen-1.0/Makefile
+--- ParMGridGen-1.0_orig/Makefile 2001-11-09 00:41:22.000000000 +0100
++++ ParMGridGen-1.0/Makefile 2017-04-04 14:51:04.033914737 +0200
+@@ -1,16 +1,21 @@
+ default:
++ (mkdir bin)
+ (cd MGridGen ; make)
+
+ serial:
++ (mkdir bin)
+ (cd MGridGen ; make)
+
+ parallel:
++ (mkdir bin)
+ (cd MGridGen ; make)
+ (cd ParMGridGen ; make)
+ clean:
++ (mkdir bin)
+ (cd MGridGen ; make clean)
+ (cd ParMGridGen ; make clean )
+
+ realclean:
++ (mkdir bin)
+ (cd MGridGen ; make realclean )
+ (cd ParMGridGen ; make realclean )
diff --git a/ThirdParty/rpmBuild/SOURCES/ParaView-4.4.0.patch_darwin b/ThirdParty/rpmBuild/SOURCES/ParaView-4.4.0.patch_darwin
new file mode 100644
index 000000000..3d1d8ce4b
--- /dev/null
+++ b/ThirdParty/rpmBuild/SOURCES/ParaView-4.4.0.patch_darwin
@@ -0,0 +1,12 @@
+diff -ruN ParaView-4.3.1_orig/Applications/ParaView-4.3.1_extra_install_Darwin.cmake ParaView-4.3.1/Applications/ParaView-4.3.1_extra_install_Darwin.cmake
+--- ParaView-4.3.1_orig/Applications/ParaView-4.3.1_extra_install_Darwin.cmake 1969-12-31 19:00:00.000000000 -0500
++++ ParaView-4.3.1/Applications/ParaView-4.3.1_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 ${CMAKE_INSTALL_PREFIX}/bin
++ USE_SOURCE_PERMISSIONS
++ COMPONENT Runtime)
++
diff --git a/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0 b/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0
index dbbcb47aa..4a82e7fcf 100644
--- a/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0
+++ b/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0
@@ -1,13 +1,13 @@
diff -ruN libccmio-2.6.1_orig/config/config.gnu.to.star libccmio-2.6.1/config/config.gnu.to.star
---- libccmio-2.6.1_orig/config/config.gnu.to.star 2007-12-17 18:32:03.000000000 -0500
-+++ libccmio-2.6.1/config/config.gnu.to.star 2010-12-18 14:50:35.000000000 -0500
+--- libccmio-2.6.1_orig/config/config.gnu.to.star 2007-12-18 00:32:03.000000000 +0100
++++ libccmio-2.6.1/config/config.gnu.to.star 2017-04-04 13:41:35.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# $Id: config.gnu.to.star,v 1.4 2006/06/05 21:12:16 geoffp Exp $
-@@ -34,6 +34,12 @@
+@@ -34,6 +34,13 @@
x86_64-unknown-linux-gnu-null) echo linux64_2.4-x86-glibc_2.2.5 ;;
ppc64-unknown-linux-gnu-null) echo linux64_2.6-pwr4-glibc_2.3.3 ;;
i386-apple-darwin8-null) echo i386-apple-darwin8 ;;
@@ -17,6 +17,7 @@ diff -ruN libccmio-2.6.1_orig/config/config.gnu.to.star libccmio-2.6.1/config/co
+ i386-apple-darwin13-null) echo i386-apple-darwin13 ;;
+ i386-apple-darwin14-null) echo i386-apple-darwin14 ;;
+ i386-apple-darwin15-null) echo i386-apple-darwin15 ;;
++ i386-apple-darwin16-null) echo i386-apple-darwin16 ;;
*) echo unknown ;;
esac
@@ -30,15 +31,15 @@ diff -ruN libccmio-2.6.1_orig/config/config.guess libccmio-2.6.1/config/config.g
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
diff -ruN libccmio-2.6.1_orig/config/config.system libccmio-2.6.1/config/config.system
---- libccmio-2.6.1_orig/config/config.system 2008-02-25 22:07:16.000000000 -0500
-+++ libccmio-2.6.1/config/config.system 2010-12-18 14:51:34.000000000 -0500
+--- libccmio-2.6.1_orig/config/config.system 2008-02-26 04:07:16.000000000 +0100
++++ libccmio-2.6.1/config/config.system 2017-04-04 13:42:15.000000000 +0200
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
# $Id: config.system,v 1.2 2005/09/29 22:19:19 geoffp Exp $
-@@ -87,6 +87,27 @@
+@@ -87,6 +87,30 @@
i386-apple-darwin8.11.1)
echo i386-apple-darwin8 ;;
@@ -62,6 +63,9 @@ diff -ruN libccmio-2.6.1_orig/config/config.system libccmio-2.6.1/config/config.
+
+ i386-apple-darwin15.* )
+ echo i386-apple-darwin15 ;;
++
++ i386-apple-darwin16.* )
++ echo i386-apple-darwin16 ;;
+
*)
echo unknown
diff --git a/ThirdParty/rpmBuild/SOURCES/mesquite-2.1.2_patch1 b/ThirdParty/rpmBuild/SOURCES/mesquite-2.1.2_patch1
new file mode 100644
index 000000000..850bb8402
--- /dev/null
+++ b/ThirdParty/rpmBuild/SOURCES/mesquite-2.1.2_patch1
@@ -0,0 +1,1343 @@
+diff -rupN mesquite-2.1.2/config_aux/config.guess mesquite-2.1.2_mod/config_aux/config.guess
+--- mesquite-2.1.2/config_aux/config.guess 2010-09-29 07:41:06.000000000 +0000
++++ mesquite-2.1.2_mod/config_aux/config.guess 2017-04-04 02:21:34.130783808 +0000
+@@ -1,14 +1,12 @@
+ #! /bin/sh
+ # Attempt to guess a canonical system name.
+-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+-# Free Software Foundation, Inc.
++# Copyright 1992-2017 Free Software Foundation, Inc.
+
+-timestamp='2009-04-27'
++timestamp='2017-03-05'
+
+ # This file 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 2 of the License, or
++# the Free Software Foundation; either version 3 of the License, or
+ # (at your option) any later version.
+ #
+ # This program is distributed in the hope that it will be useful, but
+@@ -17,26 +15,22 @@ timestamp='2009-04-27'
+ # General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+-# 02110-1301, USA.
++# along with this program; if not, see .
+ #
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+ # configuration script generated by Autoconf, you may include it under
+-# the same distribution terms that you use for the rest of that program.
+-
+-
+-# Originally written by Per Bothner .
+-# Please send patches to . Submit a context
+-# diff and a properly formatted ChangeLog entry.
++# the same distribution terms that you use for the rest of that
++# program. This Exception is an additional permission under section 7
++# of the GNU General Public License, version 3 ("GPLv3").
+ #
+-# This script attempts to guess a canonical system name similar to
+-# config.sub. If it succeeds, it prints the system name on stdout, and
+-# exits with 0. Otherwise, it exits with 1.
++# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+ #
+-# The plan is that this can be called by configure scripts if you
+-# don't specify an explicit build system type.
++# You can get the latest version of this script from:
++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
++#
++# Please send patches to .
++
+
+ me=`echo "$0" | sed -e 's,.*/,,'`
+
+@@ -56,8 +50,7 @@ version="\
+ GNU config.guess ($timestamp)
+
+ Originally written by Per Bothner.
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
++Copyright 1992-2017 Free Software Foundation, Inc.
+
+ This is free software; see the source for copying conditions. There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -139,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` |
+ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
++case "${UNAME_SYSTEM}" in
++Linux|GNU|GNU/*)
++ # If the system lacks a compiler, then just pick glibc.
++ # We could probably try harder.
++ LIBC=gnu
++
++ eval $set_cc_for_build
++ cat <<-EOF > $dummy.c
++ #include
++ #if defined(__UCLIBC__)
++ LIBC=uclibc
++ #elif defined(__dietlibc__)
++ LIBC=dietlibc
++ #else
++ LIBC=gnu
++ #endif
++ EOF
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
++ ;;
++esac
++
+ # Note: order is significant - the case branches are not exclusive.
+
+ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
++ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+@@ -154,23 +168,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
++ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
++ /sbin/$sysctl 2>/dev/null || \
++ /usr/sbin/$sysctl 2>/dev/null || \
++ echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
++ earmv*)
++ arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
++ endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
++ machine=${arch}${endian}-unknown
++ ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+- # to ELF recently, or will in the future.
++ # to ELF recently (or will in the future) and ABI.
+ case "${UNAME_MACHINE_ARCH}" in
++ earm*)
++ os=netbsdelf
++ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+- | grep __ELF__ >/dev/null
++ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+@@ -180,7 +204,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+ fi
+ ;;
+ *)
+- os=netbsd
++ os=netbsd
++ ;;
++ esac
++ # Determine ABI tags.
++ case "${UNAME_MACHINE_ARCH}" in
++ earm*)
++ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
++ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ ;;
+ esac
+ # The OS release
+@@ -193,18 +224,26 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+ release='-gnu'
+ ;;
+ *)
+- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
++ release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+- echo "${machine}-${os}${release}"
++ echo "${machine}-${os}${release}${abi}"
++ exit ;;
++ *:Bitrig:*:*)
++ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
++ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
++ *:LibertyBSD:*:*)
++ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
++ echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
++ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+@@ -217,13 +256,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
++ *:Sortix:*:*)
++ echo ${UNAME_MACHINE}-unknown-sortix
++ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+@@ -233,43 +275,46 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+- UNAME_MACHINE="alpha" ;;
++ UNAME_MACHINE=alpha ;;
+ "EV4.5 (21064)")
+- UNAME_MACHINE="alpha" ;;
++ UNAME_MACHINE=alpha ;;
+ "LCA4 (21066/21068)")
+- UNAME_MACHINE="alpha" ;;
++ UNAME_MACHINE=alpha ;;
+ "EV5 (21164)")
+- UNAME_MACHINE="alphaev5" ;;
++ UNAME_MACHINE=alphaev5 ;;
+ "EV5.6 (21164A)")
+- UNAME_MACHINE="alphaev56" ;;
++ UNAME_MACHINE=alphaev56 ;;
+ "EV5.6 (21164PC)")
+- UNAME_MACHINE="alphapca56" ;;
++ UNAME_MACHINE=alphapca56 ;;
+ "EV5.7 (21164PC)")
+- UNAME_MACHINE="alphapca57" ;;
++ UNAME_MACHINE=alphapca57 ;;
+ "EV6 (21264)")
+- UNAME_MACHINE="alphaev6" ;;
++ UNAME_MACHINE=alphaev6 ;;
+ "EV6.7 (21264A)")
+- UNAME_MACHINE="alphaev67" ;;
++ UNAME_MACHINE=alphaev67 ;;
+ "EV6.8CB (21264C)")
+- UNAME_MACHINE="alphaev68" ;;
++ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8AL (21264B)")
+- UNAME_MACHINE="alphaev68" ;;
++ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8CX (21264D)")
+- UNAME_MACHINE="alphaev68" ;;
++ UNAME_MACHINE=alphaev68 ;;
+ "EV6.9A (21264/EV69A)")
+- UNAME_MACHINE="alphaev69" ;;
++ UNAME_MACHINE=alphaev69 ;;
+ "EV7 (21364)")
+- UNAME_MACHINE="alphaev7" ;;
++ UNAME_MACHINE=alphaev7 ;;
+ "EV7.9 (21364A)")
+- UNAME_MACHINE="alphaev79" ;;
++ UNAME_MACHINE=alphaev79 ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+- exit ;;
++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
++ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
++ exitcode=$?
++ trap '' 0
++ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+@@ -295,12 +340,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+- echo powerpc-ibm-os400
++ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+- arm:riscos:*:*|arm:RISCOS:*:*)
++ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+@@ -333,18 +378,21 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
++ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
++ echo i386-pc-auroraux${UNAME_RELEASE}
++ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+- SUN_ARCH="i386"
++ SUN_ARCH=i386
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
++ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
++ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+- SUN_ARCH="x86_64"
++ SUN_ARCH=x86_64
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+@@ -369,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
++ test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+@@ -391,23 +439,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+- echo m68k-atari-mint${UNAME_RELEASE}
++ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+- exit ;;
++ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+- echo m68k-atari-mint${UNAME_RELEASE}
++ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+- echo m68k-milan-mint${UNAME_RELEASE}
+- exit ;;
++ echo m68k-milan-mint${UNAME_RELEASE}
++ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+- echo m68k-hades-mint${UNAME_RELEASE}
+- exit ;;
++ echo m68k-hades-mint${UNAME_RELEASE}
++ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+- echo m68k-unknown-mint${UNAME_RELEASE}
+- exit ;;
++ echo m68k-unknown-mint${UNAME_RELEASE}
++ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+@@ -477,8 +525,8 @@ EOF
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+- # DG/UX returns AViiON for all architectures
+- UNAME_PROCESSOR=`/usr/bin/uname -p`
++ # DG/UX returns AViiON for all architectures
++ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+@@ -491,7 +539,7 @@ EOF
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+- exit ;;
++ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+@@ -548,15 +596,16 @@ EOF
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+- *:AIX:*:[456])
++ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+- if [ -x /usr/bin/oslevel ] ; then
+- IBM_REV=`/usr/bin/oslevel`
++ if [ -x /usr/bin/lslpp ] ; then
++ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
++ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+@@ -591,58 +640,58 @@ EOF
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+- case "${sc_cpu_version}" in
+- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+- 532) # CPU_PA_RISC2_0
+- case "${sc_kernel_bits}" in
+- 32) HP_ARCH="hppa2.0n" ;;
+- 64) HP_ARCH="hppa2.0w" ;;
+- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+- esac ;;
+- esac
++ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
++ case "${sc_cpu_version}" in
++ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
++ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
++ 532) # CPU_PA_RISC2_0
++ case "${sc_kernel_bits}" in
++ 32) HP_ARCH=hppa2.0n ;;
++ 64) HP_ARCH=hppa2.0w ;;
++ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
++ esac ;;
++ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+- sed 's/^ //' << EOF >$dummy.c
++ sed 's/^ //' << EOF >$dummy.c
++
++ #define _HPUX_SOURCE
++ #include
++ #include
+
+- #define _HPUX_SOURCE
+- #include
+- #include
+-
+- int main ()
+- {
+- #if defined(_SC_KERNEL_BITS)
+- long bits = sysconf(_SC_KERNEL_BITS);
+- #endif
+- long cpu = sysconf (_SC_CPU_VERSION);
+-
+- switch (cpu)
+- {
+- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+- case CPU_PA_RISC2_0:
+- #if defined(_SC_KERNEL_BITS)
+- switch (bits)
+- {
+- case 64: puts ("hppa2.0w"); break;
+- case 32: puts ("hppa2.0n"); break;
+- default: puts ("hppa2.0"); break;
+- } break;
+- #else /* !defined(_SC_KERNEL_BITS) */
+- puts ("hppa2.0"); break;
+- #endif
+- default: puts ("hppa1.0"); break;
+- }
+- exit (0);
+- }
++ int main ()
++ {
++ #if defined(_SC_KERNEL_BITS)
++ long bits = sysconf(_SC_KERNEL_BITS);
++ #endif
++ long cpu = sysconf (_SC_CPU_VERSION);
++
++ switch (cpu)
++ {
++ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
++ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
++ case CPU_PA_RISC2_0:
++ #if defined(_SC_KERNEL_BITS)
++ switch (bits)
++ {
++ case 64: puts ("hppa2.0w"); break;
++ case 32: puts ("hppa2.0n"); break;
++ default: puts ("hppa2.0"); break;
++ } break;
++ #else /* !defined(_SC_KERNEL_BITS) */
++ puts ("hppa2.0"); break;
++ #endif
++ default: puts ("hppa1.0"); break;
++ }
++ exit (0);
++ }
+ EOF
+- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
++ (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+- if [ ${HP_ARCH} = "hppa2.0w" ]
++ if [ ${HP_ARCH} = hppa2.0w ]
+ then
+ eval $set_cc_for_build
+
+@@ -655,12 +704,12 @@ EOF
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+- grep __LP64__ >/dev/null
++ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
++ grep -q __LP64__
+ then
+- HP_ARCH="hppa2.0w"
++ HP_ARCH=hppa2.0w
+ else
+- HP_ARCH="hppa64"
++ HP_ARCH=hppa64
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+@@ -727,22 +776,22 @@ EOF
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+- exit ;;
++ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+- exit ;;
++ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+- exit ;;
++ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+- exit ;;
++ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+- exit ;;
++ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+@@ -765,15 +814,15 @@ EOF
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+- exit ;;
++ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
++ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
++ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
++ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+@@ -785,34 +834,40 @@ EOF
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+- case ${UNAME_MACHINE} in
+- pc98)
+- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ UNAME_PROCESSOR=`/usr/bin/uname -p`
++ case ${UNAME_PROCESSOR} in
+ amd64)
+- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+- *)
+- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ UNAME_PROCESSOR=x86_64 ;;
++ i386)
++ UNAME_PROCESSOR=i586 ;;
+ esac
++ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
++ *:MINGW64*:*)
++ echo ${UNAME_MACHINE}-pc-mingw64
++ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
++ *:MSYS*:*)
++ echo ${UNAME_MACHINE}-pc-msys
++ exit ;;
+ i*:windows32*:*)
+- # uname -m includes "-pc" on this system.
+- echo ${UNAME_MACHINE}-mingw32
++ # uname -m includes "-pc" on this system.
++ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+- *:Interix*:[3456]*)
+- case ${UNAME_MACHINE} in
++ *:Interix*:*)
++ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+- EM64T | authenticamd | genuineintel)
++ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+@@ -822,6 +877,9 @@ EOF
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
++ 8664:Windows_NT:*)
++ echo x86_64-pc-mks
++ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+@@ -842,210 +900,169 @@ EOF
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
++ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
++ aarch64:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ aarch64_be:Linux:*:*)
++ UNAME_MACHINE=aarch64_be
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ alpha:Linux:*:*)
++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
++ EV5) UNAME_MACHINE=alphaev5 ;;
++ EV56) UNAME_MACHINE=alphaev56 ;;
++ PCA56) UNAME_MACHINE=alphapca56 ;;
++ PCA57) UNAME_MACHINE=alphapca56 ;;
++ EV6) UNAME_MACHINE=alphaev6 ;;
++ EV67) UNAME_MACHINE=alphaev67 ;;
++ EV68*) UNAME_MACHINE=alphaev68 ;;
++ esac
++ objdump --private-headers /bin/sh | grep -q ld.so.1
++ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ arc:Linux:*:* | arceb:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
++ | grep -q __ARM_PCS_VFP
++ then
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
++ else
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
++ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+- echo cris-axis-linux-gnu
++ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+- echo crisv32-axis-linux-gnu
++ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
++ exit ;;
++ e2k:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+- echo frv-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ hexagon:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ i*86:Linux:*:*)
++ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ k1om:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+- mips:Linux:*:*)
+- eval $set_cc_for_build
+- sed 's/^ //' << EOF >$dummy.c
+- #undef CPU
+- #undef mips
+- #undef mipsel
+- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+- CPU=mipsel
+- #else
+- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+- CPU=mips
+- #else
+- CPU=
+- #endif
+- #endif
+-EOF
+- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+- /^CPU/{
+- s: ::g
+- p
+- }'`"
+- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+- ;;
+- mips64:Linux:*:*)
++ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+- #undef mips64
+- #undef mips64el
++ #undef ${UNAME_MACHINE}
++ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+- CPU=mips64el
++ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+- CPU=mips64
++ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+ EOF
+- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+- /^CPU/{
+- s: ::g
+- p
+- }'`"
+- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+- or32:Linux:*:*)
+- echo or32-unknown-linux-gnu
++ mips64el:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+- ppc:Linux:*:*)
+- echo powerpc-unknown-linux-gnu
++ openrisc*:Linux:*:*)
++ echo or1k-unknown-linux-${LIBC}
+ exit ;;
+- ppc64:Linux:*:*)
+- echo powerpc64-unknown-linux-gnu
+- exit ;;
+- alpha:Linux:*:*)
+- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+- EV5) UNAME_MACHINE=alphaev5 ;;
+- EV56) UNAME_MACHINE=alphaev56 ;;
+- PCA56) UNAME_MACHINE=alphapca56 ;;
+- PCA57) UNAME_MACHINE=alphapca56 ;;
+- EV6) UNAME_MACHINE=alphaev6 ;;
+- EV67) UNAME_MACHINE=alphaev67 ;;
+- EV68*) UNAME_MACHINE=alphaev68 ;;
+- esac
+- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
++ or32:Linux:*:* | or1k*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+- echo sparc-unknown-linux-gnu
++ echo sparc-unknown-linux-${LIBC}
++ exit ;;
++ parisc64:Linux:*:* | hppa64:Linux:*:*)
++ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+- PA7*) echo hppa1.1-unknown-linux-gnu ;;
+- PA8*) echo hppa2.0-unknown-linux-gnu ;;
+- *) echo hppa-unknown-linux-gnu ;;
++ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
++ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
++ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+- parisc64:Linux:*:* | hppa64:Linux:*:*)
+- echo hppa64-unknown-linux-gnu
++ ppc64:Linux:*:*)
++ echo powerpc64-unknown-linux-${LIBC}
++ exit ;;
++ ppc:Linux:*:*)
++ echo powerpc-unknown-linux-${LIBC}
++ exit ;;
++ ppc64le:Linux:*:*)
++ echo powerpc64le-unknown-linux-${LIBC}
++ exit ;;
++ ppcle:Linux:*:*)
++ echo powerpcle-unknown-linux-${LIBC}
++ exit ;;
++ riscv32:Linux:*:* | riscv64:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+- echo ${UNAME_MACHINE}-ibm-linux
++ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ tile*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+- echo ${UNAME_MACHINE}-dec-linux-gnu
++ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+- echo x86_64-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+- i*86:Linux:*:*)
+- # The BFD linker knows what the default object file format is, so
+- # first see if it will tell us. cd to the root directory to prevent
+- # problems with other programs or directories called `ld' in the path.
+- # Set LC_ALL=C to ensure ld outputs messages in English.
+- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+- | sed -ne '/supported targets:/!d
+- s/[ ][ ]*/ /g
+- s/.*supported targets: *//
+- s/ .*//
+- p'`
+- case "$ld_supported_targets" in
+- elf32-i386)
+- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+- ;;
+- a.out-i386-linux)
+- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+- exit ;;
+- "")
+- # Either a pre-BFD a.out linker (linux-gnuoldld) or
+- # one that does not give us useful --help.
+- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+- exit ;;
+- esac
+- # Determine whether the default compiler is a.out or elf
+- eval $set_cc_for_build
+- sed 's/^ //' << EOF >$dummy.c
+- #include
+- #ifdef __ELF__
+- # ifdef __GLIBC__
+- # if __GLIBC__ >= 2
+- LIBC=gnu
+- # else
+- LIBC=gnulibc1
+- # endif
+- # else
+- LIBC=gnulibc1
+- # endif
+- #else
+- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+- LIBC=gnu
+- #else
+- LIBC=gnuaout
+- #endif
+- #endif
+- #ifdef __dietlibc__
+- LIBC=dietlibc
+- #endif
+-EOF
+- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+- /^LIBC/{
+- s: ::g
+- p
+- }'`"
+- test x"${LIBC}" != x && {
+- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+- exit
+- }
+- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+- ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+@@ -1053,11 +1070,11 @@ EOF
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+- # Unixware is an offshoot of SVR4, but it has its own version
+- # number series starting with 2...
+- # I am not positive that other SVR4 systems won't match this,
++ # Unixware is an offshoot of SVR4, but it has its own version
++ # number series starting with 2...
++ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+- # Use sysv4.2uw... so that sysv4* matches it.
++ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+@@ -1074,7 +1091,7 @@ EOF
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
++ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+@@ -1089,7 +1106,7 @@ EOF
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+- # UnixWare 7.x, OpenUNIX and OpenServer 6.
++ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+@@ -1117,13 +1134,13 @@ EOF
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+- # uname -m prints for DJGPP always 'pc', but it prints nothing about
+- # the processor, so we play safe by assuming i586.
++ # uname -m prints for DJGPP always 'pc', but it prints nothing about
++ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+- # prints for the "djgpp" host, or else GDB configury will decide that
++ # prints for the "djgpp" host, or else GDB configure will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+- exit ;;
++ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+@@ -1158,8 +1175,8 @@ EOF
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+- && { echo i486-ncr-sysv4; exit; } ;;
++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
++ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+@@ -1182,7 +1199,7 @@ EOF
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
++ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+@@ -1202,10 +1219,10 @@ EOF
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+- # says
+- echo i586-unisys-sysv4
+- exit ;;
++ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
++ # says
++ echo i586-unisys-sysv4
++ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes .
+ # How about differentiating between stratus architectures? -djm
+@@ -1231,11 +1248,11 @@ EOF
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+- echo mips-nec-sysv${UNAME_RELEASE}
++ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+- echo mips-unknown-sysv${UNAME_RELEASE}
++ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+- exit ;;
++ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+@@ -1248,6 +1265,9 @@ EOF
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
++ x86_64:Haiku:*:*)
++ echo x86_64-unknown-haiku
++ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+@@ -1266,6 +1286,9 @@ EOF
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
++ SX-ACE:SUPER-UX:*:*)
++ echo sxace-nec-superux${UNAME_RELEASE}
++ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+@@ -1274,14 +1297,36 @@ EOF
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+- case $UNAME_PROCESSOR in
+- unknown) UNAME_PROCESSOR=powerpc ;;
+- esac
++ eval $set_cc_for_build
++ if test "$UNAME_PROCESSOR" = unknown ; then
++ UNAME_PROCESSOR=powerpc
++ fi
++ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
++ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
++ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
++ grep IS_64BIT_ARCH >/dev/null
++ then
++ case $UNAME_PROCESSOR in
++ i386) UNAME_PROCESSOR=x86_64 ;;
++ powerpc) UNAME_PROCESSOR=powerpc64 ;;
++ esac
++ fi
++ fi
++ elif test "$UNAME_PROCESSOR" = i386 ; then
++ # Avoid executing cc on OS X 10.9, as it ships with a stub
++ # that puts up a graphical alert prompting to install
++ # developer tools. Any system running Mac OS X 10.7 or
++ # later (Darwin 11 and later) is required to have a 64-bit
++ # processor. This is not true of the ARM version of Darwin
++ # that Apple uses in portable devices.
++ UNAME_PROCESSOR=x86_64
++ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+- if test "$UNAME_PROCESSOR" = "x86"; then
++ if test "$UNAME_PROCESSOR" = x86; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+@@ -1290,12 +1335,18 @@ EOF
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+- NSE-?:NONSTOP_KERNEL:*:*)
++ NEO-?:NONSTOP_KERNEL:*:*)
++ echo neo-tandem-nsk${UNAME_RELEASE}
++ exit ;;
++ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
++ NSX-?:NONSTOP_KERNEL:*:*)
++ echo nsx-tandem-nsk${UNAME_RELEASE}
++ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+@@ -1309,7 +1360,7 @@ EOF
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+- if test "$cputype" = "386"; then
++ if test "$cputype" = 386; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+@@ -1335,13 +1386,13 @@ EOF
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+- echo mips-sei-seiux${UNAME_RELEASE}
++ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+- UNAME_MACHINE=`(uname -p) 2>/dev/null`
++ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+@@ -1351,7 +1402,7 @@ EOF
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
++ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+@@ -1359,174 +1410,28 @@ EOF
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+-esac
+-
+-#echo '(No uname command or uname output not recognized.)' 1>&2
+-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+-
+-eval $set_cc_for_build
+-cat >$dummy.c <
+-# include
+-#endif
+-main ()
+-{
+-#if defined (sony)
+-#if defined (MIPSEB)
+- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+- I don't know.... */
+- printf ("mips-sony-bsd\n"); exit (0);
+-#else
+-#include
+- printf ("m68k-sony-newsos%s\n",
+-#ifdef NEWSOS4
+- "4"
+-#else
+- ""
+-#endif
+- ); exit (0);
+-#endif
+-#endif
+-
+-#if defined (__arm) && defined (__acorn) && defined (__unix)
+- printf ("arm-acorn-riscix\n"); exit (0);
+-#endif
+-
+-#if defined (hp300) && !defined (hpux)
+- printf ("m68k-hp-bsd\n"); exit (0);
+-#endif
+-
+-#if defined (NeXT)
+-#if !defined (__ARCHITECTURE__)
+-#define __ARCHITECTURE__ "m68k"
+-#endif
+- int version;
+- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+- if (version < 4)
+- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+- else
+- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+- exit (0);
+-#endif
+-
+-#if defined (MULTIMAX) || defined (n16)
+-#if defined (UMAXV)
+- printf ("ns32k-encore-sysv\n"); exit (0);
+-#else
+-#if defined (CMU)
+- printf ("ns32k-encore-mach\n"); exit (0);
+-#else
+- printf ("ns32k-encore-bsd\n"); exit (0);
+-#endif
+-#endif
+-#endif
+-
+-#if defined (__386BSD__)
+- printf ("i386-pc-bsd\n"); exit (0);
+-#endif
+-
+-#if defined (sequent)
+-#if defined (i386)
+- printf ("i386-sequent-dynix\n"); exit (0);
+-#endif
+-#if defined (ns32000)
+- printf ("ns32k-sequent-dynix\n"); exit (0);
+-#endif
+-#endif
+-
+-#if defined (_SEQUENT_)
+- struct utsname un;
+-
+- uname(&un);
+-
+- if (strncmp(un.version, "V2", 2) == 0) {
+- printf ("i386-sequent-ptx2\n"); exit (0);
+- }
+- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+- printf ("i386-sequent-ptx1\n"); exit (0);
+- }
+- printf ("i386-sequent-ptx\n"); exit (0);
+-
+-#endif
+-
+-#if defined (vax)
+-# if !defined (ultrix)
+-# include
+-# if defined (BSD)
+-# if BSD == 43
+- printf ("vax-dec-bsd4.3\n"); exit (0);
+-# else
+-# if BSD == 199006
+- printf ("vax-dec-bsd4.3reno\n"); exit (0);
+-# else
+- printf ("vax-dec-bsd\n"); exit (0);
+-# endif
+-# endif
+-# else
+- printf ("vax-dec-bsd\n"); exit (0);
+-# endif
+-# else
+- printf ("vax-dec-ultrix\n"); exit (0);
+-# endif
+-#endif
+-
+-#if defined (alliant) && defined (i860)
+- printf ("i860-alliant-bsd\n"); exit (0);
+-#endif
+-
+- exit (1);
+-}
+-EOF
+-
+-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+- { echo "$SYSTEM_NAME"; exit; }
+-
+-# Apollos put the system type in the environment.
+-
+-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+-
+-# Convex versions that predate uname can use getsysinfo(1)
+-
+-if [ -x /usr/convex/getsysinfo ]
+-then
+- case `getsysinfo -f cpu_type` in
+- c1*)
+- echo c1-convex-bsd
+- exit ;;
+- c2*)
+- if getsysinfo -f scalar_acc
+- then echo c32-convex-bsd
+- else echo c2-convex-bsd
+- fi
+- exit ;;
+- c34*)
+- echo c34-convex-bsd
++ x86_64:VMkernel:*:*)
++ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
+- c38*)
+- echo c38-convex-bsd
+- exit ;;
+- c4*)
+- echo c4-convex-bsd
++ amd64:Isilon\ OneFS:*:*)
++ echo x86_64-unknown-onefs
+ exit ;;
+- esac
+-fi
++esac
+
+ cat >&2 < in order to provide the needed
+-information to handle your system.
++If $0 has already been updated, send the following data and any
++information you think might be pertinent to config-patches@gnu.org to
++provide the necessary information to handle your system.
+
+ config.guess timestamp = $timestamp
+
+@@ -1559,3 +1464,4 @@ exit 1
+ # time-stamp-format: "%:y-%02m-%02d"
+ # time-stamp-end: "'"
+ # End:
++
diff --git a/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec b/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec
index a8c47a8da..b62d21d0f 100644
--- a/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec
+++ b/ThirdParty/rpmBuild/SPECS/libccmio-2.6.1.spec
@@ -105,6 +105,7 @@ Patch0: libccmio-2.6.1.patch_0
[ ! -d config/i386-apple-darwin13 ] && cp -r config/i386-apple-darwin8 config/i386-apple-darwin13
[ ! -d config/i386-apple-darwin14 ] && cp -r config/i386-apple-darwin8 config/i386-apple-darwin14
[ ! -d config/i386-apple-darwin15 ] && cp -r config/i386-apple-darwin8 config/i386-apple-darwin15
+ [ ! -d config/i386-apple-darwin16 ] && cp -r config/i386-apple-darwin8 config/i386-apple-darwin16
%endif
# Warning:
# 1: The name of the ADF library will be renamed to libadf_ccmio since this
diff --git a/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec b/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec
index 2441aabb4..1b3e7d04d 100644
--- a/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec
+++ b/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec
@@ -80,6 +80,7 @@ Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
Patch0: mesquite-2.1.2_patch0
+Patch1: mesquite-2.1.2_patch1
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
@@ -90,6 +91,7 @@ Patch0: mesquite-2.1.2_patch0
%setup -q
%patch0 -p1
+%patch1 -p1
%build
# export WM settings in a form that GNU configure recognizes
diff --git a/applications/solvers/basic/potentialDyMFoam/potentialDyMFoam.C b/applications/solvers/basic/potentialDyMFoam/potentialDyMFoam.C
index d68eb5680..44945b07b 100644
--- a/applications/solvers/basic/potentialDyMFoam/potentialDyMFoam.C
+++ b/applications/solvers/basic/potentialDyMFoam/potentialDyMFoam.C
@@ -72,6 +72,11 @@ int main(int argc, char *argv[])
U.internalField() = vector::zero;
}
+ p.correctBoundaryConditions();
+ U.correctBoundaryConditions();
+
+ phi == (fvc::interpolate(U) & mesh.Sf());
+
# include "volContinuity.H"
# include "meshCourantNo.H"
diff --git a/applications/solvers/basic/sixDOFSolver/sixDOFSolver.C b/applications/solvers/basic/sixDOFSolver/sixDOFSolver.C
index 556550ffb..f098e0ed4 100644
--- a/applications/solvers/basic/sixDOFSolver/sixDOFSolver.C
+++ b/applications/solvers/basic/sixDOFSolver/sixDOFSolver.C
@@ -36,7 +36,7 @@ Description
#include "objectRegistry.H"
#include "foamTime.H"
#include "ODESolver.H"
-#include "sixDOFbodies.H"
+#include "sixDOFBodies.H"
#include "OFstream.H"
using namespace Foam;
@@ -48,9 +48,12 @@ int main(int argc, char *argv[])
# include "setRootCase.H"
# include "createTime.H"
- sixDOFbodies structure(runTime);
+ sixDOFBodies structure(runTime);
OFstream of(runTime.path()/"motion.dat");
+ // Write header for output file
+ of << "# Time, CoG_x, CoG_y, CoG_z, omega_x, omega_y, omega_z" << endl;
+
Info<< "\nStarting time loop\n" << endl;
for (runTime++; !runTime.end(); runTime++)
@@ -73,11 +76,14 @@ int main(int argc, char *argv[])
<< structure()[bodyI].omegaAverage().value() << nl
<< "Current omega in time instant = "
<< structure()[bodyI].omega().value() << nl
- << "Average omegaAbs in time step = "
- << structure()[bodyI].omegaAverageAbsolute().value() << nl
<< endl;
- of << structure()[bodyI].X().value().x() << tab;
+ of << structure()[bodyI].X().value().x() << tab
+ << structure()[bodyI].X().value().y() << tab
+ << structure()[bodyI].X().value().z() << tab
+ << structure()[bodyI].omega().value().x() << tab
+ << structure()[bodyI].omega().value().y() << tab
+ << structure()[bodyI].omega().value().z() << tab;
}
of << endl;
diff --git a/applications/solvers/coupled/MRFPorousFoam/pEqn.H b/applications/solvers/coupled/MRFPorousFoam/pEqn.H
index aa880fc4d..c14b41b7e 100644
--- a/applications/solvers/coupled/MRFPorousFoam/pEqn.H
+++ b/applications/solvers/coupled/MRFPorousFoam/pEqn.H
@@ -10,7 +10,7 @@ if (addMRF || addPorosity)
tpresSource =
(
(mesh.Sf() & fvc::interpolate(rTU))
- & fvc::interpolate(fvc::grad(p))
+ & fvc::interpolate(fvc::grad(p))
);
const surfaceScalarField& presSource = tpresSource();
diff --git a/applications/solvers/immersedBoundary/SOLVER_COOKBOOK b/applications/solvers/immersedBoundary/SOLVER_COOKBOOK
deleted file mode 100644
index 762319239..000000000
--- a/applications/solvers/immersedBoundary/SOLVER_COOKBOOK
+++ /dev/null
@@ -1,49 +0,0 @@
-Make/options: add
-
- -I$(LIB_SRC)/triSurface/lnInclude \
- -I$(LIB_SRC)/meshTools/lnInclude \
- -I../immersedBoundary/lnInclude
-
-
- -ltriSurface \
- -lmeshTools \
- -L$(FOAM_USER_LIBBIN) -limmersedBoundary \
-
-
-createFields.H: add
-
-# include "createIbMasks.H"
-
-
-solver:
-
-1) add immersed boundary headers
-
-#include "immersedBoundaryFvPatch.H"
-#include "immersedBoundaryAdjustPhi.H"
-
-2) on calculation of face fluxes (or their components), mask with faceIbMask
-
-3) before to adjustPhi, add:
-
- // Adjust immersed boundary fluxes
- immersedBoundaryAdjustPhi(phi, U);
-
-4) on explicit updates, add correctBoundaryConditions();
-
-eg.
-
- U = fvc::reconstruct(phi);
- U.correctBoundaryConditions();
-
-5) On reports of continuity error, add masking:
-
- Info<< "IB-masked continuity error = "
- << mag(cellIbMask*fvc::div(phi))().weightedAverage(mesh.V()).value()
- << endl;
-
- or use immersedBoundaryContinuityErrs.H
-
-5) Chenge Courant number check to be IB-sensitive, using
-
- immersedBoundaryCourantNo.H
diff --git a/applications/solvers/immersedBoundary/icoDyMIbFoam/Make/files b/applications/solvers/immersedBoundary/icoDyMIbFoam/Make/files
deleted file mode 100644
index 5785f9fea..000000000
--- a/applications/solvers/immersedBoundary/icoDyMIbFoam/Make/files
+++ /dev/null
@@ -1,3 +0,0 @@
-icoDyMIbFoam.C
-
-EXE = $(FOAM_APPBIN)/icoDyMIbFoam
diff --git a/applications/solvers/immersedBoundary/icoDyMIbFoam/createFields.H b/applications/solvers/immersedBoundary/icoDyMIbFoam/createFields.H
deleted file mode 100644
index 2721134d9..000000000
--- a/applications/solvers/immersedBoundary/icoDyMIbFoam/createFields.H
+++ /dev/null
@@ -1,56 +0,0 @@
- Info<< "Reading transportProperties\n" << endl;
-
- IOdictionary transportProperties
- (
- IOobject
- (
- "transportProperties",
- runTime.constant(),
- mesh,
- IOobject::MUST_READ,
- IOobject::NO_WRITE
- )
- );
-
- dimensionedScalar nu
- (
- transportProperties.lookup("nu")
- );
-
-
- Info<< "Reading field p\n" << endl;
- volScalarField p
- (
- IOobject
- (
- "p",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::AUTO_WRITE
- ),
- mesh
- );
-
-
- Info<< "Reading field U\n" << endl;
- volVectorField U
- (
- IOobject
- (
- "U",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::AUTO_WRITE
- ),
- mesh
- );
-
-# include "createPhi.H"
-
-
- label pRefCell = 0;
- scalar pRefValue = 0.0;
- setRefCell(p, pimple.dict(), pRefCell, pRefValue);
- mesh.schemesDict().setFluxRequired(p.name());
diff --git a/applications/solvers/immersedBoundary/icoDyMIbFoam/icoDyMIbFoam.C b/applications/solvers/immersedBoundary/icoDyMIbFoam/icoDyMIbFoam.C
deleted file mode 100644
index e83440a27..000000000
--- a/applications/solvers/immersedBoundary/icoDyMIbFoam/icoDyMIbFoam.C
+++ /dev/null
@@ -1,152 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | foam-extend: Open Source CFD
- \\ / O peration | Version: 4.0
- \\ / A nd | Web: http://www.foam-extend.org
- \\/ M anipulation | For copyright notice see file Copyright
--------------------------------------------------------------------------------
-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 .
-
-Application
- icoDyMOversetFoam
-
-Description
- Transient solver for incompressible, laminar flow of Newtonian fluids
- with dynamic mesh and immersed boundary mesh support.
-
-Author
- Hrvoje Jasak, Wikki Ltd. All rights reserved
-
-\*---------------------------------------------------------------------------*/
-
-#include "fvCFD.H"
-#include "dynamicFvMesh.H"
-#include "immersedBoundaryFvPatch.H"
-#include "immersedBoundaryAdjustPhi.H"
-#include "pimpleControl.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-int main(int argc, char *argv[])
-{
-# include "setRootCase.H"
-# include "createTime.H"
-# include "createDynamicFvMesh.H"
-
- pimpleControl pimple(mesh);
-
-# include "createFields.H"
-# include "initContinuityErrs.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
- Info<< "\nStarting time loop\n" << endl;
-
- while (runTime.loop())
- {
- Info<< "Time = " << runTime.timeName() << nl << endl;
-
- // Make the fluxes absolute
- fvc::makeAbsolute(phi, U);
-
- bool meshChanged = mesh.update();
- reduce(meshChanged, orOp());
- Info<< "Mesh update" << meshChanged << endl;
-# include "createIbMasks.H"
-
- // Make the fluxes relative to the mesh motion
- fvc::makeRelative(phi, U);
-
-# include "CourantNo.H"
-
- // Pressure-velocity corrector
- while (pimple.loop())
- {
- fvVectorMatrix UEqn
- (
- fvm::ddt(U)
- + fvm::div(phi, U)
- - fvm::laplacian(nu, U)
- );
-
- if (pimple.momentumPredictor())
- {
- solve(UEqn == -fvc::grad(p));
- }
-
- // --- PISO loop
- while (pimple.correct())
- {
- volScalarField rUA = 1.0/UEqn.A();
-
- U = rUA*UEqn.H();
- // Immersed boundary update
- U.correctBoundaryConditions();
-
- phi = faceIbMask*(fvc::interpolate(U) & mesh.Sf());
-
- // Adjust immersed boundary fluxes
- immersedBoundaryAdjustPhi(phi, U);
- adjustPhi(phi, U, p);
-
- // Non-orthogonal pressure corrector loop
- while (pimple.correctNonOrthogonal())
- {
- fvScalarMatrix pEqn
- (
- fvm::laplacian(rUA, p) == fvc::div(phi)
- );
-
- pEqn.setReference(pRefCell, pRefValue);
- pEqn.solve
- (
- mesh.solutionDict().solver
- (
- p.select(pimple.finalInnerIter())
- )
- );
-
- if (pimple.finalNonOrthogonalIter())
- {
- phi -= pEqn.flux();
- }
- }
-
-# include "immersedBoundaryContinuityErrs.H"
-
- // Make the fluxes relative to the mesh motion
- fvc::makeRelative(phi, U);
-
- U -= rUA*fvc::grad(p);
- U.correctBoundaryConditions();
- }
- }
-
- runTime.write();
-
- Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
- << " ClockTime = " << runTime.elapsedClockTime() << " s"
- << nl << endl;
- }
-
- Info<< "End\n" << endl;
-
- return(0);
-}
-
-
-// ************************************************************************* //
diff --git a/applications/solvers/immersedBoundary/icoIbFoam/Make/files b/applications/solvers/immersedBoundary/icoIbFoam/Make/files
deleted file mode 100644
index bccc003ee..000000000
--- a/applications/solvers/immersedBoundary/icoIbFoam/Make/files
+++ /dev/null
@@ -1,3 +0,0 @@
-icoIbFoam.C
-
-EXE = $(FOAM_APPBIN)/icoIbFoam
diff --git a/applications/solvers/immersedBoundary/icoIbFoam/Make/options b/applications/solvers/immersedBoundary/icoIbFoam/Make/options
deleted file mode 100644
index b2ecef30a..000000000
--- a/applications/solvers/immersedBoundary/icoIbFoam/Make/options
+++ /dev/null
@@ -1,13 +0,0 @@
-EXE_INC = \
- -I$(LIB_SRC)/finiteVolume/lnInclude \
- -I$(LIB_SRC)/meshTools/lnInclude \
- -I$(LIB_SRC)/immersedBoundary/immersedBoundary/lnInclude
-
-EXE_LIBS = \
- -lfiniteVolume \
- -lmeshTools \
- -lsurfMesh \
- -lsampling \
- -ldynamicMesh \
- -limmersedBoundary \
- -llduSolvers
diff --git a/applications/solvers/immersedBoundary/icoIbFoam/icoIbFoam.C b/applications/solvers/immersedBoundary/icoIbFoam/icoIbFoam.C
deleted file mode 100644
index 5447f7f6c..000000000
--- a/applications/solvers/immersedBoundary/icoIbFoam/icoIbFoam.C
+++ /dev/null
@@ -1,139 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | foam-extend: Open Source CFD
- \\ / O peration | Version: 4.0
- \\ / A nd | Web: http://www.foam-extend.org
- \\/ M anipulation | For copyright notice see file Copyright
--------------------------------------------------------------------------------
-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 .
-
-Application
- icoIbFoam
-
-Description
- Transient solver for incompressible, laminar flow of Newtonian fluids
- with immersed boundary support.
-
-Author
- Hrvoje Jasak, Wikki Ltd. All rights reserved
-
-\*---------------------------------------------------------------------------*/
-
-#include "fvCFD.H"
-#include "immersedBoundaryFvPatch.H"
-#include "immersedBoundaryAdjustPhi.H"
-#include "pimpleControl.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-int main(int argc, char *argv[])
-{
-# include "setRootCase.H"
-
-# include "createTime.H"
-# include "createMesh.H"
-
- pimpleControl pimple(mesh);
-
-# include "createIbMasks.H"
-# include "createFields.H"
-# include "initContinuityErrs.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
- Info<< "\nStarting time loop\n" << endl;
-
- while (runTime.loop())
- {
- Info<< "Time = " << runTime.timeName() << nl << endl;
-
-# include "CourantNo.H"
-
- // Pressure-velocity corrector
- while (pimple.loop())
- {
- fvVectorMatrix UEqn
- (
- fvm::ddt(U)
- + fvm::div(phi, U)
- - fvm::laplacian(nu, U)
- );
-
- if (pimple.momentumPredictor())
- {
- solve(UEqn == -fvc::grad(p));
- }
-
- // --- PISO loop
- while (pimple.correct())
- {
- volScalarField rUA = 1.0/UEqn.A();
-
- U = rUA*UEqn.H();
- // Immersed boundary update
- U.correctBoundaryConditions();
-
- phi = faceIbMask*(fvc::interpolate(U) & mesh.Sf());
-
- // Adjust immersed boundary fluxes
- immersedBoundaryAdjustPhi(phi, U);
- adjustPhi(phi, U, p);
-
- // Non-orthogonal pressure corrector loop
- while (pimple.correctNonOrthogonal())
- {
- fvScalarMatrix pEqn
- (
- fvm::laplacian(rUA, p) == fvc::div(phi)
- );
-
- pEqn.setReference(pRefCell, pRefValue);
- pEqn.solve
- (
- mesh.solutionDict().solver
- (
- p.select(pimple.finalInnerIter())
- )
- );
-
- if (pimple.finalNonOrthogonalIter())
- {
- phi -= pEqn.flux();
- }
- }
-
-# include "immersedBoundaryContinuityErrs.H"
-
- U -= rUA*fvc::grad(p);
- U.correctBoundaryConditions();
- }
- }
-
- runTime.write();
-
- Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
- << " ClockTime = " << runTime.elapsedClockTime() << " s"
- << nl << endl;
- }
-
- Info<< "End\n" << endl;
-
- return 0;
-}
-
-
-// ************************************************************************* //
diff --git a/applications/solvers/immersedBoundary/interIbFoam/Make/files b/applications/solvers/immersedBoundary/interIbFoam/Make/files
deleted file mode 100644
index 5d3b09dcd..000000000
--- a/applications/solvers/immersedBoundary/interIbFoam/Make/files
+++ /dev/null
@@ -1,3 +0,0 @@
-interIbFoam.C
-
-EXE = $(FOAM_APPBIN)/interIbFoam
diff --git a/applications/solvers/immersedBoundary/interIbFoam/UEqn.H b/applications/solvers/immersedBoundary/interIbFoam/UEqn.H
deleted file mode 100644
index bd641eeee..000000000
--- a/applications/solvers/immersedBoundary/interIbFoam/UEqn.H
+++ /dev/null
@@ -1,27 +0,0 @@
- surfaceScalarField muEff
- (
- "muEff",
- twoPhaseProperties.muf()
- + fvc::interpolate(rho*turbulence->nut())
- );
-
- fvVectorMatrix UEqn
- (
- fvm::ddt(rho, U)
- + fvm::div(rhoPhi, U)
- - fvm::laplacian(muEff, U)
- - (fvc::grad(U) & fvc::grad(muEff))
- );
-
- UEqn.relax();
-
- if (pimple.momentumPredictor())
- {
- solve
- (
- UEqn
- ==
- - gh*fvc::grad(rho)
- - fvc::grad(pd)
- );
- }
diff --git a/applications/solvers/immersedBoundary/interIbFoam/alphaEqn.H b/applications/solvers/immersedBoundary/interIbFoam/alphaEqn.H
deleted file mode 100644
index 320ea795c..000000000
--- a/applications/solvers/immersedBoundary/interIbFoam/alphaEqn.H
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- word alphaScheme("div(phi,alpha)");
- word alpharScheme("div(phirb,alpha)");
-
- // New formulation of phir: Co condition
- surfaceScalarField phir
- (
- "phir",
- faceIbMask*interface.cAlpha()*interface.nHatf()*
- min
- (
- scalar(0.5)/ // This is ref compression Co number for cAlpha = 1
- (
- mesh.surfaceInterpolation::deltaCoeffs()*
- mesh.time().deltaT()
- ),
- mag(phi/mesh.magSf())
- + dimensionedScalar("small", dimVelocity, 1e-3)
- )
- );
-
- fvScalarMatrix alpha1Eqn
- (
- fvm::ddt(alpha1)
- + fvm::div(phi, alpha1, alphaScheme)
- + fvm::div
- (
- -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
- alpha1,
- alpharScheme
- )
- );
-
- alpha1Eqn.relax();
- alpha1Eqn.solve();
-
- Info<< "Liquid phase volume fraction = "
- << alpha1.weightedAverage(mesh.V()).value()
- << " Min(alpha1) = " << min(cellIbMask*alpha1).value()
- << " Max(alpha1) = " << max(cellIbMask*alpha1).value()
- << endl;
-
- rhoPhi = faceIbMask*(alpha1Eqn.flux()*(rho1 - rho2) + phi*rho2);
-
- // Limit alpha to handle IB cells
-// alpha1.max(0);
-// alpha1.min(1);
-
- // Update of interface and density
- interface.correct();
- twoPhaseProperties.correct();
-
- // Calculate density using limited alpha1
- rho = twoPhaseProperties.rho();
- rho.correctBoundaryConditions();
-}
diff --git a/applications/solvers/immersedBoundary/interIbFoam/correctPhi.H b/applications/solvers/immersedBoundary/interIbFoam/correctPhi.H
deleted file mode 100644
index 2f5bd5e2f..000000000
--- a/applications/solvers/immersedBoundary/interIbFoam/correctPhi.H
+++ /dev/null
@@ -1,58 +0,0 @@
-{
-# include "continuityErrs.H"
-
- wordList pcorrTypes
- (
- pd.boundaryField().size(),
- zeroGradientFvPatchScalarField::typeName
- );
-
- for (label i=0; i turbulence
- (
- incompressible::turbulenceModel::New(U, phi, twoPhaseProperties)
- );
diff --git a/applications/solvers/immersedBoundary/interIbFoam/limitU.H b/applications/solvers/immersedBoundary/interIbFoam/limitU.H
deleted file mode 100644
index c014ae74f..000000000
--- a/applications/solvers/immersedBoundary/interIbFoam/limitU.H
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- scalar limitMagU = readScalar(pimple.dict().lookup("limitMagU"));
-
- volScalarField magU(mag(U));
-
- scalar maxMagU = max(magU).value();
-
- Info<< "mag(U): max: " << maxMagU
- << " avg: " << magU.weightedAverage(mesh.V()).value();
-
- if (maxMagU > limitMagU)
- {
- U.internalField() *=
- neg(magU.internalField() - limitMagU)
- + pos(magU.internalField() - limitMagU)*
- limitMagU/(magU.internalField() + SMALL);
- U.correctBoundaryConditions();
- Info << " ...limiting" << endl;
- }
- else
- {
- Info << endl;
- }
-}
diff --git a/applications/solvers/immersedBoundary/interIbFoam/pEqn.H b/applications/solvers/immersedBoundary/interIbFoam/pEqn.H
deleted file mode 100644
index 88238b82c..000000000
--- a/applications/solvers/immersedBoundary/interIbFoam/pEqn.H
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- volScalarField rUA = 1.0/UEqn.A();
- surfaceScalarField rUAf = fvc::interpolate(rUA);
-
- U = rUA*UEqn.H();
- // Immersed boundary update
- U.correctBoundaryConditions();
-# include "limitU.H"
-
- surfaceScalarField phiU
- (
- "phiU",
- faceIbMask*(fvc::interpolate(U) & mesh.Sf())
- );
-
- phi = phiU
- + faceIbMask*
- (
- fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
- - ghf*fvc::snGrad(rho)
- )*rUAf*mesh.magSf();
-
- // Adjust immersed boundary fluxes
- immersedBoundaryAdjustPhi(phi, U);
- adjustPhi(phi, U, pd);
-
-
- while (pimple.correctNonOrthogonal())
- {
- fvScalarMatrix pdEqn
- (
- fvm::laplacian(rUAf, pd, "laplacian(rAU,pd)") == fvc::div(phi)
- );
-
- pdEqn.setReference(pdRefCell, pdRefValue);
-
- pdEqn.solve
- (
- mesh.solutionDict().solver(pd.select(pimple.finalInnerIter()))
- );
-
- if (pimple.finalNonOrthogonalIter())
- {
- phi -= pdEqn.flux();
- }
- }
-
- // Explicitly relax pressure
- pd.relax();
-
- U += rUA*fvc::reconstruct((phi - phiU)/rUAf);
- U.correctBoundaryConditions();
-}
diff --git a/applications/solvers/immersedBoundary/pimpleDyMIbFoam/Make/files b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/Make/files
new file mode 100644
index 000000000..46c7c1f2a
--- /dev/null
+++ b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/Make/files
@@ -0,0 +1,3 @@
+pimpleDyMIbFoam.C
+
+EXE = $(FOAM_APPBIN)/pimpleDyMIbFoam
diff --git a/applications/solvers/immersedBoundary/interIbFoam/Make/options b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/Make/options
similarity index 55%
rename from applications/solvers/immersedBoundary/interIbFoam/Make/options
rename to applications/solvers/immersedBoundary/pimpleDyMIbFoam/Make/options
index 41ed9d472..a011e27ec 100644
--- a/applications/solvers/immersedBoundary/interIbFoam/Make/options
+++ b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/Make/options
@@ -1,22 +1,23 @@
EXE_INC = \
- -I$(LIB_SRC)/transportModels \
- -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
- -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
- -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \
+ -I$(LIB_SRC)/immersedBoundary/immersedBoundary/lnInclude \
+ -I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
+ -I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
- -I$(LIB_SRC)/immersedBoundary/immersedBoundary/lnInclude
+ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
+ -I$(LIB_SRC)/transportModels \
+ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel
EXE_LIBS = \
- -linterfaceProperties \
+ -lfiniteVolume \
+ -limmersedBoundary \
+ -ldynamicFvMesh \
+ -ltopoChangerFvMesh \
+ -ldynamicMesh \
+ -lmeshTools \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleLESModels \
- -lfiniteVolume \
- -lmeshTools \
- -lsurfMesh \
- -lsampling \
- -ldynamicMesh \
- -limmersedBoundary \
- -llduSolvers
+ -llduSolvers \
+ -L$(MESQUITE_LIB_DIR) -lmesquite
diff --git a/applications/solvers/immersedBoundary/pimpleDyMIbFoam/UEqn.H b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/UEqn.H
new file mode 100644
index 000000000..44acc8af0
--- /dev/null
+++ b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/UEqn.H
@@ -0,0 +1,26 @@
+ // Convection-diffusion matrix
+ fvVectorMatrix HUEqn
+ (
+ fvm::div(phi, U)
+ + turbulence->divDevReff()
+ );
+
+ // Time derivative matrix
+ fvVectorMatrix ddtUEqn(fvm::ddt(U));
+
+ // Get under-relaxation factor
+ scalar UUrf =
+ mesh.solutionDict().equationRelaxationFactor(U.select(pimple.finalIter()));
+
+ if (pimple.momentumPredictor())
+ {
+ // Solve momentum predictor
+ solve
+ (
+ ddtUEqn
+ + relax(HUEqn, UUrf)
+ ==
+ - fvc::grad(p),
+ mesh.solutionDict().solver((U.select(pimple.finalIter())))
+ );
+ }
diff --git a/applications/solvers/immersedBoundary/pimpleDyMIbFoam/correctPhi.H b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/correctPhi.H
new file mode 100644
index 000000000..eda2e9eda
--- /dev/null
+++ b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/correctPhi.H
@@ -0,0 +1,31 @@
+{
+ volScalarField pcorr("pcorr", p);
+
+ // Initialise flux with interpolated velocity
+ phi = fvc::interpolate(U) & mesh.Sf();
+
+ adjustPhi(phi, U, pcorr);
+
+ mesh.schemesDict().setFluxRequired(pcorr.name());
+
+ while (pimple.correctNonOrthogonal())
+ {
+ fvScalarMatrix pcorrEqn
+ (
+ fvm::laplacian(1/aU, pcorr) == fvc::div(phi)
+ );
+
+ pcorrEqn.setReference(pRefCell, pRefValue);
+ pcorrEqn.solve();
+
+ if (pimple.finalNonOrthogonalIter())
+ {
+ phi -= pcorrEqn.flux();
+ }
+
+ // Fluxes are corrected to absolute velocity and further corrected
+ // later. HJ, 6/Feb/2009
+ }
+# include "continuityErrs.H"
+}
+
diff --git a/applications/solvers/immersedBoundary/pimpleDyMIbFoam/createControls.H b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/createControls.H
new file mode 100644
index 000000000..ca5e25906
--- /dev/null
+++ b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/createControls.H
@@ -0,0 +1,11 @@
+#include "createTimeControls.H"
+
+bool correctPhi
+(
+ pimple.dict().lookupOrDefault("correctPhi", false)
+);
+
+bool checkMeshCourantNo
+(
+ pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
+);
diff --git a/applications/solvers/immersedBoundary/icoIbFoam/createFields.H b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/createFields.H
similarity index 61%
rename from applications/solvers/immersedBoundary/icoIbFoam/createFields.H
rename to applications/solvers/immersedBoundary/pimpleDyMIbFoam/createFields.H
index 2721134d9..74a461355 100644
--- a/applications/solvers/immersedBoundary/icoIbFoam/createFields.H
+++ b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/createFields.H
@@ -1,23 +1,3 @@
- Info<< "Reading transportProperties\n" << endl;
-
- IOdictionary transportProperties
- (
- IOobject
- (
- "transportProperties",
- runTime.constant(),
- mesh,
- IOobject::MUST_READ,
- IOobject::NO_WRITE
- )
- );
-
- dimensionedScalar nu
- (
- transportProperties.lookup("nu")
- );
-
-
Info<< "Reading field p\n" << endl;
volScalarField p
(
@@ -54,3 +34,26 @@
scalar pRefValue = 0.0;
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
+
+ singlePhaseTransportModel laminarTransport(U, phi);
+
+ autoPtr turbulence
+ (
+ incompressible::turbulenceModel::New(U, phi, laminarTransport)
+ );
+
+ Info<< "Reading field aU if present\n" << endl;
+ volScalarField aU
+ (
+ IOobject
+ (
+ "aU",
+ runTime.timeName(),
+ mesh,
+ IOobject::READ_IF_PRESENT,
+ IOobject::AUTO_WRITE
+ ),
+ mesh,
+ 1/runTime.deltaT(),
+ zeroGradientFvPatchScalarField::typeName
+ );
diff --git a/applications/solvers/immersedBoundary/pimpleDyMIbFoam/pEqn.H b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/pEqn.H
new file mode 100644
index 000000000..1c02221ba
--- /dev/null
+++ b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/pEqn.H
@@ -0,0 +1,58 @@
+{
+ p.boundaryField().updateCoeffs();
+
+ // Prepare clean Ap without time derivative contribution and
+ // without contribution from under-relaxation
+ // HJ, 26/Oct/2015
+ aU = HUEqn.A();
+
+ // Store velocity under-relaxation point before using U for the flux
+ // precursor
+ U.storePrevIter();
+
+ U = HUEqn.H()/aU;
+ phi = (fvc::interpolate(U) & mesh.Sf());
+
+ // Global flux balance
+ adjustPhi(phi, U, p);
+
+ while (pimple.correctNonOrthogonal())
+ {
+ fvScalarMatrix pEqn
+ (
+ fvm::laplacian(1/aU, p) == fvc::div(phi)
+ );
+
+ pEqn.setReference(pRefCell, pRefValue);
+ pEqn.solve
+ (
+ mesh.solutionDict().solver(p.select(pimple.finalInnerIter()))
+ );
+
+ if (pimple.finalNonOrthogonalIter())
+ {
+ phi -= pEqn.flux();
+ }
+ }
+
+ // Explicitly relax pressure for momentum corrector except for last corrector
+ if (!pimple.finalIter())
+ {
+ p.relax();
+ }
+
+ // Make the fluxes relative to the mesh motion
+ fvc::makeRelative(phi, U);
+
+# include "movingMeshContinuityErrs.H"
+
+ U = UUrf*
+ (
+ 1.0/(aU + ddtUEqn.A())*
+ (
+ U*aU - fvc::grad(p) + ddtUEqn.H()
+ )
+ )
+ + (1 - UUrf)*U.prevIter();
+ U.correctBoundaryConditions();
+}
diff --git a/applications/solvers/immersedBoundary/interIbFoam/interIbFoam.C b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/pimpleDyMIbFoam.C
similarity index 66%
rename from applications/solvers/immersedBoundary/interIbFoam/interIbFoam.C
rename to applications/solvers/immersedBoundary/pimpleDyMIbFoam/pimpleDyMIbFoam.C
index 8f9b2738d..f50b32a1c 100644
--- a/applications/solvers/immersedBoundary/interIbFoam/interIbFoam.C
+++ b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/pimpleDyMIbFoam.C
@@ -22,19 +22,17 @@ License
along with foam-extend. If not, see .
Application
- interIbFoam
+ pimpleDyMFoam.C
Description
- Solver for 2 incompressible, isothermal immiscible fluids using a VOF
- (volume of fluid) phase-fraction based interface capturing approach,
- with immersed boundary support
-
- The momentum and other fluid properties are of the "mixture" and a single
- momentum equation is solved.
+ Transient solver for incompressible, flow of Newtonian fluids
+ with dynamic mesh using the PIMPLE (merged PISO-SIMPLE) algorithm.
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
- For a two-fluid approach see twoPhaseEulerFoam.
+ Consistent formulation without time-step and relaxation dependence by Jasak
+
+ Support for immersed boundary
Author
Hrvoje Jasak, Wikki Ltd. All rights reserved
@@ -42,32 +40,30 @@ Author
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
-#include "interfaceProperties.H"
-#include "twoPhaseMixture.H"
+#include "singlePhaseTransportModel.H"
#include "turbulenceModel.H"
+#include "dynamicFvMesh.H"
#include "pimpleControl.H"
+#include "immersedBoundaryPolyPatch.H"
#include "immersedBoundaryFvPatch.H"
-#include "immersedBoundaryAdjustPhi.H"
+#include "emptyFvPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
# include "setRootCase.H"
+
# include "createTime.H"
-# include "createMesh.H"
+# include "createDynamicFvMesh.H"
pimpleControl pimple(mesh);
-# include "readGravitationalAcceleration.H"
# include "initContinuityErrs.H"
-# include "createFields.H"
# include "createIbMasks.H"
-# include "createTimeControls.H"
-# include "correctPhi.H"
-# include "CourantNo.H"
-# include "setInitialDeltaT.H"
+# include "createFields.H"
+# include "createControls.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -75,19 +71,46 @@ int main(int argc, char *argv[])
while (runTime.run())
{
-# include "readTimeControls.H"
-# include "immersedBoundaryCourantNo.H"
+# include "readControls.H"
+# include "CourantNo.H"
# include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
- // Pressure-velocity corrector
+ bool meshChanged = mesh.update();
+
+ U.correctBoundaryConditions();
+ p.correctBoundaryConditions();
+ aU.correctBoundaryConditions();
+ phi.correctBoundaryConditions();
+ turbulence->correct();
+
+# include "updateIbMasks.H"
+# include "volContinuity.H"
+
+ if (runTime.outputTime())
+ {
+ volScalarField divMeshPhi("divMeshPhi", mag(fvc::surfaceIntegrate(mesh.phi())));
+ divMeshPhi.write();
+ }
+
+ if (checkMeshCourantNo)
+ {
+# include "meshCourantNo.H"
+ }
+
+ // Fluxes will be corrected to absolute velocity
+ // HJ, 6/Feb/2009
+# include "correctPhi.H"
+
+ // Make the fluxes relative to the mesh motion
+ fvc::makeRelative(phi, U);
+
+ // --- PIMPLE loop
while (pimple.loop())
{
- twoPhaseProperties.correct();
-
# include "UEqn.H"
// --- PISO loop
@@ -96,15 +119,6 @@ int main(int argc, char *argv[])
# include "pEqn.H"
}
-# include "immersedBoundaryContinuityErrs.H"
-
-# include "limitU.H"
-
- p = pd + rho*gh;
- p.correctBoundaryConditions();
-
-# include "alphaEqn.H"
-
turbulence->correct();
}
diff --git a/applications/solvers/immersedBoundary/pimpleDyMIbFoam/readControls.H b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/readControls.H
new file mode 100644
index 000000000..9f982e260
--- /dev/null
+++ b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/readControls.H
@@ -0,0 +1,5 @@
+#include "readTimeControls.H"
+
+correctPhi = pimple.dict().lookupOrDefault("correctPhi", false);
+
+checkMeshCourantNo = pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
diff --git a/applications/solvers/immersedBoundary/porousSimpleIbFoam/Make/files b/applications/solvers/immersedBoundary/porousSimpleIbFoam/Make/files
deleted file mode 100644
index 1a063f7e8..000000000
--- a/applications/solvers/immersedBoundary/porousSimpleIbFoam/Make/files
+++ /dev/null
@@ -1,3 +0,0 @@
-porousSimpleIbFoam.C
-
-EXE = $(FOAM_APPBIN)/porousSimpleIbFoam
diff --git a/applications/solvers/immersedBoundary/porousSimpleIbFoam/Make/options b/applications/solvers/immersedBoundary/porousSimpleIbFoam/Make/options
deleted file mode 100644
index 0d53c03a0..000000000
--- a/applications/solvers/immersedBoundary/porousSimpleIbFoam/Make/options
+++ /dev/null
@@ -1,20 +0,0 @@
-EXE_INC = \
- -I$(LIB_SRC)/turbulenceModels \
- -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
- -I$(LIB_SRC)/transportModels \
- -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
- -I$(LIB_SRC)/finiteVolume/lnInclude \
- -I$(LIB_SRC)/meshTools/lnInclude \
- -I$(LIB_SRC)/immersedBoundary/immersedBoundary/lnInclude
-
-EXE_LIBS = \
- -lincompressibleRASModels \
- -lincompressibleTransportModels \
- -lfiniteVolume \
- -lmeshTools \
- -lsurfMesh \
- -lsampling \
- -ldynamicMesh \
- -limmersedBoundary \
- -limmersedBoundaryTurbulence \
- -llduSolvers
diff --git a/applications/solvers/immersedBoundary/porousSimpleIbFoam/UEqn.H b/applications/solvers/immersedBoundary/porousSimpleIbFoam/UEqn.H
deleted file mode 100644
index c6ab47056..000000000
--- a/applications/solvers/immersedBoundary/porousSimpleIbFoam/UEqn.H
+++ /dev/null
@@ -1,12 +0,0 @@
- // Solve the Momentum equation
- tmp UEqn
- (
- fvm::div(phi, U)
- + turbulence->divDevReff()
- );
-
- UEqn().relax();
-
- pZones.addResistance(UEqn());
-
- solve(UEqn() == -fvc::grad(p));
diff --git a/applications/solvers/immersedBoundary/porousSimpleIbFoam/createFields.H b/applications/solvers/immersedBoundary/porousSimpleIbFoam/createFields.H
deleted file mode 100644
index a6ba38265..000000000
--- a/applications/solvers/immersedBoundary/porousSimpleIbFoam/createFields.H
+++ /dev/null
@@ -1,44 +0,0 @@
- Info << "Reading field p\n" << endl;
- volScalarField p
- (
- IOobject
- (
- "p",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::AUTO_WRITE
- ),
- mesh
- );
-
- Info << "Reading field U\n" << endl;
- volVectorField U
- (
- IOobject
- (
- "U",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::AUTO_WRITE
- ),
- mesh
- );
-
-# include "createPhi.H"
-
-
- label pRefCell = 0;
- scalar pRefValue = 0.0;
- setRefCell(p, simple.dict(), pRefCell, pRefValue);
- mesh.schemesDict().setFluxRequired(p.name());
-
- singlePhaseTransportModel laminarTransport(U, phi);
-
- autoPtr turbulence
- (
- incompressible::RASModel::New(U, phi, laminarTransport)
- );
-
- porousZones pZones(mesh);
diff --git a/applications/solvers/immersedBoundary/porousSimpleIbFoam/pEqn.H b/applications/solvers/immersedBoundary/porousSimpleIbFoam/pEqn.H
deleted file mode 100644
index 595165c48..000000000
--- a/applications/solvers/immersedBoundary/porousSimpleIbFoam/pEqn.H
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- volScalarField AU = UEqn().A();
-
- U = UEqn().H()/AU;
- // Immersed boundary update
- U.correctBoundaryConditions();
-
- UEqn.clear();
- phi = faceIbMask*(fvc::interpolate(U) & mesh.Sf());
-
- // Adjust immersed boundary fluxes
- immersedBoundaryAdjustPhi(phi, U);
- adjustPhi(phi, U, p);
-
- // Non-orthogonal pressure corrector loop
- while (simple.correctNonOrthogonal())
- {
- fvScalarMatrix pEqn
- (
- fvm::laplacian(1.0/AU, p) == fvc::div(phi)
- );
-
- pEqn.setReference(pRefCell, pRefValue);
-
- pEqn.solve();
-
- if (simple.finalNonOrthogonalIter())
- {
- phi -= pEqn.flux();
- }
- }
-
-# include "immersedBoundaryContinuityErrs.H"
-
- // Explicitly relax pressure for momentum corrector
- p.relax();
-
- // Momentum corrector
- U -= fvc::grad(p)/AU;
- U.correctBoundaryConditions();
-}
diff --git a/applications/solvers/immersedBoundary/potentialIbFoam/Make/files b/applications/solvers/immersedBoundary/potentialIbFoam/Make/files
deleted file mode 100644
index a234c5801..000000000
--- a/applications/solvers/immersedBoundary/potentialIbFoam/Make/files
+++ /dev/null
@@ -1,3 +0,0 @@
-potentialIbFoam.C
-
-EXE = $(FOAM_APPBIN)/potentialIbFoam
diff --git a/applications/solvers/immersedBoundary/potentialIbFoam/Make/options b/applications/solvers/immersedBoundary/potentialIbFoam/Make/options
deleted file mode 100644
index 448c4b608..000000000
--- a/applications/solvers/immersedBoundary/potentialIbFoam/Make/options
+++ /dev/null
@@ -1,16 +0,0 @@
-EXE_INC = \
- -I$(LIB_SRC)/finiteVolume/lnInclude \
- -I$(LIB_SRC)/meshTools/lnInclude \
- -I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
- -I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \
- -I$(LIB_SRC)/immersedBoundary/immersedBoundary/lnInclude
-
-EXE_LIBS = \
- -lfiniteVolume \
- -lmeshTools \
- -lsurfMesh \
- -lsampling \
- -ldynamicMesh \
- -ldynamicFvMesh \
- -limmersedBoundary \
- -llduSolvers
diff --git a/applications/solvers/immersedBoundary/potentialIbFoam/createFields.H b/applications/solvers/immersedBoundary/potentialIbFoam/createFields.H
deleted file mode 100644
index 09ed08451..000000000
--- a/applications/solvers/immersedBoundary/potentialIbFoam/createFields.H
+++ /dev/null
@@ -1,50 +0,0 @@
- Info<< "Reading field p\n" << endl;
- volScalarField p
- (
- IOobject
- (
- "p",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::NO_WRITE
- ),
- mesh
- );
-
- // Do not reset p
-
- Info<< "Reading field U\n" << endl;
- volVectorField U
- (
- IOobject
- (
- "U",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::AUTO_WRITE
- ),
- mesh
- );
-
- // Do not reset U
-
- surfaceScalarField phi
- (
- IOobject
- (
- "phi",
- runTime.timeName(),
- mesh,
- IOobject::NO_READ,
- IOobject::AUTO_WRITE
- ),
- fvc::interpolate(U) & mesh.Sf()
- );
-
-
- label pRefCell = 0;
- scalar pRefValue = 0.0;
- setRefCell(p, simple.dict(), pRefCell, pRefValue);
- mesh.schemesDict().setFluxRequired(p.name());
diff --git a/applications/solvers/immersedBoundary/potentialIbFoam/potentialIbFoam.C b/applications/solvers/immersedBoundary/potentialIbFoam/potentialIbFoam.C
deleted file mode 100644
index bfd7273a9..000000000
--- a/applications/solvers/immersedBoundary/potentialIbFoam/potentialIbFoam.C
+++ /dev/null
@@ -1,231 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | foam-extend: Open Source CFD
- \\ / O peration | Version: 4.0
- \\ / A nd | Web: http://www.foam-extend.org
- \\/ M anipulation | For copyright notice see file Copyright
--------------------------------------------------------------------------------
-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 .
-
-Application
- potentialIbFoam
-
-Description
- Potential flow solver with immersed boundary support.
-
-\*---------------------------------------------------------------------------*/
-
-#include "fvCFD.H"
-#include "immersedBoundaryFvPatch.H"
-#include "immersedBoundaryAdjustPhi.H"
-#include "simpleControl.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-int main(int argc, char *argv[])
-{
- argList::validOptions.insert("writep", "");
-
-# include "setRootCase.H"
-
-# include "createTime.H"
-# include "createMesh.H"
-
- simpleControl simple(mesh);
-
-# include "createIbMasks.H"
-# include "createFields.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
- Info<< nl << "Calculating potential flow" << endl;
-
- // Do correctors over the complete set
- while (simple.correctNonOrthogonal())
- {
- phi = faceIbMask*(linearInterpolate(U) & mesh.Sf());
-
- // Adjust immersed boundary fluxes
- immersedBoundaryAdjustPhi(phi, U);
-
- // Adjust fluxes
- adjustPhi(phi, U, p);
-
- p.storePrevIter();
-
- fvScalarMatrix pEqn
- (
- fvm::laplacian
- (
- dimensionedScalar
- (
- "1",
- dimTime/p.dimensions()*dimensionSet(0, 2, -2, 0, 0),
- 1
- ),
- p
- )
- ==
- fvc::div(phi)
- );
-
- pEqn.setReference(pRefCell, pRefValue);
- pEqn.solve();
-
- // Correct the flux
- phi -= pEqn.flux();
-
- if (!simple.finalNonOrthogonalIter())
- {
- p.relax();
- }
-
- Info<< "p min " << gMin(p.internalField())
- << " max " << gMax(p.internalField())
- << " masked min "
- << gMin(cellIbMask.internalField()*p.internalField())
- << " max "
- << gMax(cellIbMask.internalField()*p.internalField())
- << endl;
-
- Info<< "continuity error = "
- << mag
- (
- fvc::div(faceIbMask*phi)
- )().weightedAverage(mesh.V()).value()
- << endl;
-
- Info<< "Contour continuity error = "
- << mag(sum(phi.boundaryField()))
- << endl;
-
- U = fvc::reconstruct(phi);
- U.correctBoundaryConditions();
-
- Info<< "Interpolated U error = "
- << (
- sqrt
- (
- sum
- (
- sqr
- (
- faceIbMask*
- (
- fvc::interpolate(U) & mesh.Sf()
- )
- - phi
- )
- )
- )/sum(mesh.magSf())
- ).value()
- << endl;
- }
-
- // Calculate velocity magnitude
- {
- volScalarField magU = cellIbMask*mag(U);
-
- Info << "IB-masked mag(U): max: " << gMax(magU.internalField())
- << " min: " << gMin(magU.internalField()) << endl;
- }
-
- // Force the write
- U.write();
- phi.write();
-
- cellIbMask.write();
- cellIbMaskExt.write();
-
- if (args.optionFound("writep"))
- {
- // Find reference patch
- label refPatch = -1;
- scalar maxMagU = 0;
-
- // Go through all velocity patches and find the one that fixes
- // velocity to the largest value
-
- forAll (U.boundaryField(), patchI)
- {
- const fvPatchVectorField& Upatch = U.boundaryField()[patchI];
-
- if (Upatch.fixesValue())
- {
- // Calculate mean velocity
- scalar u = sum(mag(Upatch));
- label patchSize = Upatch.size();
-
- reduce(u, sumOp());
- reduce(patchSize, sumOp