diff --git a/app-admin/antidot/antidot-0.4.1.ebuild b/app-admin/antidot/antidot-0.4.1.ebuild
index e2f9f8e193..9d624ae135 100644
--- a/app-admin/antidot/antidot-0.4.1.ebuild
+++ b/app-admin/antidot/antidot-0.4.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -355,7 +355,7 @@ SRC_URI="
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
RESTRICT="mirror"
src_compile() {
diff --git a/app-admin/antidot/antidot-0.4.2.ebuild b/app-admin/antidot/antidot-0.4.2.ebuild
index a1a96e92db..d4c858f795 100644
--- a/app-admin/antidot/antidot-0.4.2.ebuild
+++ b/app-admin/antidot/antidot-0.4.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -355,7 +355,7 @@ SRC_URI="
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
RESTRICT="mirror"
src_compile() {
diff --git a/app-editors/micro/micro-2.0.8.ebuild b/app-editors/micro/micro-2.0.8.ebuild
index c3408861bf..9e4064c999 100644
--- a/app-editors/micro/micro-2.0.8.ebuild
+++ b/app-editors/micro/micro-2.0.8.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -98,7 +98,7 @@ SRC_URI="
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="wayland"
RESTRICT="mirror"
diff --git a/app-misc/apidb/Manifest b/app-misc/apidb/Manifest
index d060bbbb42..a972c589b7 100644
--- a/app-misc/apidb/Manifest
+++ b/app-misc/apidb/Manifest
@@ -3,3 +3,4 @@ DIST 5.0.0-alpha.2.tar.gz 165464 BLAKE2B 92975743b28dbed779c9d3c86cb9636b321f182
DIST 5.0.0-alpha19.tar.gz 160561 BLAKE2B 52479e68742f62b8c98d9c9a31a261f6c887966bdf3e1820e3109af5a8164ba8294e4aecf806afb182a05750a6a548d855a492ee277051c494ef8897e2de3e73 SHA512 7008857aa20365d8b9f0c05a5e021e4071ae9af7c9208a4d33840b8e5118e5e1404cd005ec05a5a0d64bb3690d009a2f60af648dadc2bd14d806b6776828724b
DIST 5.0.0-alpha20.tar.gz 160582 BLAKE2B cc50f784b67f0ab1564f4ea596864e65fa5c87f3729befd9a53ecf200f11f97ced901207bfd5313b814bc5b2d5df35ab62102606974e2b4f52e2bf80a09f9c9d SHA512 465f2938f4fe9d1f557bc5c81e0639259a0aecda3949e18055a08f56a0294400e14a9a5e7865f4b46305343aca2ce1d283b963e6b15b2acffcc9a5758b494a15
DIST 5.0.0-alpha8.tar.gz 165674 BLAKE2B 10227665ddf1c2b17cacb4b52a4fb0ef06125066546cfc5ce919e2ce6bcba27dabdb471edee4a405f05208333fd6e719981d90384194dc6fab62791abc2eb671 SHA512 e1ef0a916b64ba116efad641b64446656a1e57c0e1c0d65cceafb59ec04deb142de1a11e625c4e8c214b36dcbf9adb4d413283d7a22f0a090098cebfc021e182
+DIST 5.8.0-beta.tar.gz 183120 BLAKE2B 82d6a2e40aab046b14c6256acca458765bc744144f57d8aeae5201f8e89d97c70d5dbc42fe89880ded8ea9ee9ff96e2f2a91f3da8e7b13fb52cd4ba75caedaf6 SHA512 07d9cb217922239ad79ec6632d28f87d986e69ec3fd5c5440dbae96514a10a66f043efa84031c6541c3b1dc8b6786b5265c9cdd98f8b4102c3e937934bad649a
diff --git a/app-misc/apidb/apidb-5.8.0_beta.ebuild b/app-misc/apidb/apidb-5.8.0_beta.ebuild
new file mode 100644
index 0000000000..0f8bca6753
--- /dev/null
+++ b/app-misc/apidb/apidb-5.8.0_beta.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+CMAKE_MAKEFILE_GENERATOR="emake"
+CMAKE_BINARY=cmake
+CMAKE_MAKEFILE_GENERATOR=emake
+
+MYPV="${PV/_beta/-beta}"
+MYPN="${PN}"
+MYP="${MYPN}-${MYPV}"
+
+DESCRIPTION="API Generator for Database acces."
+HOMEPAGE="https://github.com/azaeldevel/apidb"
+SRC_URI="https://github.com/azaeldevel/${PN}/archive/${MYPV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="+mariadb postgresql commands gtk +corelibs"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+BDEPEND="
+ dev-libs/libxml2
+ dev-libs/boost
+ dev-libs/octetos-coreutils
+ sys-devel/bison
+ sys-devel/flex
+ gtk? ( x11-libs/gtk+ )
+ dev-libs/libtar
+ mariadb? ( dev-libs/octetos-db-maria )
+ postgresql? ( dev-libs/octetos-db-postgresql )
+ media-gfx/imagemagick
+"
+
+S="${WORKDIR}/${PN}-${MYPV}"
+
+src_prepare() {
+ sed -i 's/lib/${LIBDIR}/' src/CMakeLists.txt || die
+ sed -i 's/lib/${LIBDIR}/' src/mysql-reader-c++/CMakeLists.txt || die
+ sed -i 's/lib/${LIBDIR}/' src/mariadb-reader-c++/CMakeLists.txt || die
+ sed -i 's/lib/${LIBDIR}/' src/postgresql-reader-c++/CMakeLists.txt || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ APIDBBUILD="CORE"
+ APIDBINSTALL=""
+ if use corelibs ;then
+ APIDBINSTALL="CORE"
+ fi
+ if use mariadb ;then
+ APIDBBUILD="$APIDBBUILD;MARIADB"
+ APIDBINSTALL="$APIDBINSTALL;DRIVERS"
+ fi
+ if use postgresql ;then
+ APIDBBUILD="$APIDBBUILD;POSTGRESQL"
+ APIDBINSTALL="$APIDBINSTALL;DRIVERS"
+ fi
+ if use commands ;then
+ APIDBINSTALL="$APIDBINSTALL;COMMANDS"
+ fi
+ if use gtk ;then
+ APIDBINSTALL="$APIDBINSTALL;GTK3"
+ fi
+ local mycmakeargs=(-DAPIDB_VERSION_STAGE=alpha -DPLATFORM=LINUX_GENTOO -DAPIDBBUILD=$APIDBBUILD -DAPIDBINSTALL=$APIDBINSTALL)
+ cmake_src_configure
+}
diff --git a/app-office/beancount/Manifest b/app-office/beancount/Manifest
new file mode 100644
index 0000000000..69ea66a134
--- /dev/null
+++ b/app-office/beancount/Manifest
@@ -0,0 +1 @@
+DIST beancount-2.3.3.tar.gz 1784037 BLAKE2B ff62ef30d3bcadd3f1dc195adf71cb58703e50c93e12cf71ef699c651ce67daf89ea8285b53b43811687fb132c02d8d6364651d87bc3e092f9485e6934883110 SHA512 420369105939bcdcf2b7caaba27ab1d486b3dfc18e0a3286d917a6380345eaf5fa64ff5e0779fd2275129b7088de24f4a2dbd0232a482aceb124064e5c56ccc4
diff --git a/app-office/beancount/beancount-2.3.3.ebuild b/app-office/beancount/beancount-2.3.3.ebuild
new file mode 100644
index 0000000000..8784d56584
--- /dev/null
+++ b/app-office/beancount/beancount-2.3.3.ebuild
@@ -0,0 +1,56 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1
+
+DESCRIPTION="A double-entry accounting system that uses text files as input"
+HOMEPAGE="https://github.com/beancount/beancount"
+SRC_URI="https://github.com/beancount/beancount/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.3.3-disable-network-tests.patch"
+ "${FILESDIR}/${PN}-2.3.3-disable-tmp-access-tests.patch"
+ "${FILESDIR}/${PN}-2.3.3-disable-install-test.patch"
+)
+
+RDEPEND="
+ $(python_gen_cond_dep '
+ >=dev-python/beautifulsoup-4[${PYTHON_USEDEP}]
+ >=dev-python/bottle-0.12[${PYTHON_USEDEP}]
+ >=dev-python/google-api-python-client-1.8.2[${PYTHON_USEDEP}]
+ >=dev-python/httplib2-0.10[${PYTHON_USEDEP}]
+ >=dev-python/lxml-3.0[${PYTHON_USEDEP}]
+ >=dev-python/oauth2client-4.0[${PYTHON_USEDEP}]
+ >=dev-python/ply-3.4[${PYTHON_USEDEP}]
+ >=dev-python/python-dateutil-2.6.0[${PYTHON_USEDEP}]
+ >=dev-python/python-magic-0.4.12[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.0[${PYTHON_USEDEP}]
+ ')
+"
+
+BDEPEND="
+ test? (
+ ${RDEPEND}
+ $(python_gen_cond_dep '
+ >=dev-python/pytest-5.4.2[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+python_test(){
+ esetup.py build_ext -i
+ make ctest
+ make test
+}
diff --git a/app-office/beancount/files/beancount-2.3.3-disable-install-test.patch b/app-office/beancount/files/beancount-2.3.3-disable-install-test.patch
new file mode 100644
index 0000000000..03c305cd9c
--- /dev/null
+++ b/app-office/beancount/files/beancount-2.3.3-disable-install-test.patch
@@ -0,0 +1,31 @@
+diff --git a/beancount/scripts/setup_test.py b/beancount/scripts/setup_test.py
+index 59a165d1..45717643 100644
+--- a/beancount/scripts/setup_test.py
++++ b/beancount/scripts/setup_test.py
+@@ -12,6 +12,10 @@ import sys
+ import tarfile
+ import tempfile
+ import unittest
++import pytest
++
++pytest.skip("these installation tests fail in portage and are un-needed"
++ , allow_module_level=True)
+
+ from beancount.utils import test_utils
+
+@@ -30,7 +34,6 @@ class TestSetup(test_utils.TestCase):
+ if path.exists(self.installdir):
+ shutil.rmtree(self.installdir)
+
+- @unittest.skipIf(is_bazel_build(), "Cannot setup within Bazel.")
+ def test_setup(self):
+ # We need to create the installation target directory and have our
+ # PYTHONPATH set on it in order for setuptools to work properly in a
+@@ -50,6 +53,7 @@ class TestSetup(test_utils.TestCase):
+ if path.exists(egg_info):
+ shutil.rmtree(egg_info)
+
++ @pytest.mark.skip(reason="Portage will make sure things install correctly")
+ def run_setup(self, installdir, extra_env=None):
+ """Run setup.py with the given extra environment variables.
+
diff --git a/app-office/beancount/files/beancount-2.3.3-disable-network-tests.patch b/app-office/beancount/files/beancount-2.3.3-disable-network-tests.patch
new file mode 100644
index 0000000000..8e6db27b2c
--- /dev/null
+++ b/app-office/beancount/files/beancount-2.3.3-disable-network-tests.patch
@@ -0,0 +1,73 @@
+diff --git a/beancount/scripts/bake_test.py b/beancount/scripts/bake_test.py
+index 67dbefc0..a95488c1 100644
+--- a/beancount/scripts/bake_test.py
++++ b/beancount/scripts/bake_test.py
+@@ -6,6 +6,7 @@ import textwrap
+ from os import path
+ from unittest import mock
+ import unittest
++import pytest
+
+ import lxml.html
+
+@@ -188,6 +189,7 @@ class TestScriptBake(test_utils.TestCase):
+ test_utils.run_with_args(bake.main, self.get_args() + [filename, output])
+
+ @test_utils.docfile
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def test_bake_directory(self, filename):
+ """
+ 2013-01-01 open Expenses:Restaurant
+@@ -210,6 +212,7 @@ class TestScriptBake(test_utils.TestCase):
+ class TestScriptArchive(TestScriptBake):
+
+ @test_utils.docfile
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def test_bake_archive__known(self, filename):
+ """
+ 2013-01-01 open Expenses:Restaurant
+diff --git a/beancount/web/web_test.py b/beancount/web/web_test.py
+index dd7059fc..1aab3e44 100644
+--- a/beancount/web/web_test.py
++++ b/beancount/web/web_test.py
+@@ -4,6 +4,7 @@ __license__ = "GNU GPLv2"
+ import unittest
+ import urllib.parse
+ from os import path
++import pytest
+
+ from beancount.utils import test_utils
+ from beancount.parser import version
+@@ -48,26 +49,32 @@ class TestWeb(unittest.TestCase):
+ self.ignore_regexp)
+
+ @test_utils.docfile
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def test_scrape_empty_file(self, filename):
+ """
+ ;; A file with no entries in it.
+ """
+ self.scrape(filename)
+
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def test_scrape_basic(self):
+ self.scrape('simple/basic.beancount')
+
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def test_scrape_basic_view(self):
+ self.scrape('simple/basic.beancount', extra_args=['--view', 'year/2013'])
+
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def test_scrape_in_incognito(self):
+ self.scrape('simple/basic.beancount', extra_args=['--incognito'])
+
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def test_scrape_starterkit(self):
+ self.scrape('simple/starter.beancount')
+
+ # Note: Great idea, but sorry, too slow (approx. 50s on MBA). We need to
+ # find some way to enable this on demand.
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def __test_scrape_example(self):
+ self.scrape('example.beancount')
+
diff --git a/app-office/beancount/files/beancount-2.3.3-disable-tmp-access-tests.patch b/app-office/beancount/files/beancount-2.3.3-disable-tmp-access-tests.patch
new file mode 100644
index 0000000000..e12d8012b4
--- /dev/null
+++ b/app-office/beancount/files/beancount-2.3.3-disable-tmp-access-tests.patch
@@ -0,0 +1,20 @@
+diff --git a/beancount/projects/will_test.py b/beancount/projects/will_test.py
+index 0a8e92b8..12d4c50a 100644
+--- a/beancount/projects/will_test.py
++++ b/beancount/projects/will_test.py
+@@ -3,6 +3,7 @@ __license__ = "GNU GPLv2"
+
+ import logging
+ import unittest
++import pytest
+
+ from beancount import loader
+ from beancount.core import getters
+@@ -95,6 +96,7 @@ class TestWillFunctions(test_utils.TestCase):
+ class TestWillReport(test_utils.TestCase):
+
+ @loader.load_doc()
++ @pytest.mark.skip(reason="Cannot access /tmp during portage installation")
+ def test_create_report(self, entries, _, options_map):
+ """
+ option "title" "Report Creation Test"
diff --git a/app-office/beancount/metadata.xml b/app-office/beancount/metadata.xml
new file mode 100644
index 0000000000..0a83b17674
--- /dev/null
+++ b/app-office/beancount/metadata.xml
@@ -0,0 +1,14 @@
+
+
+
+
+ ezzieyguywuf@gmail.com
+ Wolfgang E. Sanyer
+
+
+ Beancount defines a simple data format or “language” that lets you
+ define financial transaction records in a text file, load them in memory
+ and generate and export a variety of reports, such as balance sheets or
+ income statements.
+
+
diff --git a/app-portage/version/Manifest b/app-portage/version/Manifest
index 6922cf6283..b17bc91291 100644
--- a/app-portage/version/Manifest
+++ b/app-portage/version/Manifest
@@ -4,6 +4,8 @@ DIST version-0.14.4_alpha.tar.gz 47074 BLAKE2B 1b7d1b2e5a23fd27727ebf1e162da9e8b
DIST version-0.15.0_alpha.tar.gz 47595 BLAKE2B 93e8c70ba3c8d04c529b71538c6c506153033e534b099466010cd9838906922e3bdada2e4ca0b88219404d107761a26a2789d29d7bf56e8bb83d924e65983980 SHA512 bcb07d978463267340406732ad25d89e83280612c1ea049c7bf50c08ac168682adbaa8f9fff69c6c8c1687aa279e90c1b1f56ff265a40b730d2823ef1da5a4d3
DIST version-0.17.0_alpha.tar.gz 47695 BLAKE2B 4f67e6082fcfd1bf1327df5996b8361470f4c026b5adb03a2e9665c3d8d806a2e5a6f2862fdf46e6c121298161fb3088b3fded5fa4b3436a5c26b6b5703e3824 SHA512 4f2cd9de5eb7f5eb33a2cb1d0fbbefd6c3974186f0a4d3f83c25932e3fbeae8f13797a445cefc03859943e2be669d91d87bd940a453f68260c7ec7e229d7414e
DIST version-0.18.0_alpha.tar.gz 48129 BLAKE2B de987ff73733dc55bfd6c26d7510f32b4bf9533058221d0e44e2c3df62dc8af3213053812e4188e79ba1e2c232de5a41daf8a17cbff62c5044a10e9ca78a3e2f SHA512 fbc90c420130d212f236fc990e8912a0f88ebefa69b29ea391acbf1c7a87bf7f2a3c17782638ab7d75cfb11a046ba305ae4e49f0060af8ba8215a138acbbb93c
+DIST version-0.19.0_alpha.tar.gz 48122 BLAKE2B 02d10d787830d0d3d91779fc5d0140010fb027f5fdb8340101a07966f18a5273948ef2e525f61041de783c34e0066b904799174934d2481dc64fd244655c47ff SHA512 831d079f39fa9ff12de4a820a00dad759f461e00cc33fc4674761c35a4ca43ebb0549a3c335554ed655a72600d45aae03ae23a04b3e9ea7f0f958ca94422bf32
+DIST version-0.20.1_alpha.tar.gz 47843 BLAKE2B d1fe637e51b2b9ce15c27fd4a3c8d7e96a645c7d4916ad9be55050d558015ce971d7a530f897ab1ffe0ab4912219d6800d967d44aeca98c7a7eb165038623d0b SHA512 5d780e9952577bc8fc4e4ae54a49c08c7369aadca1ed8772931dccbf79bdf6076f61cf3cc6b3e5c2b6ed3a06acc49165140b92927bf63050f154ba8af8befc76
DIST version-0.6.1_alpha.tar.gz 24986 BLAKE2B a78b7b1a5a2aec26afba6916483a40ac17c2aafae45511d3ba35bf28ec8466e1b696f235e1d3d54c83bffa5e9f974c7f2cd8f188e637d8b315e876d91741fae2 SHA512 ff68c7cfec5c59a1cfb8a600a1a439e7bdacba464c27e114f6fc0879caaf66cf04447e8dfff5c4afc02808fd19677f979520121b00c2d1f0a4995c5adade728d
DIST version-0.6.2_alpha.tar.gz 35658 BLAKE2B 89be24ecf24ac711045711f65303eb2deae9cccaf8d1fbc28c8f07e4d1fff3234e5ffdb0686de05fa29becca9d4eba2875307a4842f0f1aa66a8910d74f984cc SHA512 1fbb9295209e58babe1039ded6295024db040b4c5775f405be4af5e49035d9d968f322d919b055567340998828d04bafab7a140d98807d4a0d8eeedda7ed2dba
DIST version-0.9.0_alpha.tar.gz 41858 BLAKE2B 801f5c820484fb54cb4c030f20d2c287fd7054ac363065fe534b3d1e300a1078f49ca3770b3bec966aa161e3b4005934f4f4ed8ba8eecaedd17930e00561fd85 SHA512 bcba979bbf4016582d74c7fcc5882ea6e0e20a8884a398e4e87697fd3b0b44829f9b2e513aaa6f2f313cc0f319a48810795c640128b0f934310352d68803ca90
diff --git a/app-portage/version/version-0.19.0_alpha.ebuild b/app-portage/version/version-0.19.0_alpha.ebuild
new file mode 100644
index 0000000000..f1e36338cb
--- /dev/null
+++ b/app-portage/version/version-0.19.0_alpha.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+MYPV="${PV/_alpha/-alpha}"
+
+DESCRIPTION="A command line function for package version management."
+HOMEPAGE="https://github.com/azaeldevel/octetos-version"
+SRC_URI="https://github.com/azaeldevel/octetos-${PN}/archive/${MYPV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE=""
+
+DEPEND="dev-libs/octetos-coreutils"
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+S="${WORKDIR}/octetos-${PN}-${MYPV}"
+
+src_prepare() {
+ default
+ eautoreconf -fi
+}
+src_configure() {
+ econf --with-portage
+}
diff --git a/app-portage/version/version-0.20.1_alpha.ebuild b/app-portage/version/version-0.20.1_alpha.ebuild
new file mode 100644
index 0000000000..f1e36338cb
--- /dev/null
+++ b/app-portage/version/version-0.20.1_alpha.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+MYPV="${PV/_alpha/-alpha}"
+
+DESCRIPTION="A command line function for package version management."
+HOMEPAGE="https://github.com/azaeldevel/octetos-version"
+SRC_URI="https://github.com/azaeldevel/octetos-${PN}/archive/${MYPV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE=""
+
+DEPEND="dev-libs/octetos-coreutils"
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+S="${WORKDIR}/octetos-${PN}-${MYPV}"
+
+src_prepare() {
+ default
+ eautoreconf -fi
+}
+src_configure() {
+ econf --with-portage
+}
diff --git a/dev-cpp/folly/Manifest b/dev-cpp/folly/Manifest
index 1d7a67b9ed..07df39d16a 100644
--- a/dev-cpp/folly/Manifest
+++ b/dev-cpp/folly/Manifest
@@ -1 +1,2 @@
DIST folly-2020.11.30.00.tar.gz 3261437 BLAKE2B 5070819f1f8bac2030e761a8d2330379e8e5ba242d21330b98dcd598cb18e12046a9ad3fb6462f82dbc47c53cf0905c330e707201bfbbedb81f203ef1b30731e SHA512 e7e06bd8c8e38af345d20a04886b4497c4f0c9877263dbcb5a3f2d17c7a3252a2529086a5a04d07c2d3a457ca3930c43672fc4f74b7bdbc2ec0d07abdf1ed425
+DIST folly-2021.01.04.00.tar.gz 3281402 BLAKE2B d6af10b7bf1297c5fe2a6893e23e10b24d4e3534324da1a13f4910e50fe7cec9d7082af3abb8b74746d63995f16bc33bca3d5c5ce7f2449196f8aaa1ff7ebe7a SHA512 e4849e7d560d30b87fcf0af7c1536b18aa774de803104ccbacc1315e7962ad0c734dd06fe9ccca5b1f9ac97b3848085ef75a7dcdf6a685e24a36765a0aa4a181
diff --git a/dev-cpp/folly/folly-2020.11.30.00.ebuild b/dev-cpp/folly/folly-2020.11.30.00.ebuild
index 390b46b3e7..7f638edb8d 100644
--- a/dev-cpp/folly/folly-2020.11.30.00.ebuild
+++ b/dev-cpp/folly/folly-2020.11.30.00.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -21,6 +21,7 @@ DEPEND="app-arch/lz4
app-arch/zstd
dev-libs/double-conversion
dev-libs/libevent
+ dev-libs/libfmt
dev-cpp/gflags
dev-cpp/glog[gflags]
dev-libs/boost[context,threads]
@@ -31,7 +32,7 @@ RDEPEND="${DEPEND}"
src_prepare(){
einfo $(get_libdir)
- sed "s/lib CACHE/$(get_libdir) CACHE/" -i CMakeLists.txt
- sed "s/lib\/cmake\/folly CACHE/$(get_libdir)\/cmake\/folly CACHE/" -i CMakeLists.txt
+ sed "s/lib CACHE/$(get_libdir) CACHE/" -i CMakeLists.txt || die
+ sed "s/lib\/cmake\/folly CACHE/$(get_libdir)\/cmake\/folly CACHE/" -i CMakeLists.txt || die
cmake_src_prepare
}
diff --git a/dev-cpp/folly/folly-2021.01.04.00.ebuild b/dev-cpp/folly/folly-2021.01.04.00.ebuild
new file mode 100644
index 0000000000..ceaf4f8b6f
--- /dev/null
+++ b/dev-cpp/folly/folly-2021.01.04.00.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="An open-source C++ library developed and used at Facebook"
+HOMEPAGE="https://github.com/facebook/folly"
+SRC_URI="https://github.com/facebook/folly/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+DEPEND="
+ app-arch/lz4
+ app-arch/snappy
+ app-arch/zstd
+ dev-libs/double-conversion
+ dev-libs/libevent
+ dev-libs/libfmt
+ dev-cpp/gflags
+ dev-cpp/glog[gflags]
+ dev-libs/boost[context,threads]
+ sys-libs/binutils-libs
+ sys-libs/zlib
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cmake_src_prepare
+ sed -e "s/lib CACHE/$(get_libdir) CACHE/" \
+ -e "s/lib\/cmake\/folly CACHE/$(get_libdir)\/cmake\/folly CACHE/" \
+ -i CMakeLists.txt || die
+}
diff --git a/dev-libs/libcloudproviders/libcloudproviders-0.3.1.ebuild b/dev-libs/libcloudproviders/libcloudproviders-0.3.1.ebuild
index 67bc0cd2d4..c9d4074894 100644
--- a/dev-libs/libcloudproviders/libcloudproviders-0.3.1.ebuild
+++ b/dev-libs/libcloudproviders/libcloudproviders-0.3.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2020 Gentoo Authors
+# Copyright 2019-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,7 +13,7 @@ SRC_URI="https://gitlab.gnome.org/World/libcloudproviders/-/archive/${PV}/libclo
LICENSE="LGPL-3+"
SLOT="0"
-KEYWORDS="~amd64"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
IUSE="doc introspection vala"
REQUIRED_USE="vala? ( introspection )"
diff --git a/dev-libs/octetos-core/Manifest b/dev-libs/octetos-core/Manifest
index 3de700d390..72df517d19 100644
--- a/dev-libs/octetos-core/Manifest
+++ b/dev-libs/octetos-core/Manifest
@@ -3,6 +3,7 @@ DIST octetos-core-2.0.0_beta.tar.gz 122978 BLAKE2B 9ed7fcb95b9c2f85072bf73ac9271
DIST octetos-core-2.15.0_beta.tar.gz 96858 BLAKE2B eb49b8fb3b132a3f142a41735b9ad6f1190412dccdf6eb1fc8b83b9dafc8c8fc393d3ba2774b32664639dd85a227add3491732f6785a388089f0b8bd7c2cc995 SHA512 35846c2449966cca99bde02942e892ceb21223e40f35b4c1edf5d7a19c35ec26c301d6511d1cc3aa4c4142653e3e6ba1c82cfbddaa69e332fd2ce3bd79fc1791
DIST octetos-core-2.2.0_beta.tar.gz 123176 BLAKE2B f87131deccefce76a7fefb0e829564c166f01f316c54bd56e1283999434db809cb54be2278e1653dcb3a01a371b09b08fd95decf1b361c1515e5decf3609453d SHA512 10f70c02b7c0012f1dab31e96aa3337dccc662c51a31c2ad186b6e76815afa8645f3f2370d6eaa788cdbbded416bc36b53e1971005cca49ee10c0d8e6baac239
DIST octetos-core-2.2.1_beta.tar.gz 123179 BLAKE2B f31f1870c3467c02f2b7653dd81abdf44e1c8ab821d8ec404f0a9ddb296438caa631dd586c62727eb9ecaf83452a2b0923f2a72323e5a49e895b99b9296e409f SHA512 408569368b3dc2257149ad4c25c07a8deb3176fc6b08a003c98e59386ece3adcf0a45198b3802e3c0c1f537d4feb30703d5997f5bcae4e9d9e708829da46a843
+DIST octetos-core-2.20.0_beta.tar.gz 97189 BLAKE2B 9906d05e0861aa54fddfa6d9e75862d88dfcce955bdd0ee940bc634ca936bcc1f5ce8ade3d8c0e754a2100401063b413930cf70a135957a6ac69bc80320f6ea4 SHA512 33f1fedcc9280bc9709ddb6e8fe90dd1d1abb940651961457c4b42152cc48ea51f9cec0b34b22e4e89ead131cb5b92dcbd88c5a82325e5625be92536487bd333
DIST octetos-core-2.3.0_beta.tar.gz 123195 BLAKE2B 2590f495f8890301f2731463139f0ca653beba496b33d592e1000a64a8d773335d821990e2ad128d969bf50794ce55a5da71ba2cfff0fc307a6166238206806d SHA512 0e2e28c7c1109a9b5ec7b2a493a9aba747b2c88a83286b561487e3fec20ee1fba4d9b292f5b47cebf8cc90fbe011566314a98366bf2e7beb800b9c1e8baf839e
DIST octetos-core-2.3.1_beta.tar.gz 123229 BLAKE2B b075432d35936e3de4601d929813275eac577ec077e9f41cf9d45449e2b369d0197f36f2b54b48931d6bd127bd55e04b68b20ec00de7391b3062e7352efcfa44 SHA512 0a551b384d5b472fcdc5ceace5b8bfcb364ece89477db6367dfb6471d8a26b216c0d58e359e6f70c83f37dca03d7dc63b71e79ae62a49a447309270db909c327
DIST octetos-core-2.3.1_rc1.tar.gz 123229 BLAKE2B b075432d35936e3de4601d929813275eac577ec077e9f41cf9d45449e2b369d0197f36f2b54b48931d6bd127bd55e04b68b20ec00de7391b3062e7352efcfa44 SHA512 0a551b384d5b472fcdc5ceace5b8bfcb364ece89477db6367dfb6471d8a26b216c0d58e359e6f70c83f37dca03d7dc63b71e79ae62a49a447309270db909c327
diff --git a/dev-libs/octetos-core/octetos-core-2.20.0_beta.ebuild b/dev-libs/octetos-core/octetos-core-2.20.0_beta.ebuild
new file mode 100644
index 0000000000..8a3163264e
--- /dev/null
+++ b/dev-libs/octetos-core/octetos-core-2.20.0_beta.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+MYPV="${PV/_beta/-beta/}"
+
+DESCRIPTION="C/C++ library to mainly provide Semantic Versioned implementation"
+HOMEPAGE="https://github.com/azaeldevel/octetos-core"
+SRC_URI="https://github.com/azaeldevel/${PN}/archive/${MYPV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="
+ dev-libs/libconfig
+ dev-perl/XML-Parser
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ dev-util/cunit
+ dev-util/intltool
+ sys-devel/bison
+ >=sys-devel/gcc-8.1
+"
+
+S="${WORKDIR}/${PN}-${MYPV}"
+
+src_prepare() {
+ default
+ eautoreconf -fi
+}
diff --git a/dev-libs/octetos-db-maria/Manifest b/dev-libs/octetos-db-maria/Manifest
index f1fd3f0b70..d004dbab2c 100644
--- a/dev-libs/octetos-db-maria/Manifest
+++ b/dev-libs/octetos-db-maria/Manifest
@@ -1,3 +1,4 @@
DIST octetos-db-maria-1.2.2_beta.tar.gz 91810 BLAKE2B 9c274928564e61e20ba5d553c41b588333b0abc52d6d964eb8c39e225a72d19c6b6cf953d94240245bad72e318edfce30662d1ed59fd0edf42159794c6be6952 SHA512 cde9aa8dc8552f5c4d10bef9908dc514e5cecfba73f3b67bd817e9818f84e665cc506648e15fe47dcd5ab0a8ae4943340e258c5a4b2b7546e65fb38455956c45
DIST octetos-db-maria-1.3.2_alpha.tar.gz 92844 BLAKE2B 99c0488fa62a4edd7b9424c7d923a60a1684d8b34355e27150c8356d4b17222b5b38e50a3374b7105447366aa8683398f0444b45304e258efb2cda053490d49a SHA512 0d1ff8b88fd3c5b192f0bf2311ce038b3bddd4f1245cbf593d570e3c54ecb906cf8a025e4b95f2940297bf93fc0dbfc8ebcc980c8ad2f1fee9bc068fa3138f2f
DIST octetos-db-maria-1.4.2_alpha.tar.gz 23204 BLAKE2B 0efee42484e1b1491e58b34da02053fc716d02d806b285d2c3b0ddcec13113671e51063ef0ac298ef7c18ad2aeecfa89e28a41f659f4adea9d8e1ea31242e25b SHA512 8ac4bdff78ffff51375b5c713e9b399328ed3623124fb8d9235486c6204f98851c87c27b4b4ac5b72adeb2aaa4005caaa36da7ed0cbcc7f02ea431bf27bab196
+DIST octetos-db-maria-1.9.2_alpha.tar.gz 25337 BLAKE2B d6cd7377b4dacc3c0e18f0dca28628390fa9ad00f8e351ff981c54fbe537df52c0b1a3c7dd68fef7afa06641a8f34ba98cb63874967d3cb5bb76b72bd9bb2396 SHA512 7b6f6f193612b0e64a2fdd61bfdc62f06125802e73df1ec538e71d5b6060f2c93b72c108af840e123c73e64a55916b687f79f0f6982e323a2c765642872b0130
diff --git a/dev-libs/octetos-db-maria/octetos-db-maria-1.9.2_alpha.ebuild b/dev-libs/octetos-db-maria/octetos-db-maria-1.9.2_alpha.ebuild
new file mode 100644
index 0000000000..732347034e
--- /dev/null
+++ b/dev-libs/octetos-db-maria/octetos-db-maria-1.9.2_alpha.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+MYPV="${PV/_alpha/-alpha}"
+
+MYP="${PN}-${MYPV}"
+
+DESCRIPTION="C++ library for Database Acces."
+HOMEPAGE="https://github.com/azaeldevel/octetos-db-maria"
+SRC_URI="https://github.com/azaeldevel/${PN}/archive/${MYPV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="
+ dev-libs/octetos-db-abstract
+ dev-db/mariadb-connector-c
+ dev-db/mariadb:=
+"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MYP}"
+
+src_prepare() {
+ default
+ eautoreconf -fi
+}
+
+src_configure() {
+ econf --with-gentoo
+}
diff --git a/dev-python/hidapi/hidapi-0.10.1.ebuild b/dev-python/hidapi/hidapi-0.10.1.ebuild
index 9d74510972..5641f6f48f 100644
--- a/dev-python/hidapi/hidapi-0.10.1.ebuild
+++ b/dev-python/hidapi/hidapi-0.10.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -12,7 +12,7 @@ HOMEPAGE="https://github.com/trezor/cython-hidapi"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="|| ( BSD GPL-3 )"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
SLOT="0"
DEPEND="
diff --git a/dev-python/hidapi/hidapi-0.9.0_p3.ebuild b/dev-python/hidapi/hidapi-0.9.0_p3.ebuild
index f34e5d5a1b..0693e14c0b 100644
--- a/dev-python/hidapi/hidapi-0.9.0_p3.ebuild
+++ b/dev-python/hidapi/hidapi-0.9.0_p3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -14,7 +14,7 @@ HOMEPAGE="https://github.com/trezor/cython-hidapi"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${PN}-${MY_PV}.tar.gz"
LICENSE="|| ( BSD GPL-3 )"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
SLOT="0"
DEPEND="
diff --git a/dev-python/jellyfin-apiclient-python/jellyfin-apiclient-python-1.6.2.ebuild b/dev-python/jellyfin-apiclient-python/jellyfin-apiclient-python-1.6.2.ebuild
index bb9f25a15b..a999edcdf3 100644
--- a/dev-python/jellyfin-apiclient-python/jellyfin-apiclient-python-1.6.2.ebuild
+++ b/dev-python/jellyfin-apiclient-python/jellyfin-apiclient-python-1.6.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,7 +13,7 @@ SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
DEPEND="
dev-python/requests[${PYTHON_USEDEP}]
diff --git a/dev-python/pystray/pystray-0.17.2.ebuild b/dev-python/pystray/pystray-0.17.2.ebuild
index 41711222e4..90908ae816 100644
--- a/dev-python/pystray/pystray-0.17.2.ebuild
+++ b/dev-python/pystray/pystray-0.17.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,11 +13,11 @@ SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="LGPL-3"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm ~x86"
DEPEND="dev-python/sphinx[${PYTHON_USEDEP}]"
RDEPEND="
${DEPEND}
dev-python/python-xlib[${PYTHON_USEDEP}]
"
-DEPEND="dev-python/pillow[${PYTHON_USEDEP}]"
+BDEPEND="dev-python/pillow[${PYTHON_USEDEP}]"
diff --git a/dev-python/python-mpv-jsonipc/python-mpv-jsonipc-1.1.12.ebuild b/dev-python/python-mpv-jsonipc/python-mpv-jsonipc-1.1.12.ebuild
index 864c0eed5a..da219358b3 100644
--- a/dev-python/python-mpv-jsonipc/python-mpv-jsonipc-1.1.12.ebuild
+++ b/dev-python/python-mpv-jsonipc/python-mpv-jsonipc-1.1.12.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,4 +13,4 @@ SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
diff --git a/dev-python/python-mpv-jsonipc/python-mpv-jsonipc-1.1.13.ebuild b/dev-python/python-mpv-jsonipc/python-mpv-jsonipc-1.1.13.ebuild
index 864c0eed5a..da219358b3 100644
--- a/dev-python/python-mpv-jsonipc/python-mpv-jsonipc-1.1.13.ebuild
+++ b/dev-python/python-mpv-jsonipc/python-mpv-jsonipc-1.1.13.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,4 +13,4 @@ SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
diff --git a/dev-python/pywebview/pywebview-3.4.ebuild b/dev-python/pywebview/pywebview-3.4.ebuild
index fcbeb15c42..bf5777d1bf 100644
--- a/dev-python/pywebview/pywebview-3.4.ebuild
+++ b/dev-python/pywebview/pywebview-3.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,7 +13,7 @@ SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
RDEPEND="
dev-python/pygobject[${PYTHON_USEDEP}]
diff --git a/dev-python/sysv_ipc/sysv_ipc-1.0.1.ebuild b/dev-python/sysv_ipc/sysv_ipc-1.0.1.ebuild
index 9a9d34bb41..8a13072dd7 100644
--- a/dev-python/sysv_ipc/sysv_ipc-1.0.1.ebuild
+++ b/dev-python/sysv_ipc/sysv_ipc-1.0.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,4 +13,4 @@ SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
diff --git a/media-gfx/oxipng/Manifest b/media-gfx/oxipng/Manifest
index b9f416ee21..aa9494155b 100644
--- a/media-gfx/oxipng/Manifest
+++ b/media-gfx/oxipng/Manifest
@@ -12,6 +12,7 @@ DIST autocfg-1.0.0.crate 12870 BLAKE2B 79e495d53298574afd3b292da7c9c363dcb3ea434
DIST autocfg-1.0.1.crate 12908 BLAKE2B 40c53cab298e4f26634c3acff3ece6a3371188d91dbf377ed664eabedcde20536edaa93daf406618f37edde019f049a6e7b9a47f627344587dbd126bee2b5e3a SHA512 630b348acb98b012e97804e6325d03c89abc22f2157762c59144c04e6c733daf550bdc7f0fe0b9f3b50e15dae8c1c3c4bdfce3d805b02f0fc987311f5332419b
DIST bit-vec-0.6.1.crate 18720 BLAKE2B 9101bf6bd91c0afc9e059c6f3dec7dad7166b2b92a3714068956b2187660f35a635524dbe1a0c8900de55b0a0b2c792ba328909e86431ac01860fd7b34a0e607 SHA512 36395ff5c4c2777a70573ceae36fddf0e516bd5128d7571f365f12171bfcca2686278ad41f1994dde0c25214c22d9161c7a4df346528b9a736ede6a8f5ede70a
DIST bit-vec-0.6.2.crate 19630 BLAKE2B 84580a6f99393e507f3fd76b543fd357fc018745e029ebb6b3e71ac3b91b6f760a0474b4d90506e36581ec432ad336be6dc67c07be206917ba2af2322e15b867 SHA512 27cafa198a55853585d76c89490878c43bccdb0fe7dd68b0b4809497be2d497056e7ca6fbef321d71dfbe18272a2571b33d79e2a1458891a420eb7a1910ff383
+DIST bit-vec-0.6.3.crate 19927 BLAKE2B f5bd3bb9c87fdf3b206739b74df20cab50a1a45af3a58b2642a5a061c26207884be58ef8369a3cd06dfd3615bff0ce15915fdd4b6b6f03facc4a0f86c0b7e910 SHA512 b4b4a82c80d0ff13527ae4fff449ac9c1c7bc519c013af6ea3428348e0e5b9306b725c0a13a42d7d9dcf0f895a9eee0c63695a2503eb7fd2200083c9ea3a9aa8
DIST bitflags-1.2.0.crate 16814 BLAKE2B 5b7aee7388b01cebf96651e979025e9bcac85f7324982055d7d805361f91da2b9489a07f00350133c8a58eaf70c5397e3561c15b3f2544aa8202bfdb852c145b SHA512 bd9e3797fb9b91e815308a5286439e7eedb285666c937184493cfce45ff1d4c10f505f29be3a6317add313a7fdc72a006682c1b3e1cc9fa05166f6c4ecaffcaa
DIST bitflags-1.2.1.crate 16745 BLAKE2B 0fa6d3ce44aad7616d5cd02aad8c1d0b0fed4022650eb43067c4a72e6fc88da05442674fa51826e4858a47c9de233e1ba2229820af094197cd11bb416ceffb2b SHA512 ad89b3798845e23737a620bba581c2ff1ff3e15bac12555c765e201d2c0b90ecea0cdbc5b5b1a3fa9858c385e8e041f8226f5acfae5bbbe9925643fff2bf3f0b
DIST build_const-0.2.1.crate 4499 BLAKE2B da7f1040560862b76447426be8884bf0ac62d2f2faca0a572b8cf566fcbbaaf27dd1f260fb1333c3cf9410251433239616aaf0ca1a2be644fd4cbcc2b908eeb1 SHA512 4e210078ad781bd645381f469285f0e4d20cc8c416818c27d98c0033f070b708a6ab27933f9c3660c83e6cbfb3afcb7ec753f9c186b0c75b99db37dff1cde658
@@ -23,6 +24,7 @@ DIST cc-1.0.45.crate 49112 BLAKE2B f24cd4aba8f84be490ee89f95c666e35156a9dfd745ba
DIST cc-1.0.58.crate 52896 BLAKE2B 118619bbe306aef5cb83350ea04a7660a4af2c365a5f0c30d045cdca73f7d68d6646889295590dff29cbf003b44f9b00d5eab22fcde8a57483aec615278dfbb8 SHA512 0a208c4dd7700ba92337ad0044c0ae1614b105d6e799fc660d07e7745c60d8e4c8d3688af7ced77734a2a695ac2e7c565c2f2b7a886d71714c2f7675ea2a22f7
DIST cc-1.0.62.crate 52639 BLAKE2B 2d6ecdd882e41e97fa3337d0b35f09e1e86acc2d08ec9c559b51974fe916ee793d15c6322d936ce00aa474791797a715def2f98e4bf1cff7415094999c262011 SHA512 46a742695d69dfdf38b34614c431f8d544a32fa6287e42e3991282332559587e44be6705502a376aaed46a7f507da832b3a50fd32c41a1b8c50aebc508ca2704
DIST cc-1.0.65.crate 52966 BLAKE2B aeced70baf550ef9cb354579d9abd30ec8d0cc4c16b619e43db8f811784a989ae8d067a70965495b1a6e6ef16d0c43a9727c9bd6e408b3ce3680911f235fe5c7 SHA512 9acffe3c2df20fe3a754fafa39b3f9af3b486fd7e26a74870e089bc769518606321f60fb3f8ae3bc8d1eed2777fb6a30d59806283726321c7c8cff6c4913b0ce
+DIST cc-1.0.66.crate 53454 BLAKE2B fe34309ae50a3b022c36270a1dc819713f9d70e9ade2f421c33c542e865dc861e3b5191e8949de253515aef6878f786a6abe048391a819d09bf57f33054a90ce SHA512 b07a70f88fa0588fb0f6bc7376e985834672cc9914a0713afe01740af6bcf01821d15720d831e8b7ea8b42f5866dbd011a245997f35bf8febc3b13d66089723e
DIST cfg-if-0.1.10.crate 7933 BLAKE2B 063a96ed176f34f788666b40adc483d147fc011dee941ab60569ddd0e57502b5dd06ed71090f4e14ce005d06e240500a286f74652615e9d068fba649610d8cf8 SHA512 9d22616bfb4a75770a828a0a3cddac6787297a5fdc53eb17e25811cc94de717f2de8bd66d53c5d65ba1c83d8892aefee5ae758cf56a1ef0a0c3120f70b244339
DIST cfg-if-1.0.0.crate 7934 BLAKE2B e99a5589c11d79d77a4537b34ce0a45d37b981c123b79b807cea836c89fc3926d693458893baca2882448d3d44e3f64e06141f6d916b748daa10b8cc1ae16d1b SHA512 0fb16a8882fd30e86b62c5143b1cb18ab564e84e75bd1f28fd12f24ffdc4a42e0d2e012a99abb606c12efe3c11061ff5bf8e24ab053e550ae083f7d90f6576ff
DIST chrono-0.4.13.crate 144286 BLAKE2B 6ff59ebcd58761852a38fe490a1b2c407d1ca07b046a0980bd1ead9973091de0518e49f4777c8b132e4f82e68b51b4a3624d90e2e09fbc5214df7f2a8a8b9e00 SHA512 02933602df1964df8e91dbab8d1b5baead493ec73d1da4a4e090eeabb3e37b818f0b800a580c13a14aae9c20df83c9f66a713bed02800f5022b2999881dc2f23
@@ -34,6 +36,7 @@ DIST cloudflare-zlib-0.2.5.crate 6160 BLAKE2B e261049fd12d98a60af00d7475651f2fea
DIST cloudflare-zlib-sys-0.2.0.crate 191122 BLAKE2B 499b5fb9d5050964f6c581332534608e0e7aae8096bde1d74c9871eccf5ab56fc4bfceaf52b1134f22fc59ce60449567c5b2245930ed50b707e76d5ece7f8392 SHA512 a488ebcc7777f156f1ce064e63a0592583c27f2e8b35d5cba33b0d54de98ec38c1d9ee884a174d6e1b7e02b314008c00dfad00796f956df18f87e033d23740d7
DIST color_quant-1.1.0.crate 6649 BLAKE2B 9a2488dd00b7a33e15e05531ea49ef1961131f0be0922ba41e2d74d2b1a047daed483ac3a9dd87c847a81cce70a347395c557cad8228ab9a8dc5be7cc0f1bcaa SHA512 690c928bda4b7b57425f38ea68ac89cde2473b7a91b7e62c04a8f2c5a0fa3505e26b065d48b7ad0a8bb491f92f600f896fefdad3ce0e86e43cbf4f9a89e94201
DIST const_fn-0.4.3.crate 15120 BLAKE2B aa2b97dbcf8dfb92f0b17f0125fb4a12f109e87fd93818fb148ec35ff405bd58609ccbdca7f9985a707d00cf92e345ef07c8fd736bfd735b76753a34a7a34966 SHA512 4c2d6c8e1bf6823f76c4572b659bb82af6b7cec2547ae132749d2443bd92cd8dfe96eeed6f704f30f7f407662b14a5d12808665a321af42cfcbc979560cb70fb
+DIST const_fn-0.4.4.crate 16138 BLAKE2B 80885ad10a5649876d37635dc6eb8b426e68f23d7bfdac234ae32816e7fae6d246ff0657d904a3b18dc5ab93fcaa3d4ff28984a1144fa3557d082c1c4d064fd1 SHA512 d79f07982c8ead364f314672ed471d41c6f31431cf511eff5e4c42ebdde324842110ffb8238394d9e8ba2ac19d884fa5f359ba04cef83acb1ca9431e14acb030
DIST crc-1.8.1.crate 9114 BLAKE2B cd96400652888e700c326a2842005c8bee699ccf3c61b87320c01196b455a55da511749241af75e903a76847beb8172598dc8f770779aefe945db7934976afbb SHA512 db0b3d0ca197cb2a2049720b753061f1532d1ba2c86c7befce36a18cb4e8008b061e39e26960b4d9dcf1e7ea55348f55c441da5d17cd0a424402a8489d52ed1a
DIST crc32fast-1.2.0.crate 39161 BLAKE2B f71c85801f945602d53f93ce251c978c91f63fcd92fecba5083fff0f06738697e99d92c17a824605d5d56b3224db224ff32e4b147b6f6af47ae714dcd511e7cd SHA512 2ee73e0642f83e28034c1baca65156e65d751214e83f2a4ce94b6add5ba11f74ffc80832a3348ece1c099367be2b11e820dfb349fae89fbced1b68bd6b0466f0
DIST crc32fast-1.2.1.crate 38172 BLAKE2B 80801a345f4c5ed8a5fd335bbf672eac1733a1c2b333dc8a8e0254338148ce7b34402201a8d2d7434dd1b057f33d99d3a8f02610ea50b54115d80bb8da28b2b0 SHA512 4c04236bb15a5c63b712c62652777917e947823abb20a0d0b372c850ec1c8695faa414e8de73904f1f1a296d7b00a6206cde8da404cf4cdaa2e8408e64b62b5e
@@ -66,7 +69,9 @@ DIST image-0.23.12.crate 217913 BLAKE2B ba8b3891785a8af7231425217044d4a24e418829
DIST image-0.23.7.crate 213226 BLAKE2B 3655c21ddb56eb0f1d4c1825aa328c1de5b87ca07a1f9ed74ea9e0c84d40af23d8f3ebbacba160836c8ba563fb371c724fe9952c580fd3ea3442aa6edd3cb079 SHA512 e1e8fe0f7661941b81e469943e3c633eb1b96e30a24b57121a1656e9fe0e55eb2515ccd75ae420b9c3a62c55859947ab5f2f924f90e7f73905ee3191e82a4071
DIST indexmap-1.5.0.crate 46181 BLAKE2B 3e90210163f75e6cfd2a6e674d24fcd0275667414ffd3323ab86fb20d673908cc2079aeb84c4bf821275844e0be33a96a025262e2029d83c201d293b0719f589 SHA512 5a88b166f8c5d9066598e79a3d7d6ddaea44db6380bf7517f31061aa8701d6e66cac67ae77ad7784469c2476a19069d6dd1f385af257beec8366379c7213f274
DIST indexmap-1.6.0.crate 47565 BLAKE2B 4b2c50788be5c5416973133c10caf092468444af6c101eceb5d2f53ec3502d73c034205186974efb335a1d8aa9a797b191a871fcfd573251c95ad1d13c0c47cc SHA512 f91c0d3588da037a2dc728c9cd823b4acf7edfbe7d59b28dbe1f5802294f2677eacf0ccea41235daa30b3d8187a97938653a040d8c9d2d38513440b2e82fd85e
+DIST indexmap-1.6.1.crate 49644 BLAKE2B 605929e1b6b3473171fb2af7500d769783d7e3872244800c107664fdd7decb7603bd3657ba208d3022a931fc499bb2c2e6b8aed85f880d3ed1deb827dab70703 SHA512 a859cf4f2db46fe753aae0562ba6ea32dd529789a29784324e82b03f64f42a4f302789230ac298860513b1cd8cb238b7a150f6f865d342d606fcb7a2787f9a03
DIST inflate-0.4.5.crate 17715 BLAKE2B c46dd3e4d064c135921670b940a3cd3ae152c5cadc67e00f6e4a350e7d22efc66807dc64b6e5943af30f1b985b2cea2dc42e7d923a05bcc268deec22a0a7de17 SHA512 1392402f72a8463dc5cdaf815d8933e8dfcc914fb3a91e69c38e54deb7d55b5211e157b640b7cfa999400fb4d2e233a4a1a678147594dfa0be300894126d17f2
+DIST itertools-0.10.0.crate 109656 BLAKE2B 73b65db4a9f02cd6940a81966ff433c5d9d82bda15b2250907728b2305451e2914e0211ed16e9755585d6a4ea67c3f2b1a5b1ca589afb60f20f23d1c1d31da7a SHA512 ecc194ded512a0979c4429c0395125e1d3968c61f673546b755c0a8bf2fa5a604690baf77e95dbb91dc26a3004b50a856a8aee0dae0e4c1bd83073e5e7cacefd
DIST itertools-0.8.0.crate 78917 BLAKE2B 4b519303380c421b5ec9af7b5c97575a39899ed77b0ff462d5c5db65a70f9c1f56959254aa7d20db3fc4f8af033340a96fbcebb189f4d92a2e09f887c736a898 SHA512 ce1dd1f52f6792a6f5303e15f74063d50c11b75312cb807eeddaae7811686347c390426956cbe87b827b970b14b6e4d57fb4ac0f288632766218ff8661feb610
DIST itertools-0.9.0.crate 96429 BLAKE2B 36d3b1dec7ece85639337f1a40a00330a5216ea8c460d13e52f0f9fea71bed5b3914cc4a7e05b407ed41e0dbc2292ae5873b3481297edcd92ec547866d044b8c SHA512 1c6650060750f3073140c4a77fc4d1acffa7d18320012807df0e20ab06ddb39afa7f086d89626e3909f89dc1f0408c9ccee4dd9454ca1f7a6a145bb213e7c5ce
DIST lazy_static-0.2.11.crate 12361 BLAKE2B 3fe6a480c30a792448a3a2b378e05634ec59603f07baa03c0881fe5af85ecde5a172bb0733e7043fb6c43eabc261635b23410658d48add09eef6d807a750d22f SHA512 c85ac434d1b7d41d638e76a142a43d925b96bdddda112b1abeca1bae160d828262a85cd333d72499fe1dc7ae9574d3db226106acb433328c056028eb8c42bfe6
@@ -74,6 +79,7 @@ DIST lazy_static-1.4.0.crate 10443 BLAKE2B 25b2e61bbac48f0dcbc79c81d7bf01f2403d8
DIST libc-0.2.62.crate 433193 BLAKE2B cb6c3f6def6c33f0723ec3dcea2ec4b96f2a7a2e0bbe5ba0ed6a6cb69a43e64016bd05569c6d8e4701592a9d69f7b8a92213a25b5889f833f03bf2f7de9cf184 SHA512 93c178429a099606d4d61576d74204e87c042c4591b8472eb56eb3ddee883b135e28be09ff48e2718c4cdadbfc641e3a313665fe493d64b1820a7e6018f79d1e
DIST libc-0.2.73.crate 502354 BLAKE2B 72120cb5f110870b571724710a082222025f40df6c2ab770cb9011ce75ecc259d22c7f296e2aea8ee967af476d70b5e848fb7d4b3656d694e7a22435b723a0b3 SHA512 e24581325c43c7aeb6c9b4d48dbe7ab103f2defbbea9a3c6358e7a71ef357c0ca5dd71afe3cfaa2b699dca4d5cdd2ceb41964e007d715fba6c326d3262d51343
DIST libc-0.2.80.crate 513503 BLAKE2B d4bb5f789efa230ec9a7a2071652fc1e344669e5dfe3a2015694a1e8442cd5adc142f1374841a4f01984f132f0ad5f027913b201cd624f97e93d2bba31ad96a0 SHA512 69b2f4c67d29bd4fc8f6d0388036ac3ea0de2ba7387f56f4e4bd035696ba313fdce10d18107ef83490f574d6fff796b305d5f2c2bb03a7cf33b9136386e65b8c
+DIST libc-0.2.81.crate 513105 BLAKE2B 789a79faf2d5079f5c4248446fa7c07b11af647bbcc32521e7989928788bea7dc2f65204f396b4fe0c7b3a6cf5248882d7775b97c028a3af1ba35e8ecdb489f8 SHA512 8e121e0dcbd8218e02c2c6536ef6398cd002a92406d433c39bf84576e9b881c5b8a66fee826da6a6189f44b825f3a9d959075eeb0501d7f604bf9cc1a8b8d437
DIST libdeflate-sys-0.5.0.crate 135597 BLAKE2B e793c56a4760c29524bbe920fdb58b015c15f0c8c97da3e24f85465629f42405ced7fd25ac2ba431597499ec4ef90a72fb713cf79a5c53896535696cc57f97ab SHA512 12ca14e23a79bd829b147c399c6af1c79e962f4d02e780436895bcf5cf9fee28e2814fedd251e7227e937a3db6b69102d3e851c2d773b728a688dde38c329253
DIST libdeflate-sys-0.7.1.crate 145642 BLAKE2B 6fa6455bc7d1b190fbde1ba3f125043ce238a593065266b9c3bdcb1ee380e3aa582eabc3c98c23eed876d7fb525adc3071beccb62d99a80106000d882fdc4ffc SHA512 426db0723b118bbad2813543c46117f8a1d432601bc0d7a38b65bc3f0d3aa0d6fb7f8e4f18ce3c2aecac1659e662296657a31773691e9a6d2fbf33a47981ce86
DIST libdeflater-0.5.0.crate 154437 BLAKE2B 225e4b83b9aa6ffc2bd37bdbab055614e08396f9ff02fe88d55c67c70237737e2d03320dce75b27222c2c87cc626f2e6ec67bf4083e55ba7be820fb6798f9abd SHA512 8fe2e1091dc0a7971fc86cc757ff1b87410e6c09b8da919e6666c06ef531c73ee116ed66ca6ac31de9ad59fbb7b2e43aa58b72f7566bb8d39b6b46ef3550ebba
@@ -108,9 +114,11 @@ DIST oxipng-2.3.0.tar.gz 51816658 BLAKE2B c6a3785b968ad66e3b00c78664ed6c7c777c6b
DIST oxipng-3.0.1.tar.gz 51821018 BLAKE2B a1eada54d99f3033914cb28347ab0133aaa8e6a146d6b8f3124a2ce5acb7a74311f6cef6742b076f10a6959dda446498096acfccba44bd424a8bbfb8e79cea58 SHA512 e487debbb096ad7cc372f8f5b27768fc9eabab3431ae4f7e07aecda12ff724640db54c9673bb6f3eac7589246cbb9644d2f6126e1f5c7955872e3c5e974ec8bb
DIST oxipng-4.0.0.tar.gz 51820607 BLAKE2B e3e880a7880d3411aaffba32eb3cb4a5ff19daf324a685fd08475d513f3d3a0b18c0dada4404030688abea82d7833dc79c7050e5f4e1e79adf227faa4a4997a6 SHA512 f3c4d7d121ac8367eb46f5abe9590a426725ab3e7c24913e0540882d6b1c80534181af0ff5600d62a63164e277e629918efd591a0e4ff259effe441c818377f7
DIST oxipng-4.0.2.tar.gz 51820716 BLAKE2B 91e4ed7bca7b154e39029d801006354c7caa571283ac24ed5e8ca7b29e9119aa20296fc89cc6dc3d7f59ffda74b67c21ff627888e4eeaa987b50f814e6199476 SHA512 fbe4fd253baef152aecd94977fadb10891b581ee0da9eb743e6c3132aa3353ac8a523606ed9be81522b1f5df1128908ef372918944c4c217c5a3dabb08a742c7
+DIST oxipng-4.0.3.tar.gz 51821267 BLAKE2B 12902c45af91281f8a24e166f510e854736485f9847e663079f66a9f9ab5ecd68321171c1cce1f0ed07ae9a30d34b57b8422cd2d00d3acbd239592dc6720016d SHA512 42e79e29ca3ef5eb17021210859902f7fb351366cb8d9b74e645a6c924b2433bcd440fdd0d55986cadca1af44537e8f537b97c481fd073d984a62bb93a4cd4ec
DIST pest-2.1.3.crate 77986 BLAKE2B 210638cdc2cc5e389d2248fbc06b8163dd5ddd77974a04d32f674e7f959acb3c5efc7f26100b6ceb7c346ee06a39db0e11ad5b793a1bc09dba679e6a5a4aa2f1 SHA512 08a36d4571cc0e912ae87e1f2116424b3d4139b653dd9a446fec8ff39cd9a691e8305c86cf75d227b5349197ada4ce79912ac25f0726b98a0642981ac4673c83
DIST png-0.15.0.crate 31281 BLAKE2B 5e1d1287dff94d0b6a083284fdbfc7007c0e7c4661d4528af78ae9df699706c79c3713cdd479c5e96ede255d1df7a4c6cc0f4ff4caf732776aa336ef94abd65c SHA512 dd7d4ab9013196575f468a1b2598524973d031a3854c5e7954943ce21bfde4a6a9f7d373237063afc6a4a942ae36e3453f4d12dd1852aaa01e43487e87d332f8
DIST png-0.16.7.crate 54062 BLAKE2B 195b7049aa3b2574ce64bac34745c38aa97ec7996e1801d30b748a7126b62bbc5ad39a0f59b28077e1d4240f920438b8fbde59f4bf704f566be913599008a600 SHA512 3074568b2386b8db51668b313d67436d35bc39c60e64bd203d32dccdb5eaa4ea7a43b9830a0a6d012543b7b32422d514510bff32ce2d18310e03ad61f237fb27
+DIST png-0.16.8.crate 52598 BLAKE2B 03f706591182a89b0566f8a793163372a4db3e7a742f3aadf06fda93068c42a4351722796ddbbb013fdc1be5a88dc02debae50ab1cc3ac81d72d07a814b456ce SHA512 df96f8580d8cc11df54788ff64ab3269b14369a467d7c29964a5b19add5e7a82258e6bfda40eedf135bffa98a2a86afbb725cd085cf37f6c433abf9a7485edee
DIST rayon-1.2.0.crate 144769 BLAKE2B 9614fb6db62dec788da66305bd84a5bc2d3793921ca343a924443abc97ab9e5e113b50506d65f5e219a64bda4759b8f6eca901796746b026b03a1761c80451e4 SHA512 351f7ddd2600001ef9655f290b743034402a56dcb04a25ac25afeaa549da5e399a8be72cd318d3d4a558d1a190bca7ce03386f3320e9909db48d9d1152154a52
DIST rayon-1.3.1.crate 151292 BLAKE2B 16fb0eff9372acd9fa82542ae39f6ebaa38ba21544d7a77a94633d7160779579b0ca9560a37c4b228193c7e7247293d5a002c7b8a9727a8e2b78978de8bd6db6 SHA512 fa1779955629e7d6422a5eb7069cc433aad2ef4ebc7b33e8ddc35fddbbdf79292e6994e8ca48a9e0ee8f053fa13809b9d42e53126f2df1d055ca180320cffc1c
DIST rayon-1.5.0.crate 158037 BLAKE2B 6cb7f696e9c04d3aa6c3bf9c95690c2e259267024ac9701da5cd85c7d39b900a7e9e423e5b7602e108587a34c2519642ce1456dfd82fb13328ed3aba7516b569 SHA512 be15cbc7ad0fadb55e5640c78aa2eeac282872be88c5402338caad0a7ea604d2b8477648dcf7e453e22fbcdfefa915aa4bdbfa75e3d4f7a993fd8d85ed68395a
diff --git a/media-gfx/oxipng/oxipng-4.0.3.ebuild b/media-gfx/oxipng/oxipng-4.0.3.ebuild
new file mode 100644
index 0000000000..e7a2825c20
--- /dev/null
+++ b/media-gfx/oxipng/oxipng-4.0.3.ebuild
@@ -0,0 +1,99 @@
+# Copyright 2017-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Auto-Generated by cargo-ebuild 0.3.1
+
+EAPI=7
+
+CRATES="
+adler-0.2.3
+adler32-1.2.0
+ansi_term-0.11.0
+atty-0.2.14
+autocfg-1.0.1
+bit-vec-0.6.3
+bitflags-1.2.1
+build_const-0.2.1
+bytemuck-1.4.1
+byteorder-1.3.4
+cc-1.0.66
+cfg-if-0.1.10
+cfg-if-1.0.0
+chrono-0.4.19
+clap-2.33.3
+cloudflare-zlib-0.2.5
+cloudflare-zlib-sys-0.2.0
+color_quant-1.1.0
+const_fn-0.4.4
+crc-1.8.1
+crc32fast-1.2.1
+crossbeam-channel-0.5.0
+crossbeam-deque-0.8.0
+crossbeam-epoch-0.9.1
+crossbeam-utils-0.8.1
+deflate-0.8.6
+either-1.6.1
+glob-0.3.0
+hashbrown-0.9.1
+hermit-abi-0.1.17
+image-0.23.12
+indexmap-1.6.1
+itertools-0.10.0
+lazy_static-1.4.0
+libc-0.2.81
+libdeflate-sys-0.7.1
+libdeflater-0.7.1
+log-0.4.11
+memoffset-0.6.1
+miniz_oxide-0.3.7
+miniz_oxide-0.4.3
+num-integer-0.1.44
+num-iter-0.1.42
+num-rational-0.3.2
+num-traits-0.2.14
+num_cpus-1.13.0
+pest-2.1.3
+png-0.16.8
+rayon-1.5.0
+rayon-core-1.9.0
+rgb-0.8.25
+rustc_version-0.3.0
+scopeguard-1.1.0
+semver-0.11.0
+semver-parser-0.10.1
+stderrlog-0.5.0
+strsim-0.8.0
+termcolor-1.1.2
+textwrap-0.11.0
+thread_local-1.0.1
+time-0.1.44
+typed-arena-1.7.0
+ucd-trie-0.1.3
+unicode-width-0.1.8
+vec_map-0.8.2
+wasi-0.10.0+wasi-snapshot-preview1
+wild-2.0.4
+winapi-0.3.9
+winapi-i686-pc-windows-gnu-0.4.0
+winapi-util-0.1.5
+winapi-x86_64-pc-windows-gnu-0.4.0
+zopfli-0.4.0
+"
+
+inherit cargo
+
+DESCRIPTION="A lossless PNG compression optimizer"
+HOMEPAGE="https://github.com/shssoichiro/oxipng"
+SRC_URI="https://github.com/shssoichiro/oxipng/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ $(cargo_crate_uris ${CRATES})"
+# Prevent portage from trying to fetch bunch of *.crate from mirror despite they are not mirrored.
+RESTRICT="mirror"
+LICENSE="Apache-2.0 MIT ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+src_install() {
+ cargo_src_install
+
+ dodoc CHANGELOG.md README.md
+}
diff --git a/media-libs/svt-av1/svt-av1-0.8.5.ebuild b/media-libs/svt-av1/svt-av1-0.8.5.ebuild
index 4cbe4e4653..b38378964b 100644
--- a/media-libs/svt-av1/svt-av1-0.8.5.ebuild
+++ b/media-libs/svt-av1/svt-av1-0.8.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,7 +13,7 @@ if [ ${PV} = "9999" ]; then
EGIT_REPO_URI="https://github.com/OpenVisualCloud/SVT-AV1.git"
else
SRC_URI="https://github.com/OpenVisualCloud/SVT-AV1/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 -x86" # -x86: https://github.com/OpenVisualCloud/SVT-AV1/issues/1231
+ KEYWORDS="~amd64 -arm ~arm64 -x86" # -x86: https://github.com/OpenVisualCloud/SVT-AV1/issues/1231
S="${WORKDIR}/SVT-AV1-${PV}"
fi
diff --git a/media-libs/svt-av1/svt-av1-0.8.6.ebuild b/media-libs/svt-av1/svt-av1-0.8.6.ebuild
index abf92eceeb..0227da3166 100644
--- a/media-libs/svt-av1/svt-av1-0.8.6.ebuild
+++ b/media-libs/svt-av1/svt-av1-0.8.6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,7 +13,7 @@ if [ ${PV} = "9999" ]; then
EGIT_REPO_URI="https://github.com/OpenVisualCloud/SVT-AV1.git"
else
SRC_URI="https://github.com/OpenVisualCloud/SVT-AV1/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 -x86" # -x86: https://github.com/OpenVisualCloud/SVT-AV1/issues/1231
+ KEYWORDS="~amd64 -arm ~arm64 -x86" # -x86: https://github.com/OpenVisualCloud/SVT-AV1/issues/1231
S="${WORKDIR}/SVT-AV1-${PV}"
fi
diff --git a/media-libs/svt-av1/svt-av1-9999.ebuild b/media-libs/svt-av1/svt-av1-9999.ebuild
index abf92eceeb..0227da3166 100644
--- a/media-libs/svt-av1/svt-av1-9999.ebuild
+++ b/media-libs/svt-av1/svt-av1-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,7 +13,7 @@ if [ ${PV} = "9999" ]; then
EGIT_REPO_URI="https://github.com/OpenVisualCloud/SVT-AV1.git"
else
SRC_URI="https://github.com/OpenVisualCloud/SVT-AV1/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 -x86" # -x86: https://github.com/OpenVisualCloud/SVT-AV1/issues/1231
+ KEYWORDS="~amd64 -arm ~arm64 -x86" # -x86: https://github.com/OpenVisualCloud/SVT-AV1/issues/1231
S="${WORKDIR}/SVT-AV1-${PV}"
fi
diff --git a/media-libs/svt-hevc/metadata.xml b/media-libs/svt-hevc/metadata.xml
index b52ef3f630..219dfece5d 100644
--- a/media-libs/svt-hevc/metadata.xml
+++ b/media-libs/svt-hevc/metadata.xml
@@ -3,7 +3,7 @@
telans@posteo.de
- telans
+ Theo Anderson
OpenVisualCloud/SVT-HEVC
diff --git a/media-libs/svt-hevc/svt-hevc-1.5.0.ebuild b/media-libs/svt-hevc/svt-hevc-1.5.0.ebuild
index 909e65f77e..e85af88c78 100644
--- a/media-libs/svt-hevc/svt-hevc-1.5.0.ebuild
+++ b/media-libs/svt-hevc/svt-hevc-1.5.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,7 +13,7 @@ if [ ${PV} = "9999" ]; then
EGIT_REPO_URI="https://github.com/OpenVisualCloud/SVT-HEVC.git"
else
SRC_URI="https://github.com/OpenVisualCloud/SVT-HEVC/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64"
+ KEYWORDS="~amd64 ~arm64"
S="${WORKDIR}/SVT-HEVC-${PV}"
fi
diff --git a/media-libs/svt-hevc/svt-hevc-9999.ebuild b/media-libs/svt-hevc/svt-hevc-9999.ebuild
index 909e65f77e..e85af88c78 100644
--- a/media-libs/svt-hevc/svt-hevc-9999.ebuild
+++ b/media-libs/svt-hevc/svt-hevc-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,7 +13,7 @@ if [ ${PV} = "9999" ]; then
EGIT_REPO_URI="https://github.com/OpenVisualCloud/SVT-HEVC.git"
else
SRC_URI="https://github.com/OpenVisualCloud/SVT-HEVC/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64"
+ KEYWORDS="~amd64 ~arm64"
S="${WORKDIR}/SVT-HEVC-${PV}"
fi
diff --git a/media-libs/svt-vp9/metadata.xml b/media-libs/svt-vp9/metadata.xml
index 5a4a496798..128b85cd7e 100644
--- a/media-libs/svt-vp9/metadata.xml
+++ b/media-libs/svt-vp9/metadata.xml
@@ -3,7 +3,7 @@
telans@posteo.de
- telans
+ Theo Anderson
OpenVisualCloud/SVT-VP9
diff --git a/media-libs/svt-vp9/svt-vp9-0.3.0.ebuild b/media-libs/svt-vp9/svt-vp9-0.3.0.ebuild
index 4ac9f4dc0d..c6cfc4ce17 100644
--- a/media-libs/svt-vp9/svt-vp9-0.3.0.ebuild
+++ b/media-libs/svt-vp9/svt-vp9-0.3.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,7 +13,7 @@ if [ ${PV} = "9999" ]; then
EGIT_REPO_URI="https://github.com/OpenVisualCloud/SVT-VP9.git"
else
SRC_URI="https://github.com/OpenVisualCloud/SVT-VP9/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64"
+ KEYWORDS="~amd64 ~arm64"
S="${WORKDIR}/SVT-VP9-${PV}"
fi
diff --git a/media-libs/svt-vp9/svt-vp9-9999.ebuild b/media-libs/svt-vp9/svt-vp9-9999.ebuild
index 4ac9f4dc0d..c6cfc4ce17 100644
--- a/media-libs/svt-vp9/svt-vp9-9999.ebuild
+++ b/media-libs/svt-vp9/svt-vp9-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,7 +13,7 @@ if [ ${PV} = "9999" ]; then
EGIT_REPO_URI="https://github.com/OpenVisualCloud/SVT-VP9.git"
else
SRC_URI="https://github.com/OpenVisualCloud/SVT-VP9/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64"
+ KEYWORDS="~amd64 ~arm64"
S="${WORKDIR}/SVT-VP9-${PV}"
fi
diff --git a/net-p2p/monero/monero-0.17.1.7.ebuild b/net-p2p/monero/monero-0.17.1.7.ebuild
index 5cfdcb4d40..fb62cb7950 100644
--- a/net-p2p/monero/monero-0.17.1.7.ebuild
+++ b/net-p2p/monero/monero-0.17.1.7.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -7,11 +7,17 @@ inherit cmake systemd
DESCRIPTION="The secure, private, untraceable cryptocurrency"
HOMEPAGE="https://github.com/monero-project/monero"
-SRC_URI="https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/monero-project/monero.git"
+else
+ SRC_URI="https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+fi
LICENSE="BSD MIT"
SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="+daemon libressl readline +tools +wallet-cli +wallet-rpc"
REQUIRED_USE="|| ( daemon tools wallet-cli wallet-rpc )"
RESTRICT="test"
@@ -35,8 +41,8 @@ RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"
PATCHES=(
- "${FILESDIR}/${P}-linkjobs.patch"
- "${FILESDIR}/${P}-unbundle-dependencies.patch"
+ "${FILESDIR}/${PN}-0.17.1.7-linkjobs.patch"
+ "${FILESDIR}/${PN}-0.17.1.7-unbundle-dependencies.patch"
)
src_configure() {
diff --git a/net-p2p/monero/monero-0.17.1.8.ebuild b/net-p2p/monero/monero-0.17.1.8.ebuild
index 29d4250f39..fb62cb7950 100644
--- a/net-p2p/monero/monero-0.17.1.8.ebuild
+++ b/net-p2p/monero/monero-0.17.1.8.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -7,11 +7,17 @@ inherit cmake systemd
DESCRIPTION="The secure, private, untraceable cryptocurrency"
HOMEPAGE="https://github.com/monero-project/monero"
-SRC_URI="https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/monero-project/monero.git"
+else
+ SRC_URI="https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+fi
LICENSE="BSD MIT"
SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="+daemon libressl readline +tools +wallet-cli +wallet-rpc"
REQUIRED_USE="|| ( daemon tools wallet-cli wallet-rpc )"
RESTRICT="test"
diff --git a/net-p2p/monero/monero-9999.ebuild b/net-p2p/monero/monero-9999.ebuild
new file mode 100644
index 0000000000..528e57f452
--- /dev/null
+++ b/net-p2p/monero/monero-9999.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake systemd
+
+DESCRIPTION="The secure, private, untraceable cryptocurrency"
+HOMEPAGE="https://github.com/monero-project/monero"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/monero-project/monero.git"
+ EGIT_SUBMODULES=()
+else
+ SRC_URI="https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+LICENSE="BSD MIT"
+SLOT="0"
+IUSE="+daemon libressl readline +tools +wallet-cli +wallet-rpc"
+REQUIRED_USE="|| ( daemon tools wallet-cli wallet-rpc )"
+RESTRICT="test"
+
+DEPEND="
+ acct-group/monero
+ acct-user/monero
+ dev-libs/boost:=[nls,threads]
+ dev-libs/libsodium:=
+ dev-libs/randomx
+ dev-libs/rapidjson
+ dev-libs/supercop
+ net-dns/unbound:=[threads]
+ net-libs/czmq:=
+ net-libs/miniupnpc
+ !libressl? ( dev-libs/openssl:= )
+ libressl? ( dev-libs/libressl:= )
+ readline? ( sys-libs/readline:0= )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}/${PN}-0.17.1.7-unbundle-dependencies.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ # TODO: Update CMake to install built libraries (help wanted)
+ -DBUILD_SHARED_LIBS=OFF
+ -DMANUAL_SUBMODULES=ON
+ -DMONERO_PARALLEL_LINK_JOBS=1
+ -DUSE_DEVICE_TREZOR=OFF
+ )
+
+ cmake_src_configure
+}
+
+src_compile() {
+ local targets=()
+ use daemon && targets+=(daemon)
+ use tools && targets+=(blockchain_{ancestry,blackball,db,depth,export,import,prune,prune_known_spent_data,stats,usage})
+ use wallet-cli && targets+=(simplewallet)
+ use wallet-rpc && targets+=(wallet_rpc_server)
+ cmake_build ${targets[@]}
+}
+
+src_install() {
+ einstalldocs
+
+ # Install all binaries.
+ find "${BUILD_DIR}/bin/" -type f -executable -print0 |
+ while IFS= read -r -d '' line; do
+ dobin "$line"
+ done
+
+ if use daemon; then
+ dodoc utils/conf/monerod.conf
+
+ # data-dir
+ keepdir /var/lib/monero
+ fowners monero:monero /var/lib/monero
+ fperms 0755 /var/lib/monero
+
+ # log-file dir
+ keepdir /var/log/monero
+ fowners monero:monero /var/log/monero
+ fperms 0755 /var/log/monero
+
+ # /etc/monero/monerod.conf
+ insinto /etc/monero
+ doins "${FILESDIR}/monerod.conf"
+
+ # OpenRC
+ newconfd "${FILESDIR}/monerod.confd" monerod
+ newinitd "${FILESDIR}/monerod.initd" monerod
+
+ # systemd
+ systemd_dounit "${FILESDIR}/monerod.service"
+ fi
+}
+
+pkg_postinst() {
+ if use daemon; then
+ elog "Start the Monero P2P daemon as a system service with"
+ elog "'rc-service monerod start'. Enable it at startup with"
+ elog "'rc-update add monerod default'."
+ elog
+ elog "Run monerod status as any user to get sync status and other stats."
+ elog
+ elog "The Monero blockchain can take up a lot of space (80 GiB) and is stored"
+ elog "in /var/lib/monero by default. You may want to enable pruning by adding"
+ elog "'prune-blockchain=1' to /etc/monero/monerod.conf to prune the blockchain"
+ elog "or move the data directory to another disk."
+ fi
+}
diff --git a/sci-electronics/bsc/bsc-9999.ebuild b/sci-electronics/bsc/bsc-9999.ebuild
new file mode 100644
index 0000000000..d76b4f5f56
--- /dev/null
+++ b/sci-electronics/bsc/bsc-9999.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Bluespec High Level Hardware Design Language"
+HOMEPAGE="https://github.com/B-Lang-org/bsc"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/B-Lang-org/${PN}.git"
+else
+ SRC_URI=""
+ KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
+fi
+
+LICENSE="BSD GPL-3+ MIT"
+SLOT="0"
+
+RDEPEND="
+ dev-haskell/old-time:0=
+ dev-haskell/regex-compat:0=
+ dev-haskell/split:0=
+ dev-haskell/syb:0=
+ dev-lang/tcl
+"
+
+DEPEND="
+ ${RDEPEND}
+"
+
+BDEPEND="
+ dev-haskell/cabal:0=
+ dev-lang/ghc:0=
+ dev-util/gperf
+ sys-devel/autoconf
+ sys-devel/bison
+ sys-devel/flex
+"
+
+src_install() {
+ emake PREFIX="${D}" install
+}
diff --git a/sci-electronics/bsc/metadata.xml b/sci-electronics/bsc/metadata.xml
new file mode 100644
index 0000000000..826f1f530c
--- /dev/null
+++ b/sci-electronics/bsc/metadata.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ vowstar@gmail.com
+ Huang Rui
+
+
+ B-Lang-org/bsc
+
+
+ This is a compiler, simulator, and associated tools for Bluespec High Level
+ Hardware Design Language (HL-HDL), supporting the two optional syntaxes,
+ BSV and BH. Language specifications and tutorials are available in the
+ BSVlang repository.
+
+
diff --git a/sci-physics/SU2/Manifest b/sci-physics/SU2/Manifest
index 7b30d7cdac..7a4bd55dd8 100644
--- a/sci-physics/SU2/Manifest
+++ b/sci-physics/SU2/Manifest
@@ -1,7 +1,4 @@
-DIST SU2-7.0.6-TestCases.tar.gz 447944839 BLAKE2B 5212ef7bf69bb40120ca2af99a02f2a89ae6cc0a1e048e57409ee1d2911f930452f4a5ef668126d6b7144c3f81d50bdadd0bcc810f0472740ccbbb6605e5a07d SHA512 c976450e7e17df58b47cbf14d18c4435f977a70dc086d5b74ea584ae14b3204632ef87b2dce6a456396179f1b72ef8eba83065a42d978b8d6966d5446decbd3c
-DIST SU2-7.0.6-Tutorials.tar.gz 64282244 BLAKE2B 3b0ce136c9fa5c3e0ffc585e28b1a60470eeaf2518cbef539fccc185f79cd41a889e3c3c8a0ada3f488cfe1d2d0115e2768267c6ef4502b882b07f909f6f382c SHA512 4aaf39b98cbbe4c9e12d78027b0ee2b3d30fd614d1e48092d8bfd25c312a06a1621b2192653a7d8ac767762b06ae339ab6fb77e81f833efdb419ce09f92dec2f
-DIST SU2-7.0.6.tar.gz 20531872 BLAKE2B 30e59bc6876223d87429b79f101a5705f989096a1b81725aa20012567d15b08b6a8a24140cc76b35c6c3657a1d6afa85d56da699ab38dac85714e296d7ad8531 SHA512 a4619dd969c6d9cb20de1d373c8e0af9d56654f9f96d919662897db4c3c8bf52b45fb1239065d480ba1b4f05ba7a17c9540ff3fe47fb0d96864736200cda8bcc
DIST SU2-7.0.7-TestCases.tar.gz 448969006 BLAKE2B 6c886824b55d7f8516d2ea69e2f7bef36a40986f4f715da46d91f851eb59390329433c6941a280eca34ad675633b2f1b01a897d1db8d177a5c4f770b286d0625 SHA512 0884b4f750dbcfd3f2cb0e71d6005932e4edd90a50fa84eb484f6c0c523930ddebfb3ed4315161b8fdeff911a52fa72b6d79739c8e19cd634b9823e007520213
DIST SU2-7.0.7-Tutorials.tar.gz 64282235 BLAKE2B 7a6b780ee6f01d26a7a7d4751ca39798af56cfd7b99ca3e13fdff61aecd631a3aa4c98a487f48a8b2593c711ee25bd1ddc90a316bde2c287e95a383321f1d5e9 SHA512 189b5da96f08689b62ba3c42ee349edd2e145f371112895587e53497f16de3d6fdbf17308af39961775d76e3169c40872ced8e267146b6da5ae12d31a4c70fa9
-DIST SU2-7.0.7.tar.gz 20618138 BLAKE2B c823ea59fd28547b78c4694d45995e83c5f2c16229c40d20b951cdd62a98e13c77c07cffa87a1ec105b29a597878c7a2342c6ac90c7c9751ed20f876194a55e1 SHA512 c5dacc8b2f4ab7eb72852d8e6ae59c0800e8126faf20641135fa31ec42915b8e3553082e328b2b158e3e337f7aab0a932b6b1f875d3c0191db538bb923affcf3
+DIST SU2-7.0.8-fix-python-optimize.patch 104379 BLAKE2B e2cb9f58af5f600f25d01a082b55a344d3b05c455d44cfcb3370fc77546b6821d616e80f577b7af4b19ad519f086495eb6f6bde1f1712451ac477d6dd538fa0e SHA512 f21ed5fc1e61b78f3858a162a899c552777143118f05db009247c6224b06b922b6280de5725726afe21a3283a18ad9c38fc1c65dadb709d440e10cf3fe754d8c
DIST SU2-7.0.8.tar.gz 20554206 BLAKE2B ac291eeae696197f5875839defa98bde550c5250b5a5cff8049e0d1c8184c5ec6d225b77618d079a8fb3d5a7f4d0531a0b2931fd15e045299fa55c7dd03d9fd1 SHA512 26ed8c39d2dfcdb3fc4e1c986c64f683f44cd4123ce5f7a482c4557a82b04b4bd8ef1f04332ab36ad0f987cfb98053fb8b30ef81faf51c7c56aebc1a30467df9
diff --git a/sci-physics/SU2/SU2-7.0.6.ebuild b/sci-physics/SU2/SU2-7.0.6.ebuild
deleted file mode 100644
index bc5b90fea7..0000000000
--- a/sci-physics/SU2/SU2-7.0.6.ebuild
+++ /dev/null
@@ -1,115 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8} )
-
-inherit meson python-single-r1
-
-DESCRIPTION="SU2: An Open-Source Suite for Multiphysics Simulation and Design"
-HOMEPAGE="https://su2code.github.io/"
-SRC_URI="
- https://github.com/su2code/SU2/archive/v${PV}.tar.gz -> ${P}.tar.gz
- test? ( https://github.com/su2code/TestCases/archive/v${PV}.tar.gz -> ${P}-TestCases.tar.gz )
- tutorials? ( https://github.com/su2code/Tutorials/archive/v${PV}.tar.gz -> ${P}-Tutorials.tar.gz )
-"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64"
-
-# cgns, metis, parmetis are bundled;
-# omp is disable as it's experimental;
-# pastix is disabled as it's try to find bundled libs;
-IUSE="cgns -mkl +mpi openblas tecio test tutorials"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
- mkl? ( !openblas )
-"
-
-RDEPEND="
- ${PYTHON_DEPS}
- mpi? ( virtual/mpi[cxx] )
- mkl? ( sci-libs/mkl )
- openblas? ( sci-libs/openblas )
-"
-DEPEND="
- ${RDEPEND}
- tecio? ( dev-libs/boost:= )
-"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
- "${FILESDIR}/${P}-fix-env.patch"
- "${FILESDIR}/${PN}-7.0.4-unbundle_boost.patch"
- "${FILESDIR}/${PN}-7.0.4-fix-python-optimize.patch"
-)
-
-DOCS=( "LICENSE.md" "README.md" "SU2_PY/documentation.txt" )
-
-src_unpack() {
- unpack "${P}.tar.gz"
- if use test ; then
- einfo "Unpacking ${P}-TestCases.tar.gz to /var/tmp/portage/sci-physics/${P}/work/${P}/TestCases"
- tar -C "${P}"/TestCases --strip-components=1 -xzf "${DISTDIR}/${P}-TestCases.tar.gz" || die
- fi
- if use tutorials ; then
- einfo "Unpacking ${P}-Tutorials.tar.gz to /var/tmp/portage/sci-physics/${P}/work/${P}"
- mkdir "${P}"/Tutorials
- tar -C "${P}"/Tutorials --strip-components=1 -xzf "${DISTDIR}/${P}-Tutorials.tar.gz" || die
- fi
-}
-
-src_configure() {
- local emesonargs=(
- -Denable-autodiff=false
- -Denable-directdiff=false
- -Denable-pastix=false
- -Denable-pywrapper=false
- -Dwith-omp=false
- $(meson_feature mpi with-mpi)
- $(meson_use cgns enable-cgns)
- $(meson_use mkl enable-mkl)
- $(meson_use openblas enable-openblas)
- $(meson_use tecio enable-tecio)
- $(meson_use test enable-tests)
- )
- meson_src_configure
-}
-
-src_test() {
- ln -s ../../${P}-build/SU2_CFD/src/SU2_CFD SU2_PY/SU2_CFD
- ln -s ../../${P}-build/SU2_DEF/src/SU2_DEF SU2_PY/SU2_DEF
- ln -s ../../${P}-build/SU2_DOT/src/SU2_DOT SU2_PY/SU2_DOT
- ln -s ../../${P}-build/SU2_GEO/src/SU2_GEO SU2_PY/SU2_GEO
- ln -s ../../${P}-build/SU2_MSH/src/SU2_MSH SU2_PY/SU2_MSH
- ln -s ../../${P}-build/SU2_SOL/src/SU2_SOL SU2_PY/SU2_SOL
-
- export SU2_RUN="${S}/SU2_PY"
- export SU2_HOME="${S}"
- export PATH=$PATH:$SU2_RUN
- export PYTHONPATH=$PYTHONPATH:$SU2_RUN
-
- einfo "Running UnitTests ..."
- ../${P}-build/UnitTests/test_driver
-
- pushd TestCases/
- use mpi && python parallel_regression.py
- use mpi || python serial_regression.py
- use tutorials && use mpi && python tutorials.py
- popd
-}
-
-src_install() {
- meson_src_install
- mkdir -p "${ED}$(python_get_sitedir)"
- mv "${ED}"/usr/bin/{FSI,SU2,*.py} -t "${ED}$(python_get_sitedir)"
- python_optimize "${D}/$(python_get_sitedir)"
-
- if use tutorials ; then
- insinto "/usr/share/${P}"
- doins -r Tutorials
- fi
-}
diff --git a/sci-physics/SU2/SU2-7.0.7.ebuild b/sci-physics/SU2/SU2-7.0.7.ebuild
deleted file mode 100644
index 1da4b45d3e..0000000000
--- a/sci-physics/SU2/SU2-7.0.7.ebuild
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8} )
-
-inherit meson python-single-r1
-
-DESCRIPTION="SU2: An Open-Source Suite for Multiphysics Simulation and Design"
-HOMEPAGE="https://su2code.github.io/"
-SRC_URI="
- https://github.com/su2code/SU2/archive/v${PV}.tar.gz -> ${P}.tar.gz
- test? ( https://github.com/su2code/TestCases/archive/v${PV}.tar.gz -> ${P}-TestCases.tar.gz )
- tutorials? ( https://github.com/su2code/Tutorials/archive/v${PV}.tar.gz -> ${P}-Tutorials.tar.gz )
-"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64"
-
-# cgns, metis, parmetis are bundled;
-# omp is disable as it's experimental;
-# pastix is disabled as it's try to find bundled libs;
-IUSE="cgns -mkl +mpi openblas tecio test tutorials"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
- mkl? ( !openblas )
-"
-
-RDEPEND="
- ${PYTHON_DEPS}
- mpi? ( virtual/mpi[cxx] )
- mkl? ( sci-libs/mkl )
- openblas? ( sci-libs/openblas )
-"
-DEPEND="
- ${RDEPEND}
- tecio? ( dev-libs/boost:= )
-"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
- "${FILESDIR}/${P}-fix-env.patch"
- "${FILESDIR}/${PN}-7.0.4-unbundle_boost.patch"
- "${FILESDIR}/${P}-fix-python-optimize.patch"
-)
-
-DOCS=( "LICENSE.md" "README.md" "SU2_PY/documentation.txt" )
-
-src_unpack() {
- unpack "${P}.tar.gz"
- if use test ; then
- einfo "Unpacking ${P}-TestCases.tar.gz to /var/tmp/portage/sci-physics/${P}/work/${P}/TestCases"
- tar -C "${P}"/TestCases --strip-components=1 -xzf "${DISTDIR}/${P}-TestCases.tar.gz" || die
- fi
- if use tutorials ; then
- einfo "Unpacking ${P}-Tutorials.tar.gz to /var/tmp/portage/sci-physics/${P}/work/${P}"
- mkdir "${P}"/Tutorials
- tar -C "${P}"/Tutorials --strip-components=1 -xzf "${DISTDIR}/${P}-Tutorials.tar.gz" || die
- fi
-}
-
-src_configure() {
- local emesonargs=(
- -Denable-autodiff=false
- -Denable-directdiff=false
- -Denable-pastix=false
- -Denable-pywrapper=false
- -Dwith-omp=false
- $(meson_feature mpi with-mpi)
- $(meson_use cgns enable-cgns)
- $(meson_use mkl enable-mkl)
- $(meson_use openblas enable-openblas)
- $(meson_use tecio enable-tecio)
- $(meson_use test enable-tests)
- )
- meson_src_configure
-}
-
-src_test() {
- ln -s ../../${P}-build/SU2_CFD/src/SU2_CFD SU2_PY/SU2_CFD
- ln -s ../../${P}-build/SU2_DEF/src/SU2_DEF SU2_PY/SU2_DEF
- ln -s ../../${P}-build/SU2_DOT/src/SU2_DOT SU2_PY/SU2_DOT
- ln -s ../../${P}-build/SU2_GEO/src/SU2_GEO SU2_PY/SU2_GEO
- ln -s ../../${P}-build/SU2_SOL/src/SU2_SOL SU2_PY/SU2_SOL
-
- export SU2_RUN="${S}/SU2_PY"
- export SU2_HOME="${S}"
- export PATH=$PATH:$SU2_RUN
- export PYTHONPATH=$PYTHONPATH:$SU2_RUN
-
- einfo "Running UnitTests ..."
- ../${P}-build/UnitTests/test_driver
-
- pushd TestCases/
- use mpi && python parallel_regression.py
- use mpi || python serial_regression.py
- use tutorials && use mpi && python tutorials.py
- popd
-}
-
-src_install() {
- meson_src_install
- mkdir -p "${ED}$(python_get_sitedir)"
- mv "${ED}"/usr/bin/{FSI,SU2,*.py} -t "${ED}$(python_get_sitedir)"
- python_optimize "${D}/$(python_get_sitedir)"
-
- if use tutorials ; then
- insinto "/usr/share/${P}"
- doins -r Tutorials
- fi
-}
diff --git a/sci-physics/SU2/SU2-7.0.8.ebuild b/sci-physics/SU2/SU2-7.0.8-r1.ebuild
similarity index 90%
rename from sci-physics/SU2/SU2-7.0.8.ebuild
rename to sci-physics/SU2/SU2-7.0.8-r1.ebuild
index 30feedd457..f7e5b83f19 100644
--- a/sci-physics/SU2/SU2-7.0.8.ebuild
+++ b/sci-physics/SU2/SU2-7.0.8-r1.ebuild
@@ -11,6 +11,7 @@ DESCRIPTION="SU2: An Open-Source Suite for Multiphysics Simulation and Design"
HOMEPAGE="https://su2code.github.io/"
SRC_URI="
https://github.com/su2code/SU2/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/band-a-prend/gentoo-overlay/raw/master/sci-physics/${PN}/files/${P}-fix-python-optimize.patch
test? ( https://github.com/su2code/TestCases/archive/v7.0.7.tar.gz -> ${PN}-7.0.7-TestCases.tar.gz )
tutorials? ( https://github.com/su2code/Tutorials/archive/v7.0.7.tar.gz -> ${PN}-7.0.7-Tutorials.tar.gz )
"
@@ -42,12 +43,12 @@ DEPEND="
BDEPEND="virtual/pkgconfig"
PATCHES=(
- "${FILESDIR}/${P}-fix-env.patch"
"${FILESDIR}/${PN}-7.0.4-unbundle_boost.patch"
- "${FILESDIR}/${P}-fix-python-optimize.patch"
+ "${FILESDIR}/${P}-fix-env.patch"
+ "${DISTDIR}/${P}-fix-python-optimize.patch"
)
-DOCS=( "LICENSE.md" "README.md" "SU2_PY/documentation.txt" )
+DOCS=( "README.md" "SU2_PY/documentation.txt" )
src_unpack() {
unpack "${P}.tar.gz"
@@ -57,7 +58,7 @@ src_unpack() {
fi
if use tutorials ; then
einfo "Unpacking ${PN}-7.0.7-Tutorials.tar.gz to /var/tmp/portage/sci-physics/${P}/work/${P}"
- mkdir "${P}"/Tutorials
+ mkdir "${P}"/Tutorials || die
tar -C "${P}"/Tutorials --strip-components=1 -xzf "${DISTDIR}/${PN}-7.0.7-Tutorials.tar.gz" || die
fi
}
@@ -103,8 +104,8 @@ src_test() {
src_install() {
meson_src_install
- mkdir -p "${ED}$(python_get_sitedir)"
- mv "${ED}"/usr/bin/{FSI,SU2,*.py} -t "${ED}$(python_get_sitedir)"
+ mkdir -p "${ED}$(python_get_sitedir)" || die
+ mv "${ED}"/usr/bin/{FSI,SU2,*.py} -t "${ED}$(python_get_sitedir)" || die
python_optimize "${D}/$(python_get_sitedir)"
if use tutorials ; then
diff --git a/sci-physics/SU2/files/SU2-7.0.4-fix-python-optimize.patch b/sci-physics/SU2/files/SU2-7.0.4-fix-python-optimize.patch
deleted file mode 100644
index 6ad7387e57..0000000000
--- a/sci-physics/SU2/files/SU2-7.0.4-fix-python-optimize.patch
+++ /dev/null
@@ -1,2302 +0,0 @@
-diff -Naur old/SU2_PY/FSI/FSIInterface.py new/SU2_PY/FSI/FSIInterface.py
---- old/SU2_PY/FSI/FSIInterface.py 2020-05-01 19:09:18.000000000 +0300
-+++ new/SU2_PY/FSI/FSIInterface.py 2020-05-10 16:17:07.000000000 +0300
-@@ -6,8 +6,8 @@
- # \version 7.0.4 "Blackbird"
- #
- # SU2 Project Website: https://su2code.github.io
--#
--# The SU2 Project is maintained by the SU2 Foundation
-+#
-+# The SU2 Project is maintained by the SU2 Foundation
- # (http://su2foundation.org)
- #
- # Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md)
-@@ -16,7 +16,7 @@
- # modify it under the terms of the GNU Lesser General Public
- # License as published by the Free Software Foundation; either
- # version 2.1 of the License, or (at your option) any later version.
--#
-+#
- # SU2 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
-@@ -42,19 +42,19 @@
- # ----------------------------------------------------------------------
-
- class Interface:
-- """
-+ """
- FSI interface class that handles fluid/solid solvers synchronisation and communication
- """
--
-+
- def __init__(self, FSI_config, FluidSolver, SolidSolver, have_MPI):
-- """
-- Class constructor. Declare some variables and do some screen outputs.
-- """
--
-+ """
-+ Class constructor. Declare some variables and do some screen outputs.
-+ """
-+
- if have_MPI == True:
- from mpi4py import MPI
- self.MPI = MPI
-- self.comm = MPI.COMM_WORLD #MPI World communicator
-+ self.comm = MPI.COMM_WORLD #MPI World communicator
- self.have_MPI = True
- myid = self.comm.Get_rank()
- else:
-@@ -62,42 +62,42 @@
- self.have_MPI = False
- myid = 0
-
-- self.rootProcess = 0 #the root process is chosen to be MPI rank = 0
-+ self.rootProcess = 0 #the root process is chosen to be MPI rank = 0
-
-- self.nDim = FSI_config['NDIM'] #problem dimension
-+ self.nDim = FSI_config['NDIM'] #problem dimension
-
-- self.haveFluidSolver = False #True if the fluid solver is initialized on the current rank
-- self.haveSolidSolver = False #True if the solid solver is initialized on the current rank
-- self.haveFluidInterface = False #True if the current rank owns at least one fluid interface node
-- self.haveSolidInterface = False #True if the current rank owns at least one solid interface node
-+ self.haveFluidSolver = False #True if the fluid solver is initialized on the current rank
-+ self.haveSolidSolver = False #True if the solid solver is initialized on the current rank
-+ self.haveFluidInterface = False #True if the current rank owns at least one fluid interface node
-+ self.haveSolidInterface = False #True if the current rank owns at least one solid interface node
-
-- self.fluidSolverProcessors = list() #list of partitions where the fluid solver is initialized
-- self.solidSolverProcessors = list() #list of partitions where the solid solver is initialized
-+ self.fluidSolverProcessors = list() #list of partitions where the fluid solver is initialized
-+ self.solidSolverProcessors = list() #list of partitions where the solid solver is initialized
- self.fluidInterfaceProcessors = list() #list of partitions where there are fluid interface nodes
-- self.solidInterfaceProcessors = list() #list of partitions where there are solid interface nodes
-+ self.solidInterfaceProcessors = list() #list of partitions where there are solid interface nodes
-
-- self.fluidInterfaceIdentifier = None #object that can identify the f/s interface within the fluid solver
-- self.solidInterfaceIdentifier = None #object that can identify the f/s interface within the solid solver
-+ self.fluidInterfaceIdentifier = None #object that can identify the f/s interface within the fluid solver
-+ self.solidInterfaceIdentifier = None #object that can identify the f/s interface within the solid solver
-
-- self.fluidGlobalIndexRange = {} #contains the global FSI indexing of each fluid interface node for all partitions
-- self.solidGlobalIndexRange = {} #contains the global FSI indexing of each solid interface node for all partitions
-+ self.fluidGlobalIndexRange = {} #contains the global FSI indexing of each fluid interface node for all partitions
-+ self.solidGlobalIndexRange = {} #contains the global FSI indexing of each solid interface node for all partitions
-
-- self.FluidHaloNodeList = {} #contains the the indices (fluid solver indexing) of the halo nodes for each partition
-- self.fluidIndexing = {} #links between the fluid solver indexing and the FSI indexing for the interface nodes
-- self.SolidHaloNodeList = {} #contains the the indices (solid solver indexing) of the halo nodes for each partition
-- self.solidIndexing = {} #links between the solid solver indexing and the FSI indexing for the interface nodes
--
-- self.nLocalFluidInterfaceNodes = 0 #number of nodes (halo nodes included) on the fluid interface, on each partition
-- self.nLocalFluidInterfaceHaloNode = 0 #number of halo nodes on the fluid intrface, on each partition
-- self.nLocalFluidInterfacePhysicalNodes = 0 #number of physical (= non halo) nodes on the fluid interface, on each partition
-- self.nFluidInterfaceNodes = 0 #number of nodes on the fluid interface, sum over all the partitions
-- self.nFluidInterfacePhysicalNodes = 0 #number of physical nodes on the fluid interface, sum over all partitions
--
-- self.nLocalSolidInterfaceNodes = 0 #number of physical nodes on the solid interface, on each partition
-- self.nLocalSolidInterfaceHaloNode = 0 #number of halo nodes on the solid intrface, on each partition
-- self.nLocalSolidInterfacePhysicalNodes = 0 #number of physical (= non halo) nodes on the solid interface, on each partition
-- self.nSolidInterfaceNodes = 0 #number of nodes on the solid interface, sum over all partitions
-- self.nSolidInterfacePhysicalNodes = 0 #number of physical nodes on the solid interface, sum over all partitions
-+ self.FluidHaloNodeList = {} #contains the the indices (fluid solver indexing) of the halo nodes for each partition
-+ self.fluidIndexing = {} #links between the fluid solver indexing and the FSI indexing for the interface nodes
-+ self.SolidHaloNodeList = {} #contains the the indices (solid solver indexing) of the halo nodes for each partition
-+ self.solidIndexing = {} #links between the solid solver indexing and the FSI indexing for the interface nodes
-+
-+ self.nLocalFluidInterfaceNodes = 0 #number of nodes (halo nodes included) on the fluid interface, on each partition
-+ self.nLocalFluidInterfaceHaloNode = 0 #number of halo nodes on the fluid intrface, on each partition
-+ self.nLocalFluidInterfacePhysicalNodes = 0 #number of physical (= non halo) nodes on the fluid interface, on each partition
-+ self.nFluidInterfaceNodes = 0 #number of nodes on the fluid interface, sum over all the partitions
-+ self.nFluidInterfacePhysicalNodes = 0 #number of physical nodes on the fluid interface, sum over all partitions
-+
-+ self.nLocalSolidInterfaceNodes = 0 #number of physical nodes on the solid interface, on each partition
-+ self.nLocalSolidInterfaceHaloNode = 0 #number of halo nodes on the solid intrface, on each partition
-+ self.nLocalSolidInterfacePhysicalNodes = 0 #number of physical (= non halo) nodes on the solid interface, on each partition
-+ self.nSolidInterfaceNodes = 0 #number of nodes on the solid interface, sum over all partitions
-+ self.nSolidInterfacePhysicalNodes = 0 #number of physical nodes on the solid interface, sum over all partitions
-
- if FSI_config['MATCHING_MESH'] == 'NO' and (FSI_config['MESH_INTERP_METHOD'] == 'RBF' or FSI_config['MESH_INTERP_METHOD'] == 'TPS'):
- self.MappingMatrixA = None
-@@ -106,83 +106,83 @@
- self.MappingMatrixB_T = None
- self.d_RBF = self.nDim+1
- else:
-- self.MappingMatrix = None #interpolation/mapping matrix for meshes interpolation/mapping
-- self.MappingMatrix_T = None #transposed interpolation/mapping matrix for meshes interpolation/mapping
-+ self.MappingMatrix = None #interpolation/mapping matrix for meshes interpolation/mapping
-+ self.MappingMatrix_T = None #transposed interpolation/mapping matrix for meshes interpolation/mapping
- self.d_RBF = 0
-
-- self.localFluidInterface_array_X_init = None #initial fluid interface position on each partition (used for the meshes mapping)
-+ self.localFluidInterface_array_X_init = None #initial fluid interface position on each partition (used for the meshes mapping)
- self.localFluidInterface_array_Y_init = None
- self.localFluidInterface_array_Z_init = None
-
-- self.haloNodesPositionsInit = {} #initial position of the halo nodes (fluid side only)
-+ self.haloNodesPositionsInit = {} #initial position of the halo nodes (fluid side only)
-
-- self.solidInterface_array_DispX = None #solid interface displacement
-+ self.solidInterface_array_DispX = None #solid interface displacement
- self.solidInterface_array_DispY = None
- self.solidInterface_array_DispZ = None
-
-- self.solidInterfaceResidual_array_X = None #solid interface position residual
-+ self.solidInterfaceResidual_array_X = None #solid interface position residual
- self.solidInterfaceResidual_array_Y = None
- self.solidInterfaceResidual_array_Z = None
-
-- self.solidInterfaceResidualnM1_array_X = None #solid interface position residual at the previous BGS iteration
-+ self.solidInterfaceResidualnM1_array_X = None #solid interface position residual at the previous BGS iteration
- self.solidInterfaceResidualnM1_array_Y = None
- self.solidInterfaceResidualnM1_array_Z = None
--
-- self.fluidInterface_array_DispX = None #fluid interface displacement
-+
-+ self.fluidInterface_array_DispX = None #fluid interface displacement
- self.fluidInterface_array_DispY = None
- self.fluidInterface_array_DispZ = None
-
-- self.fluidLoads_array_X = None #loads on the fluid side of the f/s interface
-+ self.fluidLoads_array_X = None #loads on the fluid side of the f/s interface
- self.fluidLoads_array_Y = None
- self.fluidLoads_array_Z = None
-
-- self.solidLoads_array_X = None #loads on the solid side of the f/s interface
-+ self.solidLoads_array_X = None #loads on the solid side of the f/s interface
- self.solidLoads_array_Y = None
- self.solidLoads_array_Z = None
-
-- self.aitkenParam = FSI_config['AITKEN_PARAM'] #relaxation parameter for the BGS method
-- self.FSIIter = 0 #current FSI iteration
-- self.unsteady = False #flag for steady or unsteady simulation (default is steady)
--
-- # ---Some screen output ---
-- self.MPIPrint('Fluid solver : SU2_CFD')
-- self.MPIPrint('Solid solver : {}'.format(FSI_config['CSD_SOLVER']))
-+ self.aitkenParam = FSI_config['AITKEN_PARAM'] #relaxation parameter for the BGS method
-+ self.FSIIter = 0 #current FSI iteration
-+ self.unsteady = False #flag for steady or unsteady simulation (default is steady)
-+
-+ # ---Some screen output ---
-+ self.MPIPrint('Fluid solver : SU2_CFD')
-+ self.MPIPrint('Solid solver : {}'.format(FSI_config['CSD_SOLVER']))
-
-- if FSI_config['TIME_MARCHING'] == 'YES':
-+ if FSI_config['TIME_MARCHING'] == 'YES':
- self.MPIPrint('Unsteady coupled simulation with physical time step : {} s'.format(FSI_config['UNST_TIMESTEP']))
- self.unsteady = True
-- else:
-- self.MPIPrint('Steady coupled simulation')
-+ else:
-+ self.MPIPrint('Steady coupled simulation')
-
-- if FSI_config['MATCHING_MESH'] == 'YES':
-- self.MPIPrint('Matching fluid-solid interface')
-- else:
-+ if FSI_config['MATCHING_MESH'] == 'YES':
-+ self.MPIPrint('Matching fluid-solid interface')
-+ else:
- if FSI_config['MESH_INTERP_METHOD'] == 'TPS':
-- self.MPIPrint('Non matching fluid-solid interface with Thin Plate Spline interpolation')
-+ self.MPIPrint('Non matching fluid-solid interface with Thin Plate Spline interpolation')
- elif FSI_config['MESH_INTERP_METHOD'] == 'RBF':
- self.MPIPrint('Non matching fluid-solid interface with Radial Basis Function interpolation')
- self.RBF_rad = FSI_config['RBF_RADIUS']
-- self.MPIPrint('Radius value : {}'.format(self.RBF_rad))
-+ self.MPIPrint('Radius value : {}'.format(self.RBF_rad))
- else:
-- self.MPIPrint('Non matching fluid-solid interface with Nearest Neighboor interpolation')
-+ self.MPIPrint('Non matching fluid-solid interface with Nearest Neighboor interpolation')
-
-- self.MPIPrint('Solid predictor : {}'.format(FSI_config['DISP_PRED']))
-+ self.MPIPrint('Solid predictor : {}'.format(FSI_config['DISP_PRED']))
-
-- self.MPIPrint('Maximum number of FSI iterations : {}'.format(FSI_config['NB_FSI_ITER']))
-+ self.MPIPrint('Maximum number of FSI iterations : {}'.format(FSI_config['NB_FSI_ITER']))
-
-- self.MPIPrint('FSI tolerance : {}'.format(FSI_config['FSI_TOLERANCE']))
-+ self.MPIPrint('FSI tolerance : {}'.format(FSI_config['FSI_TOLERANCE']))
-
-- if FSI_config['AITKEN_RELAX'] == 'STATIC':
-- self.MPIPrint('Static Aitken under-relaxation with constant parameter {}'.format(FSI_config['AITKEN_PARAM']))
-- elif FSI_config['AITKEN_RELAX'] == 'DYNAMIC':
-- self.MPIPrint('Dynamic Aitken under-relaxation with initial parameter {}'.format(FSI_config['AITKEN_PARAM']))
-- else:
-- self.MPIPrint('No Aitken under-relaxation')
-+ if FSI_config['AITKEN_RELAX'] == 'STATIC':
-+ self.MPIPrint('Static Aitken under-relaxation with constant parameter {}'.format(FSI_config['AITKEN_PARAM']))
-+ elif FSI_config['AITKEN_RELAX'] == 'DYNAMIC':
-+ self.MPIPrint('Dynamic Aitken under-relaxation with initial parameter {}'.format(FSI_config['AITKEN_PARAM']))
-+ else:
-+ self.MPIPrint('No Aitken under-relaxation')
-
- self.MPIPrint('FSI interface is set')
-
- def MPIPrint(self, message):
-- """
-+ """
- Print a message on screen only from the master process.
- """
-
-@@ -198,28 +198,28 @@
- """
- Perform a synchronization barrier in case of parallel run with MPI.
- """
--
-+
- if self.have_MPI == True:
- self.comm.barrier()
-
- def connect(self, FSI_config, FluidSolver, SolidSolver):
-- """
-- Connection between solvers.
-- Creates the communication support between the two solvers.
-- Gets information about f/s interfaces from the two solvers.
-- """
-+ """
-+ Connection between solvers.
-+ Creates the communication support between the two solvers.
-+ Gets information about f/s interfaces from the two solvers.
-+ """
- if self.have_MPI == True:
- myid = self.comm.Get_rank()
-- MPIsize = self.comm.Get_size()
-+ MPIsize = self.comm.Get_size()
- else:
- myid = 0
- MPIsize = 1
--
-- # --- Identify the fluid and solid interfaces and store the number of nodes on both sides (and for each partition) ---
-+
-+ # --- Identify the fluid and solid interfaces and store the number of nodes on both sides (and for each partition) ---
- self.fluidInterfaceIdentifier = None
- self.nLocalFluidInterfaceNodes = 0
- if FluidSolver != None:
-- print('Fluid solver is initialized on process {}'.format(myid))
-+ print('Fluid solver is initialized on process {}'.format(myid))
- self.haveFluidSolver = True
- allMovingMarkersTags = FluidSolver.GetAllMovingMarkersTag()
- allMarkersID = FluidSolver.GetAllBoundaryMarkers()
-@@ -229,23 +229,23 @@
- if allMovingMarkersTags[0] in allMarkersID.keys():
- self.fluidInterfaceIdentifier = allMarkersID[allMovingMarkersTags[0]]
- if self.fluidInterfaceIdentifier != None:
-- self.nLocalFluidInterfaceNodes = FluidSolver.GetNumberVertices(self.fluidInterfaceIdentifier)
-- if self.nLocalFluidInterfaceNodes != 0:
-+ self.nLocalFluidInterfaceNodes = FluidSolver.GetNumberVertices(self.fluidInterfaceIdentifier)
-+ if self.nLocalFluidInterfaceNodes != 0:
- self.haveFluidInterface = True
-- print('Number of interface fluid nodes (halo nodes included) on proccess {} : {}'.format(myid,self.nLocalFluidInterfaceNodes))
-- else:
-- pass
-+ print('Number of interface fluid nodes (halo nodes included) on proccess {} : {}'.format(myid,self.nLocalFluidInterfaceNodes))
-+ else:
-+ pass
-
-- if SolidSolver != None:
-- print('Solid solver is initialized on process {}'.format(myid))
-+ if SolidSolver != None:
-+ print('Solid solver is initialized on process {}'.format(myid))
- self.haveSolidSolver = True
-- self.solidInterfaceIdentifier = SolidSolver.getFSIMarkerID()
-- self.nLocalSolidInterfaceNodes = SolidSolver.getNumberOfSolidInterfaceNodes(self.solidInterfaceIdentifier)
-- if self.nLocalSolidInterfaceNodes != 0:
-+ self.solidInterfaceIdentifier = SolidSolver.getFSIMarkerID()
-+ self.nLocalSolidInterfaceNodes = SolidSolver.getNumberOfSolidInterfaceNodes(self.solidInterfaceIdentifier)
-+ if self.nLocalSolidInterfaceNodes != 0:
- self.haveSolidInterface = True
- print('Number of interface solid nodes (halo nodes included) on proccess {} : {}'.format(myid,self.nLocalSolidInterfaceNodes))
-- else:
-- pass
-+ else:
-+ pass
-
- # --- Exchange information about processors on which the solvers are defined and where the interface nodes are lying ---
- if self.have_MPI == True:
-@@ -266,18 +266,18 @@
- else:
- sendBufSolidInterface = np.array(int(0))
- rcvBufFluid = np.zeros(MPIsize, dtype = int)
-- rcvBufSolid = np.zeros(MPIsize, dtype = int)
-+ rcvBufSolid = np.zeros(MPIsize, dtype = int)
- rcvBufFluidInterface = np.zeros(MPIsize, dtype = int)
-- rcvBufSolidInterface = np.zeros(MPIsize, dtype = int)
-+ rcvBufSolidInterface = np.zeros(MPIsize, dtype = int)
- self.comm.Allgather(sendBufFluid, rcvBufFluid)
- self.comm.Allgather(sendBufSolid, rcvBufSolid)
- self.comm.Allgather(sendBufFluidInterface, rcvBufFluidInterface)
- self.comm.Allgather(sendBufSolidInterface, rcvBufSolidInterface)
- for iProc in range(MPIsize):
-- if rcvBufFluid[iProc] == 1:
-+ if rcvBufFluid[iProc] == 1:
- self.fluidSolverProcessors.append(iProc)
- if rcvBufSolid[iProc] == 1:
-- self.solidSolverProcessors.append(iProc)
-+ self.solidSolverProcessors.append(iProc)
- if rcvBufFluidInterface[iProc] == 1:
- self.fluidInterfaceProcessors.append(iProc)
- if rcvBufSolidInterface[iProc] == 1:
-@@ -285,19 +285,19 @@
- del sendBufFluid, sendBufSolid, rcvBufFluid, rcvBufSolid, sendBufFluidInterface, sendBufSolidInterface, rcvBufFluidInterface, rcvBufSolidInterface
- else:
- self.fluidSolverProcessors.append(0)
-- self.solidSolverProcessors.append(0)
-+ self.solidSolverProcessors.append(0)
- self.fluidInterfaceProcessors.append(0)
- self.solidInterfaceProcessors.append(0)
-
-- self.MPIBarrier()
--
-- # --- Calculate the total number of nodes at the fluid interface (sum over all the partitions) ---
-+ self.MPIBarrier()
-+
-+ # --- Calculate the total number of nodes at the fluid interface (sum over all the partitions) ---
- # Calculate the number of halo nodes on each partition
- self.nLocalFluidInterfaceHaloNode = 0
-- for iVertex in range(self.nLocalFluidInterfaceNodes):
-+ for iVertex in range(self.nLocalFluidInterfaceNodes):
- if FluidSolver.IsAHaloNode(self.fluidInterfaceIdentifier, iVertex) == True:
- GlobalIndex = FluidSolver.GetVertexGlobalIndex(self.fluidInterfaceIdentifier, iVertex)
-- self.FluidHaloNodeList[GlobalIndex] = iVertex
-+ self.FluidHaloNodeList[GlobalIndex] = iVertex
- self.nLocalFluidInterfaceHaloNode += 1
- # Calculate the number of physical (= not halo) nodes on each partition
- self.nLocalFluidInterfacePhysicalNodes = self.nLocalFluidInterfaceNodes - self.nLocalFluidInterfaceHaloNode
-@@ -308,10 +308,10 @@
-
- # Same thing for the solid part
- self.nLocalSolidInterfaceHaloNode = 0
-- #for iVertex in range(self.nLocalSolidInterfaceNodes):
-+ #for iVertex in range(self.nLocalSolidInterfaceNodes):
- #if SoliddSolver.IsAHaloNode(self.fluidInterfaceIdentifier, iVertex) == True:
- #GlobalIndex = SolidSolver.GetVertexGlobalIndex(self.solidInterfaceIdentifier, iVertex)
-- #self.SolidHaloNodeList[GlobalIndex] = iVertex
-+ #self.SolidHaloNodeList[GlobalIndex] = iVertex
- #self.nLocalSolidInterfaceHaloNode += 1
- self.nLocalSolidInterfacePhysicalNodes = self.nLocalSolidInterfaceNodes - self.nLocalSolidInterfaceHaloNode
- if self.have_MPI == True:
-@@ -323,11 +323,11 @@
- # --- Calculate the total number of nodes (with and without halo) at the fluid interface (sum over all the partitions) and broadcast the number accross all processors ---
- sendBuffHalo = np.array(int(self.nLocalFluidInterfaceNodes))
- sendBuffPhysical = np.array(int(self.nLocalFluidInterfacePhysicalNodes))
-- rcvBuffHalo = np.zeros(1, dtype=int)
-+ rcvBuffHalo = np.zeros(1, dtype=int)
- rcvBuffPhysical = np.zeros(1, dtype=int)
-- if self.have_MPI == True:
-+ if self.have_MPI == True:
- self.comm.barrier()
-- self.comm.Allreduce(sendBuffHalo,rcvBuffHalo,op=self.MPI.SUM)
-+ self.comm.Allreduce(sendBuffHalo,rcvBuffHalo,op=self.MPI.SUM)
- self.comm.Allreduce(sendBuffPhysical,rcvBuffPhysical,op=self.MPI.SUM)
- self.nFluidInterfaceNodes = rcvBuffHalo[0]
- self.nFluidInterfacePhysicalNodes = rcvBuffPhysical[0]
-@@ -339,11 +339,11 @@
- # Same thing for the solid part
- sendBuffHalo = np.array(int(self.nLocalSolidInterfaceNodes))
- sendBuffPhysical = np.array(int(self.nLocalSolidInterfacePhysicalNodes))
-- rcvBuffHalo = np.zeros(1, dtype=int)
-+ rcvBuffHalo = np.zeros(1, dtype=int)
- rcvBuffPhysical = np.zeros(1, dtype=int)
- if self.have_MPI == True:
-- self.comm.barrier()
-- self.comm.Allreduce(sendBuffHalo,rcvBuffHalo,op=self.MPI.SUM)
-+ self.comm.barrier()
-+ self.comm.Allreduce(sendBuffHalo,rcvBuffHalo,op=self.MPI.SUM)
- self.comm.Allreduce(sendBuffPhysical,rcvBuffPhysical,op=self.MPI.SUM)
- self.nSolidInterfaceNodes = rcvBuffHalo[0]
- self.nSolidInterfacePhysicalNodes = rcvBuffPhysical[0]
-@@ -375,7 +375,7 @@
- if myid in self.fluidInterfaceProcessors:
- globalIndexStart = 0
- for iProc in range(myid):
-- globalIndexStart += self.fluidPhysicalInterfaceNodesDistribution[iProc]
-+ globalIndexStart += self.fluidPhysicalInterfaceNodesDistribution[iProc]
- globalIndexStop = globalIndexStart + self.nLocalFluidInterfacePhysicalNodes-1
- else:
- globalIndexStart = 0
-@@ -387,8 +387,8 @@
- temp[0] = [0,self.nLocalFluidInterfacePhysicalNodes-1]
- self.fluidGlobalIndexRange = list()
- self.fluidGlobalIndexRange.append(temp)
--
-- # Same thing for the solid part
-+
-+ # Same thing for the solid part
- if self.have_MPI == True:
- if myid in self.solidInterfaceProcessors:
- globalIndexStart = 0
-@@ -404,14 +404,14 @@
- temp = {}
- temp[0] = [0,self.nSolidInterfacePhysicalNodes-1]
- self.solidGlobalIndexRange = list()
-- self.solidGlobalIndexRange.append(temp)
-+ self.solidGlobalIndexRange.append(temp)
-
-- self.MPIPrint('Total number of fluid interface nodes (halo nodes included) : {}'.format(self.nFluidInterfaceNodes))
-- self.MPIPrint('Total number of solid interface nodes (halo nodes included) : {}'.format(self.nSolidInterfaceNodes))
-+ self.MPIPrint('Total number of fluid interface nodes (halo nodes included) : {}'.format(self.nFluidInterfaceNodes))
-+ self.MPIPrint('Total number of solid interface nodes (halo nodes included) : {}'.format(self.nSolidInterfaceNodes))
- self.MPIPrint('Total number of fluid interface nodes : {}'.format(self.nFluidInterfacePhysicalNodes))
- self.MPIPrint('Total number of solid interface nodes : {}'.format(self.nSolidInterfacePhysicalNodes))
-
-- self.MPIBarrier()
-+ self.MPIBarrier()
-
- # --- Create all the PETSc vectors required for parallel communication and parallel mesh mapping/interpolation (working for serial too) ---
- if self.have_MPI == True:
-@@ -432,8 +432,8 @@
- self.solidInterface_array_DispY.setSizes(self.nSolidInterfacePhysicalNodes+self.d_RBF)
- self.solidInterface_array_DispZ.setSizes(self.nSolidInterfacePhysicalNodes+self.d_RBF)
- self.solidInterface_array_DispX.set(0.0)
-- self.solidInterface_array_DispY.set(0.0)
-- self.solidInterface_array_DispZ.set(0.0)
-+ self.solidInterface_array_DispY.set(0.0)
-+ self.solidInterface_array_DispZ.set(0.0)
-
- if self.have_MPI == True:
- self.fluidInterface_array_DispX = PETSc.Vec().create(self.comm)
-@@ -536,30 +536,30 @@
- self.solidInterfaceResidualnM1_array_Z.set(0.0)
-
- def interfaceMapping(self,FluidSolver, SolidSolver, FSI_config):
-- """
-- Creates the one-to-one mapping between interfaces in case of matching meshes.
-- Creates the interpolation rules between interfaces in case of non-matching meshes.
-- """
-- if self.have_MPI == True:
-+ """
-+ Creates the one-to-one mapping between interfaces in case of matching meshes.
-+ Creates the interpolation rules between interfaces in case of non-matching meshes.
-+ """
-+ if self.have_MPI == True:
- myid = self.comm.Get_rank()
-- MPIsize = self.comm.Get_size()
-+ MPIsize = self.comm.Get_size()
- else:
- myid = 0
- MPIsize = 1
-
-- # --- Get the fluid interface from fluid solver on each partition ---
-- GlobalIndex = int()
-+ # --- Get the fluid interface from fluid solver on each partition ---
-+ GlobalIndex = int()
- localIndex = 0
- fluidIndexing_temp = {}
- self.localFluidInterface_array_X_init = np.zeros((self.nLocalFluidInterfacePhysicalNodes))
- self.localFluidInterface_array_Y_init = np.zeros((self.nLocalFluidInterfacePhysicalNodes))
- self.localFluidInterface_array_Z_init = np.zeros((self.nLocalFluidInterfacePhysicalNodes))
- for iVertex in range(self.nLocalFluidInterfaceNodes):
-- GlobalIndex = FluidSolver.GetVertexGlobalIndex(self.fluidInterfaceIdentifier, iVertex)
-- posx = FluidSolver.GetVertexCoordX(self.fluidInterfaceIdentifier, iVertex)
-- posy = FluidSolver.GetVertexCoordY(self.fluidInterfaceIdentifier, iVertex)
-- posz = FluidSolver.GetVertexCoordZ(self.fluidInterfaceIdentifier, iVertex)
-- if GlobalIndex in self.FluidHaloNodeList[myid].keys():
-+ GlobalIndex = FluidSolver.GetVertexGlobalIndex(self.fluidInterfaceIdentifier, iVertex)
-+ posx = FluidSolver.GetVertexCoordX(self.fluidInterfaceIdentifier, iVertex)
-+ posy = FluidSolver.GetVertexCoordY(self.fluidInterfaceIdentifier, iVertex)
-+ posz = FluidSolver.GetVertexCoordZ(self.fluidInterfaceIdentifier, iVertex)
-+ if GlobalIndex in self.FluidHaloNodeList[myid].keys():
- self.haloNodesPositionsInit[GlobalIndex] = (posx, posy, posz)
- else:
- fluidIndexing_temp[GlobalIndex] = self.__getGlobalIndex('fluid', myid, localIndex)
-@@ -576,17 +576,17 @@
- self.fluidIndexing = fluidIndexing_temp.copy()
- del fluidIndexing_temp
-
-- # --- Get the solid interface from solid solver on each partition ---
-+ # --- Get the solid interface from solid solver on each partition ---
- localIndex = 0
- solidIndexing_temp = {}
-- self.localSolidInterface_array_X = np.zeros(self.nLocalSolidInterfaceNodes)
-+ self.localSolidInterface_array_X = np.zeros(self.nLocalSolidInterfaceNodes)
- self.localSolidInterface_array_Y = np.zeros(self.nLocalSolidInterfaceNodes)
- self.localSolidInterface_array_Z = np.zeros(self.nLocalSolidInterfaceNodes)
- for iVertex in range(self.nLocalSolidInterfaceNodes):
- GlobalIndex = SolidSolver.getInterfaceNodeGlobalIndex(self.solidInterfaceIdentifier, iVertex)
-- posx = SolidSolver.getInterfaceNodePosX(self.solidInterfaceIdentifier, iVertex)
-- posy = SolidSolver.getInterfaceNodePosY(self.solidInterfaceIdentifier, iVertex)
-- posz = SolidSolver.getInterfaceNodePosZ(self.solidInterfaceIdentifier, iVertex)
-+ posx = SolidSolver.getInterfaceNodePosX(self.solidInterfaceIdentifier, iVertex)
-+ posy = SolidSolver.getInterfaceNodePosY(self.solidInterfaceIdentifier, iVertex)
-+ posz = SolidSolver.getInterfaceNodePosZ(self.solidInterfaceIdentifier, iVertex)
- if GlobalIndex in self.SolidHaloNodeList[myid].keys():
- pass
- else:
-@@ -605,14 +605,14 @@
- del solidIndexing_temp
-
-
-- # --- Create the PETSc parallel interpolation matrix ---
-+ # --- Create the PETSc parallel interpolation matrix ---
- if FSI_config['MATCHING_MESH'] == 'NO' and (FSI_config['MESH_INTERP_METHOD'] == 'RBF' or FSI_config['MESH_INTERP_METHOD'] == 'TPS'):
- if self.have_MPI == True:
- self.MappingMatrixA = PETSc.Mat().create(self.comm)
- self.MappingMatrixB = PETSc.Mat().create(self.comm)
- self.MappingMatrixA_T = PETSc.Mat().create(self.comm)
- self.MappingMatrixB_T = PETSc.Mat().create(self.comm)
-- if FSI_config['MESH_INTERP_METHOD'] == 'RBF' :
-+ if FSI_config['MESH_INTERP_METHOD'] == 'RBF' :
- self.MappingMatrixA.setType('mpiaij')
- self.MappingMatrixB.setType('mpiaij')
- self.MappingMatrixA_T.setType('mpiaij')
-@@ -627,7 +627,7 @@
- self.MappingMatrixB = PETSc.Mat().create()
- self.MappingMatrixA_T = PETSc.Mat().create()
- self.MappingMatrixB_T = PETSc.Mat().create()
-- if FSI_config['MESH_INTERP_METHOD'] == 'RBF' :
-+ if FSI_config['MESH_INTERP_METHOD'] == 'RBF' :
- self.MappingMatrixA.setType('aij')
- self.MappingMatrixB.setType('aij')
- self.MappingMatrixA_T.setType('aij')
-@@ -637,16 +637,16 @@
- self.MappingMatrixB.setType('aij')
- self.MappingMatrixA_T.setType('aij')
- self.MappingMatrixB_T.setType('aij')
-- self.MappingMatrixA.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nSolidInterfacePhysicalNodes+self.d_RBF))
-+ self.MappingMatrixA.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nSolidInterfacePhysicalNodes+self.d_RBF))
- self.MappingMatrixA.setUp()
- self.MappingMatrixA.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
-- self.MappingMatrixB.setSizes((self.nFluidInterfacePhysicalNodes, self.nSolidInterfacePhysicalNodes+self.d_RBF))
-+ self.MappingMatrixB.setSizes((self.nFluidInterfacePhysicalNodes, self.nSolidInterfacePhysicalNodes+self.d_RBF))
- self.MappingMatrixB.setUp()
- self.MappingMatrixB.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
-- self.MappingMatrixA_T.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nSolidInterfacePhysicalNodes+self.d_RBF))
-+ self.MappingMatrixA_T.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nSolidInterfacePhysicalNodes+self.d_RBF))
- self.MappingMatrixA_T.setUp()
- self.MappingMatrixA_T.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
-- self.MappingMatrixB_T.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nFluidInterfacePhysicalNodes))
-+ self.MappingMatrixB_T.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nFluidInterfacePhysicalNodes))
- self.MappingMatrixB_T.setUp()
- self.MappingMatrixB_T.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
- else:
-@@ -660,21 +660,21 @@
- self.MappingMatrix_T = PETSc.Mat().create()
- self.MappingMatrix.setType('aij')
- self.MappingMatrix_T.setType('aij')
-- self.MappingMatrix.setSizes((self.nFluidInterfacePhysicalNodes, self.nSolidInterfacePhysicalNodes))
-+ self.MappingMatrix.setSizes((self.nFluidInterfacePhysicalNodes, self.nSolidInterfacePhysicalNodes))
- self.MappingMatrix.setUp()
- self.MappingMatrix.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
-- self.MappingMatrix_T.setSizes((self.nSolidInterfacePhysicalNodes, self.nFluidInterfacePhysicalNodes))
-+ self.MappingMatrix_T.setSizes((self.nSolidInterfacePhysicalNodes, self.nFluidInterfacePhysicalNodes))
- self.MappingMatrix_T.setUp()
- self.MappingMatrix_T.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
--
--
-+
-+
- # --- Fill the interpolation matrix in parallel (working in serial too) ---
- if FSI_config['MATCHING_MESH'] == 'NO' and (FSI_config['MESH_INTERP_METHOD'] == 'RBF' or FSI_config['MESH_INTERP_METHOD'] == 'TPS'):
- self.MPIPrint('Building interpolation matrices...')
- if self.have_MPI == True:
- for iProc in self.solidInterfaceProcessors:
- if myid == iProc:
-- for jProc in self.solidInterfaceProcessors:
-+ for jProc in self.solidInterfaceProcessors:
- self.comm.Send(self.localSolidInterface_array_X, dest=jProc, tag=1)
- self.comm.Send(self.localSolidInterface_array_Y, dest=jProc, tag=2)
- self.comm.Send(self.localSolidInterface_array_Z, dest=jProc, tag=3)
-@@ -726,7 +726,7 @@
- self.TPSMeshMapping_B(solidInterfaceBuffRcv_X, solidInterfaceBuffRcv_Y, solidInterfaceBuffRcv_Z, iProc)
- else:
- self.NearestNeighboorMeshMapping(solidInterfaceBuffRcv_X, solidInterfaceBuffRcv_Y, solidInterfaceBuffRcv_Z, iProc)
-- else:
-+ else:
- self.matchingMeshMapping(solidInterfaceBuffRcv_X, solidInterfaceBuffRcv_Y, solidInterfaceBuffRcv_Z, iProc)
- else:
- if FSI_config['MATCHING_MESH'] == 'NO':
-@@ -735,10 +735,10 @@
- elif FSI_config['MESH_INTERP_METHOD'] == 'TPS' :
- self.TPSMeshMapping_B(self.localSolidInterface_array_X, self.localSolidInterface_array_Y, self.localSolidInterface_array_Z, 0)
- else:
-- self.NearestNeighboorMeshMapping(self.localSolidInterface_array_X, self.localSolidInterface_array_Y, self.localSolidInterface_array_Z, 0)
-- else:
-+ self.NearestNeighboorMeshMapping(self.localSolidInterface_array_X, self.localSolidInterface_array_Y, self.localSolidInterface_array_Z, 0)
-+ else:
- self.matchingMeshMapping(self.localSolidInterface_array_X, self.localSolidInterface_array_Y, self.localSolidInterface_array_Z, 0)
--
-+
- if FSI_config['MATCHING_MESH'] == 'NO' and (FSI_config['MESH_INTERP_METHOD'] == 'RBF' or FSI_config['MESH_INTERP_METHOD'] == 'TPS'):
- self.MappingMatrixB.assemblyBegin()
- self.MappingMatrixB.assemblyEnd()
-@@ -751,9 +751,9 @@
- self.MappingMatrix_T.assemblyBegin()
- self.MappingMatrix_T.assemblyEnd()
- self.MPIPrint("Interpolation matrix is built.")
--
-+
- self.MPIBarrier()
--
-+
- del self.localSolidInterface_array_X
- del self.localSolidInterface_array_Y
- del self.localSolidInterface_array_Z
-@@ -768,20 +768,20 @@
- myid = 0
-
- # --- Instantiate the spatial indexing ---
-- prop_index = index.Property()
-- prop_index.dimension = self.nDim
-- SolidSpatialTree = index.Index(properties=prop_index)
--
-+ prop_index = index.Property()
-+ prop_index.dimension = self.nDim
-+ SolidSpatialTree = index.Index(properties=prop_index)
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for jVertex in range(nSolidNodes):
- posX = solidInterfaceBuffRcv_X[jVertex]
- posY = solidInterfaceBuffRcv_Y[jVertex]
- posZ = solidInterfaceBuffRcv_Z[jVertex]
-- if self.nDim == 2 :
-- SolidSpatialTree.add(jVertex, (posX, posY))
-- else :
-- SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-+ if self.nDim == 2 :
-+ SolidSpatialTree.add(jVertex, (posX, posY))
-+ else :
-+ SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-
- if self.nFluidInterfacePhysicalNodes != self.nSolidInterfacePhysicalNodes:
- raise Exception("Fluid and solid interface must have the same number of nodes for matching meshes ! ")
-@@ -822,20 +822,20 @@
- myid = 0
-
- # --- Instantiate the spatial indexing ---
-- prop_index = index.Property()
-- prop_index.dimension = self.nDim
-- SolidSpatialTree = index.Index(properties=prop_index)
--
-+ prop_index = index.Property()
-+ prop_index.dimension = self.nDim
-+ SolidSpatialTree = index.Index(properties=prop_index)
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for jVertex in range(nSolidNodes):
- posX = solidInterfaceBuffRcv_X[jVertex]
- posY = solidInterfaceBuffRcv_Y[jVertex]
- posZ = solidInterfaceBuffRcv_Z[jVertex]
-- if self.nDim == 2 :
-- SolidSpatialTree.add(jVertex, (posX, posY))
-- else :
-- SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-+ if self.nDim == 2 :
-+ SolidSpatialTree.add(jVertex, (posX, posY))
-+ else :
-+ SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-
- # --- For each fluid interface node, find the nearest solid interface node and fill the boolean mapping matrix ---
- for iVertexFluid in range(self.nLocalFluidInterfacePhysicalNodes):
-@@ -863,20 +863,20 @@
- myid = 0
-
- # --- Instantiate the spatial indexing ---
-- prop_index = index.Property()
-- prop_index.dimension = self.nDim
-- SolidSpatialTree = index.Index(properties=prop_index)
--
-+ prop_index = index.Property()
-+ prop_index.dimension = self.nDim
-+ SolidSpatialTree = index.Index(properties=prop_index)
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for jVertex in range(nSolidNodes):
- posX = solidInterfaceBuffRcv_X[jVertex]
- posY = solidInterfaceBuffRcv_Y[jVertex]
- posZ = solidInterfaceBuffRcv_Z[jVertex]
-- if self.nDim == 2 :
-- SolidSpatialTree.add(jVertex, (posX, posY))
-- else :
-- SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-+ if self.nDim == 2 :
-+ SolidSpatialTree.add(jVertex, (posX, posY))
-+ else :
-+ SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-
- for iVertexSolid in range(self.nLocalSolidInterfaceNodes):
- posX = self.localSolidInterface_array_X[iVertexSolid]
-@@ -915,20 +915,20 @@
- myid = 0
-
- # --- Instantiate the spatial indexing ---
-- prop_index = index.Property()
-- prop_index.dimension = self.nDim
-- SolidSpatialTree = index.Index(properties=prop_index)
--
-+ prop_index = index.Property()
-+ prop_index.dimension = self.nDim
-+ SolidSpatialTree = index.Index(properties=prop_index)
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for jVertex in range(nSolidNodes):
- posX = solidInterfaceBuffRcv_X[jVertex]
- posY = solidInterfaceBuffRcv_Y[jVertex]
- posZ = solidInterfaceBuffRcv_Z[jVertex]
-- if self.nDim == 2 :
-- SolidSpatialTree.add(jVertex, (posX, posY))
-- else :
-- SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-+ if self.nDim == 2 :
-+ SolidSpatialTree.add(jVertex, (posX, posY))
-+ else :
-+ SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-
- for iVertexFluid in range(self.nLocalFluidInterfacePhysicalNodes):
- posX = self.localFluidInterface_array_X_init[iVertexFluid]
-@@ -965,7 +965,7 @@
- myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for iVertexSolid in range(self.nLocalSolidInterfaceNodes):
-@@ -999,7 +999,7 @@
- myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for iVertexFluid in range(self.nLocalFluidInterfacePhysicalNodes):
-@@ -1031,7 +1031,7 @@
- """
- phi = 0.0
- eps = distance/rad
--
-+
- if eps < 1:
- phi = ((1.0-eps)**4)*(4.0*eps+1.0)
- else:
-@@ -1044,20 +1044,20 @@
- Description
- """
- phi = 0.0
--
-+
- if distance > 0.0:
- phi = (distance**2)*np.log10(distance)
- else:
- phi = 0.0
-
-- return phi
-+ return phi
-
-
- def interpolateSolidPositionOnFluidMesh(self, FSI_config):
-- """
-- Applies the one-to-one mapping or the interpolaiton rules from solid to fluid mesh.
-- """
-- if self.have_MPI == True:
-+ """
-+ Applies the one-to-one mapping or the interpolaiton rules from solid to fluid mesh.
-+ """
-+ if self.have_MPI == True:
- myid = self.comm.Get_rank()
- MPIsize = self.comm.Get_size()
- else:
-@@ -1110,12 +1110,12 @@
- del gamma_array_DispY
- del gamma_array_DispZ
- del KSP_solver
-- else:
-+ else:
- self.MappingMatrix.mult(self.solidInterface_array_DispX, self.fluidInterface_array_DispX)
- self.MappingMatrix.mult(self.solidInterface_array_DispY, self.fluidInterface_array_DispY)
- self.MappingMatrix.mult(self.solidInterface_array_DispZ, self.fluidInterface_array_DispZ)
-
-- # --- Checking conservation ---
-+ # --- Checking conservation ---
- WSX = self.solidLoads_array_X.dot(self.solidInterface_array_DispX)
- WSY = self.solidLoads_array_Y.dot(self.solidInterface_array_DispY)
- WSZ = self.solidLoads_array_Z.dot(self.solidInterface_array_DispZ)
-@@ -1124,11 +1124,11 @@
- WFY = self.fluidLoads_array_Y.dot(self.fluidInterface_array_DispY)
- WFZ = self.fluidLoads_array_Z.dot(self.fluidInterface_array_DispZ)
-
-- self.MPIPrint("Checking f/s interface conservation...")
-- self.MPIPrint('Solid side (Wx, Wy, Wz) = ({}, {}, {})'.format(WSX, WSY, WSZ))
-- self.MPIPrint('Fluid side (Wx, Wy, Wz) = ({}, {}, {})'.format(WFX, WFY, WFZ))
-+ self.MPIPrint("Checking f/s interface conservation...")
-+ self.MPIPrint('Solid side (Wx, Wy, Wz) = ({}, {}, {})'.format(WSX, WSY, WSZ))
-+ self.MPIPrint('Fluid side (Wx, Wy, Wz) = ({}, {}, {})'.format(WFX, WFY, WFZ))
-+
-
--
- # --- Redistribute the interpolated fluid interface according to the partitions that own the fluid interface ---
- # Gather the fluid interface on the master process
- if self.have_MPI == True:
-@@ -1156,7 +1156,7 @@
- displ = tuple(displ)
-
- del sendBuffNumber, rcvBuffNumber
--
-+
- #print("DEBUG MESSAGE From proc {}, counts = {}".format(myid, counts))
- #print("DEBUG MESSAGE From proc {}, displ = {}".format(myid, displ))
-
-@@ -1213,18 +1213,18 @@
- del sendBuff
-
- def interpolateFluidLoadsOnSolidMesh(self, FSI_config):
-- """
-- Applies the one-to-one mapping or the interpolaiton rules from fluid to solid mesh.
-- """
-- if self.have_MPI == True:
-+ """
-+ Applies the one-to-one mapping or the interpolaiton rules from fluid to solid mesh.
-+ """
-+ if self.have_MPI == True:
- myid = self.comm.Get_rank()
- MPIsize = self.comm.Get_size()
- else:
- myid = 0
- MPIsize = 1
--
-+
- # --- Interpolate (or map) in parallel the fluid interface loads on the solid interface ---
-- #self.MappingMatrix.transpose()
-+ #self.MappingMatrix.transpose()
- if FSI_config['MATCHING_MESH'] == 'NO' and (FSI_config['MESH_INTERP_METHOD'] == 'RBF' or FSI_config['MESH_INTERP_METHOD'] == 'TPS'):
- if self.have_MPI == True:
- gamma_array_LoadX = PETSc.Vec().create(self.comm)
-@@ -1280,10 +1280,10 @@
- self.solidLoads_array_X_recon = None
- self.solidLoads_array_Y_recon = None
- self.solidLoads_array_Z_recon = None
-- if myid == self.rootProcess:
-- self.solidLoads_array_X_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
-- self.solidLoads_array_Y_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
-- self.solidLoads_array_Z_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
-+ if myid == self.rootProcess:
-+ self.solidLoads_array_X_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
-+ self.solidLoads_array_Y_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
-+ self.solidLoads_array_Z_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
- myNumberOfNodes = self.solidLoads_array_X.getArray().shape[0]
- sendBuffNumber = np.array([myNumberOfNodes], dtype=int)
- rcvBuffNumber = np.zeros(MPIsize, dtype=int)
-@@ -1293,9 +1293,9 @@
- displ = np.zeros(MPIsize, dtype=int)
- for ii in range(rcvBuffNumber.shape[0]):
- displ[ii] = rcvBuffNumber[0:ii].sum()
-- displ = tuple(displ)
-+ displ = tuple(displ)
-
-- del sendBuffNumber, rcvBuffNumber
-+ del sendBuffNumber, rcvBuffNumber
-
- self.comm.Gatherv(self.solidLoads_array_X.getArray(), [self.solidLoads_array_X_recon, counts, displ, self.MPI.DOUBLE], root=self.rootProcess)
- self.comm.Gatherv(self.solidLoads_array_Y.getArray(), [self.solidLoads_array_Y_recon, counts, displ, self.MPI.DOUBLE], root=self.rootProcess)
-@@ -1336,25 +1336,25 @@
-
-
- '''def getSolidInterfacePosition(self, SolidSolver):
-- """
-- Gets the current solid interface position from the solid solver.
-- """
-+ """
-+ Gets the current solid interface position from the solid solver.
-+ """
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- # --- Get the solid interface position from the solid solver and directly fill the corresponding PETSc vector ---
- GlobalIndex = int()
- localIndex = 0
-- for iVertex in range(self.nLocalSolidInterfaceNodes):
-+ for iVertex in range(self.nLocalSolidInterfaceNodes):
- GlobalIndex = SolidSolver.getInterfaceNodeGlobalIndex(self.solidInterfaceIdentifier, iVertex)
- if GlobalIndex in self.SolidHaloNodeList[myid].keys():
- pass
- else:
-- newPosx = SolidSolver.getInterfaceNodePosX(self.solidInterfaceIdentifier, iVertex)
-- newPosy = SolidSolver.getInterfaceNodePosY(self.solidInterfaceIdentifier, iVertex)
-- newPosz = SolidSolver.getInterfaceNodePosZ(self.solidInterfaceIdentifier, iVertex)
-+ newPosx = SolidSolver.getInterfaceNodePosX(self.solidInterfaceIdentifier, iVertex)
-+ newPosy = SolidSolver.getInterfaceNodePosY(self.solidInterfaceIdentifier, iVertex)
-+ newPosz = SolidSolver.getInterfaceNodePosZ(self.solidInterfaceIdentifier, iVertex)
- iGlobalVertex = self.__getGlobalIndex('solid', myid, localIndex)
- self.solidInterface_array_X.setValues([iGlobalVertex],newPosx)
- self.solidInterface_array_Y.setValues([iGlobalVertex],newPosy)
-@@ -1375,25 +1375,25 @@
- #print("DEBUG MESSAGE From PROC {} : array_X = {}".format(myid, self.solidInterface_array_X.getArray()))'''
-
- def getSolidInterfaceDisplacement(self, SolidSolver):
-- """
-- Gets the current solid interface position from the solid solver.
-- """
-+ """
-+ Gets the current solid interface position from the solid solver.
-+ """
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- # --- Get the solid interface position from the solid solver and directly fill the corresponding PETSc vector ---
- GlobalIndex = int()
- localIndex = 0
-- for iVertex in range(self.nLocalSolidInterfaceNodes):
-+ for iVertex in range(self.nLocalSolidInterfaceNodes):
- GlobalIndex = SolidSolver.getInterfaceNodeGlobalIndex(self.solidInterfaceIdentifier, iVertex)
- if GlobalIndex in self.SolidHaloNodeList[myid].keys():
- pass
- else:
-- newDispx = SolidSolver.getInterfaceNodeDispX(self.solidInterfaceIdentifier, iVertex)
-- newDispy = SolidSolver.getInterfaceNodeDispY(self.solidInterfaceIdentifier, iVertex)
-- newDispz = SolidSolver.getInterfaceNodeDispZ(self.solidInterfaceIdentifier, iVertex)
-+ newDispx = SolidSolver.getInterfaceNodeDispX(self.solidInterfaceIdentifier, iVertex)
-+ newDispy = SolidSolver.getInterfaceNodeDispY(self.solidInterfaceIdentifier, iVertex)
-+ newDispz = SolidSolver.getInterfaceNodeDispZ(self.solidInterfaceIdentifier, iVertex)
- iGlobalVertex = self.__getGlobalIndex('solid', myid, localIndex)
- self.solidInterface_array_DispX.setValues([iGlobalVertex],newDispx)
- self.solidInterface_array_DispY.setValues([iGlobalVertex],newDispy)
-@@ -1408,9 +1408,9 @@
- self.solidInterface_array_DispZ.assemblyEnd()
-
- def getFluidInterfaceNodalForce(self, FSI_config, FluidSolver):
-- """
-- Gets the fluid interface loads from the fluid solver.
-- """
-+ """
-+ Gets the fluid interface loads from the fluid solver.
-+ """
- if self.have_MPI == True:
- myid = self.comm.Get_rank()
- else:
-@@ -1422,17 +1422,17 @@
- FZ = 0.0
-
- # --- Get the fluid interface loads from the fluid solver and directly fill the corresponding PETSc vector ---
-- for iVertex in range(self.nLocalFluidInterfaceNodes):
-- halo = FluidSolver.ComputeVertexForces(self.fluidInterfaceIdentifier, iVertex) # !!we have to ignore halo node coming from mesh partitioning because they introduice non-physical forces
-- if halo==False:
-- if FSI_config['CSD_SOLVER'] == 'GETDP':
-- newFx = FluidSolver.GetVertexForceDensityX(self.fluidInterfaceIdentifier, iVertex)
-- newFy = FluidSolver.GetVertexForceDensityY(self.fluidInterfaceIdentifier, iVertex)
-- newFz = FluidSolver.GetVertexForceDensityZ(self.fluidInterfaceIdentifier, iVertex)
-- else:
-- newFx = FluidSolver.GetVertexForceX(self.fluidInterfaceIdentifier, iVertex)
-- newFy = FluidSolver.GetVertexForceY(self.fluidInterfaceIdentifier, iVertex)
-- newFz = FluidSolver.GetVertexForceZ(self.fluidInterfaceIdentifier, iVertex)
-+ for iVertex in range(self.nLocalFluidInterfaceNodes):
-+ halo = FluidSolver.ComputeVertexForces(self.fluidInterfaceIdentifier, iVertex) # !!we have to ignore halo node coming from mesh partitioning because they introduice non-physical forces
-+ if halo==False:
-+ if FSI_config['CSD_SOLVER'] == 'GETDP':
-+ newFx = FluidSolver.GetVertexForceDensityX(self.fluidInterfaceIdentifier, iVertex)
-+ newFy = FluidSolver.GetVertexForceDensityY(self.fluidInterfaceIdentifier, iVertex)
-+ newFz = FluidSolver.GetVertexForceDensityZ(self.fluidInterfaceIdentifier, iVertex)
-+ else:
-+ newFx = FluidSolver.GetVertexForceX(self.fluidInterfaceIdentifier, iVertex)
-+ newFy = FluidSolver.GetVertexForceY(self.fluidInterfaceIdentifier, iVertex)
-+ newFz = FluidSolver.GetVertexForceZ(self.fluidInterfaceIdentifier, iVertex)
- iGlobalVertex = self.__getGlobalIndex('fluid', myid, localIndex)
- self.fluidLoads_array_X.setValues([iGlobalVertex], newFx)
- self.fluidLoads_array_Y.setValues([iGlobalVertex], newFy)
-@@ -1457,22 +1457,22 @@
- FX_b = self.fluidLoads_array_X.sum()
- FY_b = self.fluidLoads_array_Y.sum()
- FZ_b = self.fluidLoads_array_Z.sum()
--
-+
-
- def setFluidInterfaceVarCoord(self, FluidSolver):
-- """
-- Communicate the change of coordinates of the fluid interface to the fluid solver.
-- Prepare the fluid solver for mesh deformation.
-- """
-+ """
-+ Communicate the change of coordinates of the fluid interface to the fluid solver.
-+ Prepare the fluid solver for mesh deformation.
-+ """
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- # --- Send the new fluid interface position to the fluid solver (on each partition, halo nodes included) ---
- localIndex = 0
-- for iVertex in range(self.nLocalFluidInterfaceNodes):
-- GlobalIndex = FluidSolver.GetVertexGlobalIndex(self.fluidInterfaceIdentifier, iVertex)
-+ for iVertex in range(self.nLocalFluidInterfaceNodes):
-+ GlobalIndex = FluidSolver.GetVertexGlobalIndex(self.fluidInterfaceIdentifier, iVertex)
- if GlobalIndex in self.FluidHaloNodeList[myid].keys():
- posX0, posY0, posZ0 = self.haloNodesPositionsInit[GlobalIndex]
- DispX, DispY, DispZ = self.haloNodesDisplacements[GlobalIndex]
-@@ -1491,32 +1491,32 @@
- FluidSolver.SetVertexCoordZ(self.fluidInterfaceIdentifier, iVertex, posZ)
- localIndex += 1
- # Prepares the mesh deformation in the fluid solver
-- nodalVarCoordNorm = FluidSolver.SetVertexVarCoord(self.fluidInterfaceIdentifier, iVertex)
-+ nodalVarCoordNorm = FluidSolver.SetVertexVarCoord(self.fluidInterfaceIdentifier, iVertex)
-+
-
--
- def setSolidInterfaceLoads(self, SolidSolver, FSI_config, time):
-- """
-- Communicates the new solid interface loads to the solid solver.
-- In case of rigid body motion, calculates the new resultant forces (lift, drag, ...).
-- """
-+ """
-+ Communicates the new solid interface loads to the solid solver.
-+ In case of rigid body motion, calculates the new resultant forces (lift, drag, ...).
-+ """
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
-
-- FY = 0.0 # solid-side resultant forces
-+ FY = 0.0 # solid-side resultant forces
- FX = 0.0
- FZ = 0.0
-- FFX = 0.0 # fluid-side resultant forces
-- FFY = 0.0
-- FFZ = 0.0
-+ FFX = 0.0 # fluid-side resultant forces
-+ FFY = 0.0
-+ FFZ = 0.0
-
- # --- Check for total force conservation after interpolation
- FFX = self.fluidLoads_array_X.sum()
- FFY = self.fluidLoads_array_Y.sum()
- FFZ = self.fluidLoads_array_Z.sum()
-
--
-+
- for iVertex in range(self.nLocalSolidInterfaceNodes):
- FX += self.localSolidLoads_array_X[iVertex]
- FY += self.localSolidLoads_array_Y[iVertex]
-@@ -1527,9 +1527,9 @@
- FY = self.comm.allreduce(FY)
- FZ = self.comm.allreduce(FZ)
-
-- self.MPIPrint("Checking f/s interface total force...")
-- self.MPIPrint('Solid side (Fx, Fy, Fz) = ({}, {}, {})'.format(FX, FY, FZ))
-- self.MPIPrint('Fluid side (Fx, Fy, Fz) = ({}, {}, {})'.format(FFX, FFY, FFZ))
-+ self.MPIPrint("Checking f/s interface total force...")
-+ self.MPIPrint('Solid side (Fx, Fy, Fz) = ({}, {}, {})'.format(FX, FY, FZ))
-+ self.MPIPrint('Fluid side (Fx, Fy, Fz) = ({}, {}, {})'.format(FFX, FFY, FFZ))
-
- # --- Send the new solid interface loads to the solid solver (on each partition, halo nodes included) ---
- GlobalIndex = int()
-@@ -1541,25 +1541,25 @@
- pass
- else:
- Fx = self.localSolidLoads_array_X[localIndex]
-- Fy = self.localSolidLoads_array_Y[localIndex]
-- Fz = self.localSolidLoads_array_Z[localIndex]
-+ Fy = self.localSolidLoads_array_Y[localIndex]
-+ Fz = self.localSolidLoads_array_Z[localIndex]
- SolidSolver.applyload(iVertex, Fx, Fy, Fz, time)
- localIndex += 1
-- if FSI_config['CSD_SOLVER'] == 'NATIVE':
-+ if FSI_config['CSD_SOLVER'] == 'NATIVE':
- SolidSolver.setGeneralisedForce()
-- SolidSolver.setGeneralisedMoment()
-+ SolidSolver.setGeneralisedMoment()
-
- def computeSolidInterfaceResidual(self, SolidSolver):
-- """
-- Computes the solid interface FSI displacement residual.
-- """
-+ """
-+ Computes the solid interface FSI displacement residual.
-+ """
-
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
-
-- normInterfaceResidualSquare = 0.0
-+ normInterfaceResidualSquare = 0.0
-
- # --- Create and fill the PETSc vector for the predicted solid interface position (predicted by the solid computation) ---
- if self.have_MPI == True:
-@@ -1575,27 +1575,27 @@
- predDisp_array_Y = PETSc.Vec().create()
- predDisp_array_Y.setType('seq')
- predDisp_array_Z = PETSc.Vec().create()
-- predDisp_array_Z.setType('seq')
-+ predDisp_array_Z.setType('seq')
- predDisp_array_X.setSizes(self.nSolidInterfacePhysicalNodes+self.d_RBF)
- predDisp_array_Y.setSizes(self.nSolidInterfacePhysicalNodes+self.d_RBF)
- predDisp_array_Z.setSizes(self.nSolidInterfacePhysicalNodes+self.d_RBF)
--
-- if myid in self.solidSolverProcessors:
-- for iVertex in range(self.nLocalSolidInterfaceNodes):
-- predDispx = SolidSolver.getInterfaceNodeDispX(self.solidInterfaceIdentifier, iVertex)
-- predDispy = SolidSolver.getInterfaceNodeDispY(self.solidInterfaceIdentifier, iVertex)
-- predDispz = SolidSolver.getInterfaceNodeDispZ(self.solidInterfaceIdentifier, iVertex)
-+
-+ if myid in self.solidSolverProcessors:
-+ for iVertex in range(self.nLocalSolidInterfaceNodes):
-+ predDispx = SolidSolver.getInterfaceNodeDispX(self.solidInterfaceIdentifier, iVertex)
-+ predDispy = SolidSolver.getInterfaceNodeDispY(self.solidInterfaceIdentifier, iVertex)
-+ predDispz = SolidSolver.getInterfaceNodeDispZ(self.solidInterfaceIdentifier, iVertex)
- iGlobalVertex = self.__getGlobalIndex('solid', myid, iVertex)
- predDisp_array_X.setValues([iGlobalVertex], predDispx)
- predDisp_array_Y.setValues([iGlobalVertex], predDispy)
- predDisp_array_Z.setValues([iGlobalVertex], predDispz)
--
-- predDisp_array_X.assemblyBegin()
-- predDisp_array_X.assemblyEnd()
-- predDisp_array_Y.assemblyBegin()
-- predDisp_array_Y.assemblyEnd()
-- predDisp_array_Z.assemblyBegin()
-- predDisp_array_Z.assemblyEnd()
-+
-+ predDisp_array_X.assemblyBegin()
-+ predDisp_array_X.assemblyEnd()
-+ predDisp_array_Y.assemblyBegin()
-+ predDisp_array_Y.assemblyEnd()
-+ predDisp_array_Z.assemblyBegin()
-+ predDisp_array_Z.assemblyEnd()
-
- # --- Calculate the residual (vector and norm) ---
- self.solidInterfaceResidual_array_X = predDisp_array_X - self.solidInterface_array_DispX
-@@ -1615,45 +1615,45 @@
- del predDisp_array_Y
- del predDisp_array_Z
-
-- return sqrt(normInterfaceResidualSquare)
-+ return sqrt(normInterfaceResidualSquare)
-
- def relaxSolidPosition(self,FSI_config):
-- """
-- Apply solid displacement under-relaxation.
-- """
-+ """
-+ Apply solid displacement under-relaxation.
-+ """
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
-
- # --- Set the Aitken coefficient for the relaxation ---
-- if FSI_config['AITKEN_RELAX'] == 'STATIC':
-- self.aitkenParam = FSI_config['AITKEN_PARAM']
-- elif FSI_config['AITKEN_RELAX'] == 'DYNAMIC':
-- self.setAitkenCoefficient(FSI_config)
-- else:
-- self.aitkenParam = 1.0
-+ if FSI_config['AITKEN_RELAX'] == 'STATIC':
-+ self.aitkenParam = FSI_config['AITKEN_PARAM']
-+ elif FSI_config['AITKEN_RELAX'] == 'DYNAMIC':
-+ self.setAitkenCoefficient(FSI_config)
-+ else:
-+ self.aitkenParam = 1.0
-
-- self.MPIPrint('Aitken under-relaxation step with parameter {}'.format(self.aitkenParam))
-+ self.MPIPrint('Aitken under-relaxation step with parameter {}'.format(self.aitkenParam))
-
- # --- Relax the solid interface position ---
- self.solidInterface_array_DispX += self.aitkenParam*self.solidInterfaceResidual_array_X
- self.solidInterface_array_DispY += self.aitkenParam*self.solidInterfaceResidual_array_Y
- self.solidInterface_array_DispZ += self.aitkenParam*self.solidInterfaceResidual_array_Z
--
-+
-
- def setAitkenCoefficient(self, FSI_config):
-- """
-- Computes the Aitken coefficients for solid displacement under-relaxation.
-- """
--
-- deltaResNormSquare = 0.0
-- prodScalRes = 0.0
--
-+ """
-+ Computes the Aitken coefficients for solid displacement under-relaxation.
-+ """
-+
-+ deltaResNormSquare = 0.0
-+ prodScalRes = 0.0
-+
- # --- Create the PETSc vector for the difference between the residuals (current and previous FSI iter) ---
-- if self.FSIIter == 0:
-- self.aitkenParam = max(FSI_config['AITKEN_PARAM'], self.aitkenParam)
-- else:
-+ if self.FSIIter == 0:
-+ self.aitkenParam = max(FSI_config['AITKEN_PARAM'], self.aitkenParam)
-+ else:
- if self.have_MPI:
- deltaResx_array_X = PETSc.Vec().create(self.comm)
- deltaResx_array_X.setType('mpi')
-@@ -1688,9 +1688,9 @@
- deltaResNormSquare_X = (deltaResx_array_X.norm())**2
- deltaResNormSquare_Y = (deltaResx_array_Y.norm())**2
- deltaResNormSquare_Z = (deltaResx_array_Z.norm())**2
-- deltaResNormSquare = deltaResNormSquare_X + deltaResNormSquare_Y + deltaResNormSquare_Z
-+ deltaResNormSquare = deltaResNormSquare_X + deltaResNormSquare_Y + deltaResNormSquare_Z
-
-- self.aitkenParam *= -prodScalRes/deltaResNormSquare
-+ self.aitkenParam *= -prodScalRes/deltaResNormSquare
-
- deltaResx_array_X.destroy()
- deltaResx_array_Y.destroy()
-@@ -1708,27 +1708,27 @@
- self.solidInterfaceResidual_array_Z.copy(self.solidInterfaceResidualnM1_array_Z)
-
- def displacementPredictor(self, FSI_config , SolidSolver, deltaT):
-- """
-- Calculates a prediciton for the solid interface position for the next time step.
-- """
-+ """
-+ Calculates a prediciton for the solid interface position for the next time step.
-+ """
-
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
-
-- if FSI_config['DISP_PRED'] == 'FIRST_ORDER':
-- self.MPIPrint("First order predictor")
-- alpha_0 = 1.0
-- alpha_1 = 0.0
-- elif FSI_config['DISP_PRED'] == 'SECOND_ORDER':
-- self.MPIPrint("Second order predictor")
-- alpha_0 = 1.0
-- alpha_1 = 0.5
-- else:
-- self.MPIPrint("No predictor")
-- alpha_0 = 0.0
-- alpha_1 = 0.0
-+ if FSI_config['DISP_PRED'] == 'FIRST_ORDER':
-+ self.MPIPrint("First order predictor")
-+ alpha_0 = 1.0
-+ alpha_1 = 0.0
-+ elif FSI_config['DISP_PRED'] == 'SECOND_ORDER':
-+ self.MPIPrint("Second order predictor")
-+ alpha_0 = 1.0
-+ alpha_1 = 0.5
-+ else:
-+ self.MPIPrint("No predictor")
-+ alpha_0 = 0.0
-+ alpha_1 = 0.0
-
- # --- Create the PETSc vectors to store the solid interface velocity ---
- if self.have_MPI == True:
-@@ -1774,18 +1774,18 @@
- # --- Fill the PETSc vectors ---
- GlobalIndex = int()
- localIndex = 0
-- for iVertex in range(self.nLocalSolidInterfaceNodes):
-- GlobalIndex = SolidSolver.getInterfaceNodeGlobalIndex(self.solidInterfaceIdentifier, iVertex)
-+ for iVertex in range(self.nLocalSolidInterfaceNodes):
-+ GlobalIndex = SolidSolver.getInterfaceNodeGlobalIndex(self.solidInterfaceIdentifier, iVertex)
- if GlobalIndex in self.SolidHaloNodeList[myid].keys():
- pass
- else:
- iGlobalVertex = self.__getGlobalIndex('solid', myid, localIndex)
-- velx = SolidSolver.getInterfaceNodeVelX(self.solidInterfaceIdentifier, iVertex)
-- vely = SolidSolver.getInterfaceNodeVelY(self.solidInterfaceIdentifier, iVertex)
-- velz = SolidSolver.getInterfaceNodeVelZ(self.solidInterfaceIdentifier, iVertex)
-- velxNm1 = SolidSolver.getInterfaceNodeVelXNm1(self.solidInterfaceIdentifier, iVertex)
-- velyNm1 = SolidSolver.getInterfaceNodeVelYNm1(self.solidInterfaceIdentifier, iVertex)
-- velzNm1 = SolidSolver.getInterfaceNodeVelZNm1(self.solidInterfaceIdentifier, iVertex)
-+ velx = SolidSolver.getInterfaceNodeVelX(self.solidInterfaceIdentifier, iVertex)
-+ vely = SolidSolver.getInterfaceNodeVelY(self.solidInterfaceIdentifier, iVertex)
-+ velz = SolidSolver.getInterfaceNodeVelZ(self.solidInterfaceIdentifier, iVertex)
-+ velxNm1 = SolidSolver.getInterfaceNodeVelXNm1(self.solidInterfaceIdentifier, iVertex)
-+ velyNm1 = SolidSolver.getInterfaceNodeVelYNm1(self.solidInterfaceIdentifier, iVertex)
-+ velzNm1 = SolidSolver.getInterfaceNodeVelZNm1(self.solidInterfaceIdentifier, iVertex)
- Vel_array_X.setValues([iGlobalVertex],velx)
- Vel_array_Y.setValues([iGlobalVertex],vely)
- Vel_array_Z.setValues([iGlobalVertex],velz)
-@@ -1822,27 +1822,27 @@
- del VelnM1_array_X, VelnM1_array_Y, VelnM1_array_Z
-
- def writeFSIHistory(self, TimeIter, time, varCoordNorm, FSIConv):
-- """
-- Write the FSI history file of the computaion.
-- """
-+ """
-+ Write the FSI history file of the computaion.
-+ """
-
- if self.have_MPI == True:
- myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- if myid == self.rootProcess:
-- if self.unsteady:
-- if TimeIter == 0:
-- histFile = open('FSIhistory.dat', "w")
-+ if self.unsteady:
-+ if TimeIter == 0:
-+ histFile = open('FSIhistory.dat', "w")
- histFile.write("TimeIter\tTime\tFSIRes\tFSINbIter\n")
-- else:
-- histFile = open('FSIhistory.dat', "a")
-- if FSIConv:
-- histFile.write(str(TimeIter) + '\t' + str(time) + '\t' + str(varCoordNorm) + '\t' + str(self.FSIIter+1) + '\n')
-- else:
-- histFile.write(str(TimeIter) + '\t' + str(time) + '\t' + str(varCoordNorm) + '\t' + str(self.FSIIter) + '\n')
-- histFile.close()
-+ else:
-+ histFile = open('FSIhistory.dat', "a")
-+ if FSIConv:
-+ histFile.write(str(TimeIter) + '\t' + str(time) + '\t' + str(varCoordNorm) + '\t' + str(self.FSIIter+1) + '\n')
-+ else:
-+ histFile.write(str(TimeIter) + '\t' + str(time) + '\t' + str(varCoordNorm) + '\t' + str(self.FSIIter) + '\n')
-+ histFile.close()
- else:
- if self.FSIIter == 0:
- histFile = open('FSIhistory.dat', "w")
-@@ -1851,7 +1851,7 @@
- histFile = open('FSIhistory.dat', "a")
- histFile.write(str(self.FSIIter) + '\t' + str(varCoordNorm) + '\n')
- histFile.close()
--
-+
-
- self.MPIBarrier()
-
-@@ -1868,254 +1868,254 @@
- globalIndex = globalStartIndex + iLocalVertex
-
- return globalIndex
--
-+
-
- def UnsteadyFSI(self,FSI_config, FluidSolver, SolidSolver):
-- """
-- Run the unsteady FSI computation by synchronizing the fluid and solid solvers.
-- F/s interface data are exchanged through interface mapping and interpolation (if non mathcing meshes).
-- """
-+ """
-+ Run the unsteady FSI computation by synchronizing the fluid and solid solvers.
-+ F/s interface data are exchanged through interface mapping and interpolation (if non mathcing meshes).
-+ """
-
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-- numberPart = self.comm.Get_size()
-+ myid = self.comm.Get_rank()
-+ numberPart = self.comm.Get_size()
- else:
- myid = 0
- numberPart = 1
-
-- # --- Set some general variables for the unsteady computation --- #
-- deltaT = FSI_config['UNST_TIMESTEP'] # physical time step
-- totTime = FSI_config['UNST_TIME'] # physical simulation time
-- NbFSIIterMax = FSI_config['NB_FSI_ITER'] # maximum number of FSI iteration (for each time step)
-- FSITolerance = FSI_config['FSI_TOLERANCE'] # f/s interface tolerance
-- TimeIterTreshold = 0 # time iteration from which we allow the solid to deform
--
-- if FSI_config['RESTART_SOL'] == 'YES':
-- startTime = FSI_config['START_TIME']
-- NbTimeIter = ((totTime)/deltaT)-1
-- time = startTime
-- TimeIter = FSI_config['RESTART_ITER']
-- else:
-- NbTimeIter = (totTime/deltaT)-1 # number of time iterations
-- time = 0.0 # initial time
-- TimeIter = 0 # initial time iteration
--
-- NbTimeIter = int(NbTimeIter) # be sure that NbTimeIter is an integer
--
-- varCoordNorm = 0.0 # FSI residual
-- FSIConv = False # FSI convergence flag
--
-- self.MPIPrint('\n**********************************')
-- self.MPIPrint('* Begin unsteady FSI computation *')
-- self.MPIPrint('**********************************\n')
--
-- # --- Initialize the coupled solution --- #
-- #If restart (DOES NOT WORK YET)
-- if FSI_config['RESTART_SOL'] == 'YES':
-- TimeIterTreshold = -1
-- FluidSolver.setTemporalIteration(TimeIter)
-- if myid == self.rootProcess:
-- SolidSolver.outputDisplacements(FluidSolver.getInterRigidDispArray(), True)
-+ # --- Set some general variables for the unsteady computation --- #
-+ deltaT = FSI_config['UNST_TIMESTEP'] # physical time step
-+ totTime = FSI_config['UNST_TIME'] # physical simulation time
-+ NbFSIIterMax = FSI_config['NB_FSI_ITER'] # maximum number of FSI iteration (for each time step)
-+ FSITolerance = FSI_config['FSI_TOLERANCE'] # f/s interface tolerance
-+ TimeIterTreshold = 0 # time iteration from which we allow the solid to deform
-+
-+ if FSI_config['RESTART_SOL'] == 'YES':
-+ startTime = FSI_config['START_TIME']
-+ NbTimeIter = ((totTime)/deltaT)-1
-+ time = startTime
-+ TimeIter = FSI_config['RESTART_ITER']
-+ else:
-+ NbTimeIter = (totTime/deltaT)-1 # number of time iterations
-+ time = 0.0 # initial time
-+ TimeIter = 0 # initial time iteration
-+
-+ NbTimeIter = int(NbTimeIter) # be sure that NbTimeIter is an integer
-+
-+ varCoordNorm = 0.0 # FSI residual
-+ FSIConv = False # FSI convergence flag
-+
-+ self.MPIPrint('\n**********************************')
-+ self.MPIPrint('* Begin unsteady FSI computation *')
-+ self.MPIPrint('**********************************\n')
-+
-+ # --- Initialize the coupled solution --- #
-+ #If restart (DOES NOT WORK YET)
-+ if FSI_config['RESTART_SOL'] == 'YES':
-+ TimeIterTreshold = -1
-+ FluidSolver.setTemporalIteration(TimeIter)
-+ if myid == self.rootProcess:
-+ SolidSolver.outputDisplacements(FluidSolver.getInterRigidDispArray(), True)
-+ if self.have_MPI == True:
-+ self.comm.barrier()
-+ FluidSolver.setInitialMesh(True)
-+ if myid == self.rootProcess:
-+ SolidSolver.displacementPredictor(FluidSolver.getInterRigidDispArray())
- if self.have_MPI == True:
-- self.comm.barrier()
-- FluidSolver.setInitialMesh(True)
-- if myid == self.rootProcess:
-- SolidSolver.displacementPredictor(FluidSolver.getInterRigidDispArray())
-- if self.have_MPI == True:
-- self.comm.barrier()
-- if myid == self.rootProcess:
-- SolidSolver.updateSolution()
-- #If no restart
-- else:
-- self.MPIPrint('Setting FSI initial conditions')
-+ self.comm.barrier()
-+ if myid == self.rootProcess:
-+ SolidSolver.updateSolution()
-+ #If no restart
-+ else:
-+ self.MPIPrint('Setting FSI initial conditions')
- if myid in self.solidSolverProcessors:
-- SolidSolver.setInitialDisplacements()
-+ SolidSolver.setInitialDisplacements()
- self.getSolidInterfaceDisplacement(SolidSolver)
-- self.interpolateSolidPositionOnFluidMesh(FSI_config)
-- self.setFluidInterfaceVarCoord(FluidSolver)
-- FluidSolver.SetInitialMesh() # if there is an initial deformation in the solid, it has to be communicated to the fluid solver
-- self.MPIPrint('\nFSI initial conditions are set')
-- self.MPIPrint('Beginning time integration\n')
--
-- # --- External temporal loop --- #
-- while TimeIter <= NbTimeIter:
--
-- if TimeIter > TimeIterTreshold:
-- NbFSIIter = NbFSIIterMax
-- self.MPIPrint('\n*************** Enter Block Gauss Seidel (BGS) method for strong coupling FSI on time iteration {} ***************'.format(TimeIter))
-- else:
-- NbFSIIter = 1
--
-- self.FSIIter = 0
-- FSIConv = False
-- FluidSolver.PreprocessExtIter(TimeIter) # set some parameters before temporal fluid iteration
--
-- # --- Internal FSI loop --- #
-- while self.FSIIter <= (NbFSIIter-1):
-+ self.interpolateSolidPositionOnFluidMesh(FSI_config)
-+ self.setFluidInterfaceVarCoord(FluidSolver)
-+ FluidSolver.SetInitialMesh() # if there is an initial deformation in the solid, it has to be communicated to the fluid solver
-+ self.MPIPrint('\nFSI initial conditions are set')
-+ self.MPIPrint('Beginning time integration\n')
-+
-+ # --- External temporal loop --- #
-+ while TimeIter <= NbTimeIter:
-+
-+ if TimeIter > TimeIterTreshold:
-+ NbFSIIter = NbFSIIterMax
-+ self.MPIPrint('\n*************** Enter Block Gauss Seidel (BGS) method for strong coupling FSI on time iteration {} ***************'.format(TimeIter))
-+ else:
-+ NbFSIIter = 1
-+
-+ self.FSIIter = 0
-+ FSIConv = False
-+ FluidSolver.PreprocessExtIter(TimeIter) # set some parameters before temporal fluid iteration
-
-- self.MPIPrint("\n>>>> Time iteration {} / FSI iteration {} <<<<".format(TimeIter,self.FSIIter))
-+ # --- Internal FSI loop --- #
-+ while self.FSIIter <= (NbFSIIter-1):
-
-- # --- Mesh morphing step (displacements interpolation, displacements communication, and mesh morpher call) --- #
-- self.interpolateSolidPositionOnFluidMesh(FSI_config)
-+ self.MPIPrint("\n>>>> Time iteration {} / FSI iteration {} <<<<".format(TimeIter,self.FSIIter))
-+
-+ # --- Mesh morphing step (displacements interpolation, displacements communication, and mesh morpher call) --- #
-+ self.interpolateSolidPositionOnFluidMesh(FSI_config)
- self.MPIPrint('\nPerforming dynamic mesh deformation (ALE)...\n')
- self.setFluidInterfaceVarCoord(FluidSolver)
- FluidSolver.DynamicMeshUpdate(TimeIter)
--
-- # --- Fluid solver call for FSI subiteration --- #
-- self.MPIPrint('\nLaunching fluid solver for one single dual-time iteration...')
-+
-+ # --- Fluid solver call for FSI subiteration --- #
-+ self.MPIPrint('\nLaunching fluid solver for one single dual-time iteration...')
- self.MPIBarrier()
-- FluidSolver.ResetConvergence()
-- FluidSolver.Run()
-+ FluidSolver.ResetConvergence()
-+ FluidSolver.Run()
- self.MPIBarrier()
-
-- # --- Surface fluid loads interpolation and communication --- #
-- self.MPIPrint('\nProcessing interface fluid loads...\n')
-+ # --- Surface fluid loads interpolation and communication --- #
-+ self.MPIPrint('\nProcessing interface fluid loads...\n')
- self.MPIBarrier()
-- self.getFluidInterfaceNodalForce(FSI_config, FluidSolver)
-+ self.getFluidInterfaceNodalForce(FSI_config, FluidSolver)
- self.MPIBarrier()
-- if TimeIter > TimeIterTreshold:
-- self.interpolateFluidLoadsOnSolidMesh(FSI_config)
-- self.setSolidInterfaceLoads(SolidSolver, FSI_config, time)
-+ if TimeIter > TimeIterTreshold:
-+ self.interpolateFluidLoadsOnSolidMesh(FSI_config)
-+ self.setSolidInterfaceLoads(SolidSolver, FSI_config, time)
-
-- # --- Solid solver call for FSI subiteration --- #
-- self.MPIPrint('\nLaunching solid solver for a single time iteration...\n')
-+ # --- Solid solver call for FSI subiteration --- #
-+ self.MPIPrint('\nLaunching solid solver for a single time iteration...\n')
- if myid in self.solidSolverProcessors:
-- if FSI_config['CSD_SOLVER'] == 'NATIVE':
-- SolidSolver.timeIteration(time)
-- elif FSI_config['CSD_SOLVER'] == 'METAFOR' or FSI_config['CSD_SOLVER'] == 'GETDP' or FSI_config['CSD_SOLVER'] == 'TESTER':
-- SolidSolver.run(time-deltaT, time)
--
-- # --- Compute and monitor the FSI residual --- #
-- varCoordNorm = self.computeSolidInterfaceResidual(SolidSolver)
-- self.MPIPrint('\nFSI displacement norm : {}\n'.format(varCoordNorm))
-- if varCoordNorm < FSITolerance:
-- FSIConv = True
-- break
-+ if FSI_config['CSD_SOLVER'] == 'NATIVE':
-+ SolidSolver.timeIteration(time)
-+ elif FSI_config['CSD_SOLVER'] == 'METAFOR' or FSI_config['CSD_SOLVER'] == 'GETDP' or FSI_config['CSD_SOLVER'] == 'TESTER':
-+ SolidSolver.run(time-deltaT, time)
-+
-+ # --- Compute and monitor the FSI residual --- #
-+ varCoordNorm = self.computeSolidInterfaceResidual(SolidSolver)
-+ self.MPIPrint('\nFSI displacement norm : {}\n'.format(varCoordNorm))
-+ if varCoordNorm < FSITolerance:
-+ FSIConv = True
-+ break
-
-- # --- Relaxe the solid position --- #
-+ # --- Relaxe the solid position --- #
- self.MPIPrint('\nProcessing interface displacements...\n')
-- self.relaxSolidPosition(FSI_config)
--
-- self.FSIIter += 1
-- # --- End OF FSI loop --- #
-+ self.relaxSolidPosition(FSI_config)
-+
-+ self.FSIIter += 1
-+ # --- End OF FSI loop --- #
-
- self.MPIBarrier()
-
-- # --- Update the FSI history file --- #
-- if TimeIter > TimeIterTreshold:
-- self.MPIPrint('\nBGS is converged (strong coupling)')
-- self.writeFSIHistory(TimeIter, time, varCoordNorm, FSIConv)
--
-- # --- Update, monitor and output the fluid solution before the next time step ---#
-- FluidSolver.Update()
-- FluidSolver.Monitor(TimeIter)
-- FluidSolver.Output(TimeIter)
--
-- if TimeIter >= TimeIterTreshold:
-- if myid in self.solidSolverProcessors:
-- # --- Output the solid solution before thr next time step --- #
-- SolidSolver.writeSolution(time, self.FSIIter, TimeIter, NbTimeIter)
--
-- # --- Displacement predictor for the next time step and update of the solid solution --- #
-- self.MPIPrint('\nSolid displacement prediction for next time step')
-- self.displacementPredictor(FSI_config, SolidSolver, deltaT)
-+ # --- Update the FSI history file --- #
-+ if TimeIter > TimeIterTreshold:
-+ self.MPIPrint('\nBGS is converged (strong coupling)')
-+ self.writeFSIHistory(TimeIter, time, varCoordNorm, FSIConv)
-+
-+ # --- Update, monitor and output the fluid solution before the next time step ---#
-+ FluidSolver.Update()
-+ FluidSolver.Monitor(TimeIter)
-+ FluidSolver.Output(TimeIter)
-+
-+ if TimeIter >= TimeIterTreshold:
-+ if myid in self.solidSolverProcessors:
-+ # --- Output the solid solution before thr next time step --- #
-+ SolidSolver.writeSolution(time, self.FSIIter, TimeIter, NbTimeIter)
-+
-+ # --- Displacement predictor for the next time step and update of the solid solution --- #
-+ self.MPIPrint('\nSolid displacement prediction for next time step')
-+ self.displacementPredictor(FSI_config, SolidSolver, deltaT)
- if myid in self.solidSolverProcessors:
-- SolidSolver.updateSolution()
--
-- TimeIter += 1
-- time += deltaT
-- #--- End of the temporal loop --- #
-+ SolidSolver.updateSolution()
-+
-+ TimeIter += 1
-+ time += deltaT
-+ #--- End of the temporal loop --- #
-
- self.MPIBarrier()
-
-- self.MPIPrint('\n*************************')
-- self.MPIPrint('* End FSI computation *')
-- self.MPIPrint('*************************\n')
-+ self.MPIPrint('\n*************************')
-+ self.MPIPrint('* End FSI computation *')
-+ self.MPIPrint('*************************\n')
-
- def SteadyFSI(self, FSI_config,FluidSolver, SolidSolver):
-- """
-- Runs the steady FSI computation by synchronizing the fluid and solid solver with data exchange at the f/s interface.
-- """
-+ """
-+ Runs the steady FSI computation by synchronizing the fluid and solid solver with data exchange at the f/s interface.
-+ """
-
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-- numberPart = self.comm.Get_size()
-+ myid = self.comm.Get_rank()
-+ numberPart = self.comm.Get_size()
- else:
- myid = 0
- numberPart = 1
-
-- # --- Set some general variables for the steady computation --- #
-- NbIter = FSI_config['NB_EXT_ITER'] # number of fluid iteration at each FSI step
-- NbFSIIterMax = FSI_config['NB_FSI_ITER'] # maximum number of FSI iteration (for each time step)
-- FSITolerance = FSI_config['FSI_TOLERANCE'] # f/s interface tolerance
-- varCoordNorm = 0.0
--
-- self.MPIPrint('\n********************************')
-- self.MPIPrint('* Begin steady FSI computation *')
-- self.MPIPrint('********************************\n')
-- self.MPIPrint('\n*************** Enter Block Gauss Seidel (BGS) method for strong coupling FSI ***************')
-+ # --- Set some general variables for the steady computation --- #
-+ NbIter = FSI_config['NB_EXT_ITER'] # number of fluid iteration at each FSI step
-+ NbFSIIterMax = FSI_config['NB_FSI_ITER'] # maximum number of FSI iteration (for each time step)
-+ FSITolerance = FSI_config['FSI_TOLERANCE'] # f/s interface tolerance
-+ varCoordNorm = 0.0
-+
-+ self.MPIPrint('\n********************************')
-+ self.MPIPrint('* Begin steady FSI computation *')
-+ self.MPIPrint('********************************\n')
-+ self.MPIPrint('\n*************** Enter Block Gauss Seidel (BGS) method for strong coupling FSI ***************')
-
- self.getSolidInterfaceDisplacement(SolidSolver)
-
-- # --- External FSI loop --- #
-- self.FSIIter = 0
-- while self.FSIIter < NbFSIIterMax:
-- self.MPIPrint("\n>>>> FSI iteration {} <<<<".format(self.FSIIter))
-- self.MPIPrint('\nLaunching fluid solver for a steady computation...')
-- # --- Fluid solver call for FSI subiteration ---#
-- Iter = 0
-- FluidSolver.ResetConvergence()
-- while Iter < NbIter:
-- FluidSolver.PreprocessExtIter(Iter)
-- FluidSolver.Run()
-- StopIntegration = FluidSolver.Monitor(Iter)
-- FluidSolver.Output(Iter)
-- if StopIntegration:
-- break;
-- Iter += 1
--
-- # --- Surface fluid loads interpolation and communication ---#
-- self.MPIPrint('\nProcessing interface fluid loads...\n')
-+ # --- External FSI loop --- #
-+ self.FSIIter = 0
-+ while self.FSIIter < NbFSIIterMax:
-+ self.MPIPrint("\n>>>> FSI iteration {} <<<<".format(self.FSIIter))
-+ self.MPIPrint('\nLaunching fluid solver for a steady computation...')
-+ # --- Fluid solver call for FSI subiteration ---#
-+ Iter = 0
-+ FluidSolver.ResetConvergence()
-+ while Iter < NbIter:
-+ FluidSolver.PreprocessExtIter(Iter)
-+ FluidSolver.Run()
-+ StopIntegration = FluidSolver.Monitor(Iter)
-+ FluidSolver.Output(Iter)
-+ if StopIntegration:
-+ break;
-+ Iter += 1
-+
-+ # --- Surface fluid loads interpolation and communication ---#
-+ self.MPIPrint('\nProcessing interface fluid loads...\n')
- self.MPIBarrier()
-- self.getFluidInterfaceNodalForce(FSI_config, FluidSolver)
-+ self.getFluidInterfaceNodalForce(FSI_config, FluidSolver)
- self.MPIBarrier()
-- self.interpolateFluidLoadsOnSolidMesh(FSI_config)
-- self.setSolidInterfaceLoads(SolidSolver, FSI_config, 0.05)
--
-- # --- Solid solver call for FSI subiteration --- #
-- self.MPIPrint('\nLaunching solid solver for a static computation...\n')
-+ self.interpolateFluidLoadsOnSolidMesh(FSI_config)
-+ self.setSolidInterfaceLoads(SolidSolver, FSI_config, 0.05)
-+
-+ # --- Solid solver call for FSI subiteration --- #
-+ self.MPIPrint('\nLaunching solid solver for a static computation...\n')
- if myid in self.solidSolverProcessors:
-- if FSI_config['CSD_SOLVER'] == 'NATIVE':
-- SolidSolver.staticComputation()
-+ if FSI_config['CSD_SOLVER'] == 'NATIVE':
-+ SolidSolver.staticComputation()
- else:
- SolidSolver.run(0.0, 0.05)
-- SolidSolver.writeSolution(0.0, self.FSIIter, Iter, NbIter)
-+ SolidSolver.writeSolution(0.0, self.FSIIter, Iter, NbIter)
-
-- # --- Compute and monitor the FSI residual --- #
-- varCoordNorm = self.computeSolidInterfaceResidual(SolidSolver)
-- self.MPIPrint('\nFSI displacement norm : {}\n'.format(varCoordNorm))
-+ # --- Compute and monitor the FSI residual --- #
-+ varCoordNorm = self.computeSolidInterfaceResidual(SolidSolver)
-+ self.MPIPrint('\nFSI displacement norm : {}\n'.format(varCoordNorm))
- self.writeFSIHistory(0, 0.0, varCoordNorm, False)
-- if varCoordNorm < FSITolerance:
-- break
-+ if varCoordNorm < FSITolerance:
-+ break
-
- # --- Relaxe the solid displacement and update the solid solution --- #
- self.MPIPrint('\nProcessing interface displacements...\n')
-- self.relaxSolidPosition(FSI_config)
-+ self.relaxSolidPosition(FSI_config)
- if myid in self.solidSolverProcessors:
- SolidSolver.updateSolution()
--
-- # --- Mesh morphing step (displacement interpolation, displacements communication, and mesh morpher call) --- #
-- self.interpolateSolidPositionOnFluidMesh(FSI_config)
-- self.MPIPrint('\nPerforming static mesh deformation...\n')
-- self.setFluidInterfaceVarCoord(FluidSolver)
-- FluidSolver.StaticMeshUpdate()
-- self.FSIIter += 1
-+
-+ # --- Mesh morphing step (displacement interpolation, displacements communication, and mesh morpher call) --- #
-+ self.interpolateSolidPositionOnFluidMesh(FSI_config)
-+ self.MPIPrint('\nPerforming static mesh deformation...\n')
-+ self.setFluidInterfaceVarCoord(FluidSolver)
-+ FluidSolver.StaticMeshUpdate()
-+ self.FSIIter += 1
-
- self.MPIBarrier()
-
-- self.MPIPrint('\nBGS is converged (strong coupling)')
-- self.MPIPrint(' ')
-- self.MPIPrint('*************************')
-- self.MPIPrint('* End FSI computation *')
-- self.MPIPrint('*************************')
-- self.MPIPrint(' ')
-+ self.MPIPrint('\nBGS is converged (strong coupling)')
-+ self.MPIPrint(' ')
-+ self.MPIPrint('*************************')
-+ self.MPIPrint('* End FSI computation *')
-+ self.MPIPrint('*************************')
-+ self.MPIPrint(' ')
-diff -Naur old/SU2_PY/FSI/PitchPlungeAirfoilStructuralTester.py new/SU2_PY/FSI/PitchPlungeAirfoilStructuralTester.py
---- old/SU2_PY/FSI/PitchPlungeAirfoilStructuralTester.py 2020-05-01 19:09:18.000000000 +0300
-+++ new/SU2_PY/FSI/PitchPlungeAirfoilStructuralTester.py 2020-05-10 16:17:07.000000000 +0300
-@@ -174,9 +174,9 @@
-
- with open(self.Config_file) as configfile:
- while 1:
-- line = configfile.readline()
-- if not line:
-- break
-+ line = configfile.readline()
-+ if not line:
-+ break
-
- # remove line returns
- line = line.strip('\r\n')
-@@ -189,41 +189,41 @@
- this_value = line[1].strip()
-
- for case in switch(this_param):
-- #integer values
-- #if case("NB_FSI_ITER") :
-- #self.Config[this_param] = int(this_value)
-- #break
--
-- #float values
-- if case("DELTA_T") : pass
-- if case("START_TIME") : pass
-- if case("STOP_TIME") : pass
-- if case("SPRING_MASS") : pass
-- if case("INERTIA_FLEXURAL") : pass
-- if case("SPRING_STIFFNESS") : pass
-- if case("SPRING_DAMPING") : pass
-- if case("TORSIONAL_STIFFNESS") : pass
-- if case("TORSIONAL_DAMPING") : pass
-- if case("CORD") : pass
-- if case("FLEXURAL_AXIS") : pass
-- if case("GRAVITY_CENTER") : pass
-- if case("INITIAL_DISP") : pass
-- if case("INITIAL_ANGLE") : pass
-- if case("RHO") :
-- self.Config[this_param] = float(this_value)
-- break
--
-- #string values
-- if case("TIME_MARCHING") : pass
-- if case("MESH_FILE") : pass
-- if case("CSD_SOLVER") : pass
-- if case("MOVING_MARKER") : pass
-- if case("STRUCT_TYPE") :
-- self.Config[this_param] = this_value
-- break
-+ #integer values
-+ #if case("NB_FSI_ITER") :
-+ #self.Config[this_param] = int(this_value)
-+ #break
-+
-+ #float values
-+ if case("DELTA_T") : pass
-+ if case("START_TIME") : pass
-+ if case("STOP_TIME") : pass
-+ if case("SPRING_MASS") : pass
-+ if case("INERTIA_FLEXURAL") : pass
-+ if case("SPRING_STIFFNESS") : pass
-+ if case("SPRING_DAMPING") : pass
-+ if case("TORSIONAL_STIFFNESS") : pass
-+ if case("TORSIONAL_DAMPING") : pass
-+ if case("CORD") : pass
-+ if case("FLEXURAL_AXIS") : pass
-+ if case("GRAVITY_CENTER") : pass
-+ if case("INITIAL_DISP") : pass
-+ if case("INITIAL_ANGLE") : pass
-+ if case("RHO") :
-+ self.Config[this_param] = float(this_value)
-+ break
-+
-+ #string values
-+ if case("TIME_MARCHING") : pass
-+ if case("MESH_FILE") : pass
-+ if case("CSD_SOLVER") : pass
-+ if case("MOVING_MARKER") : pass
-+ if case("STRUCT_TYPE") :
-+ self.Config[this_param] = this_value
-+ break
-
-- if case():
-- print(this_param + " is an invalid option !")
-+ if case():
-+ print(this_param + " is an invalid option !")
- break
-
- def __readSU2Mesh(self):
-@@ -233,78 +233,78 @@
- print('Opened mesh file ' + self.Mesh_file + '.')
- while 1:
- line = meshfile.readline()
-- if not line:
-- break
-+ if not line:
-+ break
-
-- pos = line.find('NDIM')
-- if pos != -1:
-- line = line.strip('\r\n')
-+ pos = line.find('NDIM')
-+ if pos != -1:
-+ line = line.strip('\r\n')
- line = line.split("=",1)
-- self.nDim = int(line[1])
-- continue
--
-- pos = line.find('NELEM')
-- if pos != -1:
-- line = line.strip('\r\n')
-+ self.nDim = int(line[1])
-+ continue
-+
-+ pos = line.find('NELEM')
-+ if pos != -1:
-+ line = line.strip('\r\n')
- line = line.split("=",1)
-- self.nElem = int(line[1])
-- continue
-+ self.nElem = int(line[1])
-+ continue
-
-- pos = line.find('NPOIN')
-- if pos != -1:
-- line = line.strip('\r\n')
-+ pos = line.find('NPOIN')
-+ if pos != -1:
-+ line = line.strip('\r\n')
- line = line.split("=",1)
-- self.nPoint = int(line[1])
-+ self.nPoint = int(line[1])
- for iPoint in range(self.nPoint):
-- self.node.append(Point())
-- line = meshfile.readline()
-- line = line.strip('\r\n')
-- line = line.split(' ',self.nDim)
-- x = float(line[0])
-- y = float(line[1])
-+ self.node.append(Point())
-+ line = meshfile.readline()
-+ line = line.strip('\r\n')
-+ line = line.split(' ',self.nDim)
-+ x = float(line[0])
-+ y = float(line[1])
- z = 0.0
-- if self.nDim == 3:
-- z = float(line[2])
-- self.node[iPoint].SetCoord((x,y,z))
-+ if self.nDim == 3:
-+ z = float(line[2])
-+ self.node[iPoint].SetCoord((x,y,z))
- self.node[iPoint].SetCoord0((x,y,z))
-- self.node[iPoint].SetCoord_n((x,y,z))
-- continue
-+ self.node[iPoint].SetCoord_n((x,y,z))
-+ continue
-
-- pos = line.find('NMARK')
-- if pos != -1:
-- line = line.strip('\r\n')
-+ pos = line.find('NMARK')
-+ if pos != -1:
-+ line = line.strip('\r\n')
- line = line.split("=",1)
-- self.nMarker = int(line[1])
-- continue
-+ self.nMarker = int(line[1])
-+ continue
-
-- pos = line.find('MARKER_TAG')
-- if pos != -1:
-- line = line.strip('\r\n')
-- line = line.replace(" ", "")
-+ pos = line.find('MARKER_TAG')
-+ if pos != -1:
-+ line = line.strip('\r\n')
-+ line = line.replace(" ", "")
- line = line.split("=",1)
-- markerTag = line[1]
-- if markerTag == self.FSI_marker:
-- self.markers[markerTag] = []
-- line = meshfile.readline()
-- line = line.strip('\r\n')
-- line = line.split("=",1)
-- nElem = int(line[1])
-- for iElem in range(nElem):
-- line = meshfile.readline()
-- line = line.strip('\r\n')
-- line = line.split(' ',1)
-- elemType = int(line[0])
-- if elemType == 3:
-- nodes = line[1].split(' ', 1)
-- if not int(nodes[0]) in self.markers[markerTag]:
-- self.markers[markerTag].append(int(nodes[0]))
-- if not int(nodes[1]) in self.markers[markerTag]:
-- self.markers[markerTag].append(int(nodes[1]))
-- else:
-- print("Element type {} is not recognized !!".format(elemType))
-- continue
-- else:
-- continue
-+ markerTag = line[1]
-+ if markerTag == self.FSI_marker:
-+ self.markers[markerTag] = []
-+ line = meshfile.readline()
-+ line = line.strip('\r\n')
-+ line = line.split("=",1)
-+ nElem = int(line[1])
-+ for iElem in range(nElem):
-+ line = meshfile.readline()
-+ line = line.strip('\r\n')
-+ line = line.split(' ',1)
-+ elemType = int(line[0])
-+ if elemType == 3:
-+ nodes = line[1].split(' ', 1)
-+ if not int(nodes[0]) in self.markers[markerTag]:
-+ self.markers[markerTag].append(int(nodes[0]))
-+ if not int(nodes[1]) in self.markers[markerTag]:
-+ self.markers[markerTag].append(int(nodes[1]))
-+ else:
-+ print("Element type {} is not recognized !!".format(elemType))
-+ continue
-+ else:
-+ continue
-
- print("Number of dimensions: {}".format(self.nDim))
- print("Number of elements: {}".format(self.nElem))
-@@ -441,23 +441,23 @@
- Coord_n = self.node[iPoint].GetCoord_n()
-
- if self.Unsteady:
-- r = Coord_n - self.centerOfRotation_n
-- else:
-- r = Coord - self.centerOfRotation
-+ r = Coord_n - self.centerOfRotation_n
-+ else:
-+ r = Coord - self.centerOfRotation
-
-- rotCoord = rotMatrix.dot(r)
-+ rotCoord = rotMatrix.dot(r)
-
- newCoord = newCenter + rotCoord
- newVel[0] = Centerdot[0]+psidot*(newCoord[1]-newCenter[1])
-- newVel[1] = Centerdot[1]-psidot*(newCoord[0]-newCenter[0])
-- newVel[2] = Centerdot[2]+0.0
-+ newVel[1] = Centerdot[1]-psidot*(newCoord[0]-newCenter[0])
-+ newVel[2] = Centerdot[2]+0.0
-
- self.node[iPoint].SetCoord((newCoord[0], newCoord[1], newCoord[2]))
- self.node[iPoint].SetVel((newVel[0], newVel[1], newVel[2]))
-
-- if initialize:
-- self.node[iPoint].SetCoord_n((newCoord[0], newCoord[1], newCoord[2]))
-- self.node[iPoint].SetVel_n((newVel[0], newVel[1], newVel[2]))
-+ if initialize:
-+ self.node[iPoint].SetCoord_n((newCoord[0], newCoord[1], newCoord[2]))
-+ self.node[iPoint].SetVel_n((newVel[0], newVel[1], newVel[2]))
-
- self.centerOfRotation = np.copy(newCenter)
-
-diff -Naur old/SU2_PY/FSI/io/FSI_config.py new/SU2_PY/FSI/io/FSI_config.py
---- old/SU2_PY/FSI/io/FSI_config.py 2020-05-01 19:09:18.000000000 +0300
-+++ new/SU2_PY/FSI/io/FSI_config.py 2020-05-10 16:17:07.000000000 +0300
-@@ -58,23 +58,23 @@
- self.readConfig()
-
- def __str__(self):
-- tempString = str()
-- for key, value in self._ConfigContent.items():
-- tempString += "{} = {}\n".format(key,value)
-- return tempString
-+ tempString = str()
-+ for key, value in self._ConfigContent.items():
-+ tempString += "{} = {}\n".format(key,value)
-+ return tempString
-
- def __getitem__(self,key):
-- return self._ConfigContent[key]
-+ return self._ConfigContent[key]
-
- def __setitem__(self, key, value):
-- self._ConfigContent[key] = value
-+ self._ConfigContent[key] = value
-
- def readConfig(self):
- input_file = open(self.ConfigFileName)
- while 1:
-- line = input_file.readline()
-- if not line:
-- break
-+ line = input_file.readline()
-+ if not line:
-+ break
- # remove line returns
- line = line.strip('\r\n')
- # make sure it has useful data
-@@ -86,46 +86,46 @@
- this_value = line[1].strip()
-
- for case in switch(this_param):
-- #integer values
-- if case("NDIM") : pass
-- #if case("MESH_DEF_LIN_ITER") : pass
-- #if case("MESH_DEF_NONLIN_ITER") : pass
-- if case("RESTART_ITER") : pass
-- if case("NB_EXT_ITER") : pass
-- if case("NB_FSI_ITER") :
-- self._ConfigContent[this_param] = int(this_value)
-- break
-+ #integer values
-+ if case("NDIM") : pass
-+ #if case("MESH_DEF_LIN_ITER") : pass
-+ #if case("MESH_DEF_NONLIN_ITER") : pass
-+ if case("RESTART_ITER") : pass
-+ if case("NB_EXT_ITER") : pass
-+ if case("NB_FSI_ITER") :
-+ self._ConfigContent[this_param] = int(this_value)
-+ break
-
-- #float values
-+ #float values
- if case("RBF_RADIUS") : pass
-- if case("AITKEN_PARAM") : pass
-- if case("START_TIME") : pass
-- if case("UNST_TIMESTEP") : pass
-- if case("UNST_TIME") : pass
-- if case("FSI_TOLERANCE") :
-- self._ConfigContent[this_param] = float(this_value)
-- break
--
-- #string values
-- if case("CFD_CONFIG_FILE_NAME") : pass
-- if case("CSD_SOLVER") : pass
-- if case("CSD_CONFIG_FILE_NAME") : pass
-- if case("RESTART_SOL") : pass
-- if case("MATCHING_MESH") : pass
-+ if case("AITKEN_PARAM") : pass
-+ if case("START_TIME") : pass
-+ if case("UNST_TIMESTEP") : pass
-+ if case("UNST_TIME") : pass
-+ if case("FSI_TOLERANCE") :
-+ self._ConfigContent[this_param] = float(this_value)
-+ break
-+
-+ #string values
-+ if case("CFD_CONFIG_FILE_NAME") : pass
-+ if case("CSD_SOLVER") : pass
-+ if case("CSD_CONFIG_FILE_NAME") : pass
-+ if case("RESTART_SOL") : pass
-+ if case("MATCHING_MESH") : pass
- if case("MESH_INTERP_METHOD") : pass
-- if case("DISP_PRED") : pass
-- if case("AITKEN_RELAX") : pass
-- if case("TIME_MARCHING") : pass
-- if case("INTERNAL_FLOW") :
-- #if case("MESH_DEF_METHOD") : pass
-- self._ConfigContent[this_param] = this_value
-- break
--
-- if case():
-- print(this_param + " is an invalid option !")
-- break
-- #end for
--
-+ if case("DISP_PRED") : pass
-+ if case("AITKEN_RELAX") : pass
-+ if case("TIME_MARCHING") : pass
-+ if case("INTERNAL_FLOW") :
-+ #if case("MESH_DEF_METHOD") : pass
-+ self._ConfigContent[this_param] = this_value
-+ break
-+
-+ if case():
-+ print(this_param + " is an invalid option !")
-+ break
-+ #end for
-+
-
-
- #def dump()
-diff -Naur old/SU2_PY/SU2/util/filter_adjoint.py new/SU2_PY/SU2/util/filter_adjoint.py
---- old/SU2_PY/SU2/util/filter_adjoint.py 2020-05-01 19:09:18.000000000 +0300
-+++ new/SU2_PY/SU2/util/filter_adjoint.py 2020-05-10 16:17:07.000000000 +0300
-@@ -179,7 +179,7 @@
- Sens_smoother = smooth( S_clip, Sens_smooth, smth_len , 'blackman' )
- Sens_filter = Sens_smooth + (Sens_smooth - Sens_smoother) # sharpener
- else:
-- raise Exception, 'unknown filter type'
-+ raise Exception('unknown filter type')
-
- # --------------------------------------------
- # PLOTTING
-@@ -472,10 +472,10 @@
- """
-
- if x.ndim != 1:
-- raise ValueError, "smooth only accepts 1 dimension arrays."
-+ raise ValueError("smooth only accepts 1 dimension arrays.")
-
- if not window in ['flat', 'hanning', 'hamming', 'bartlett', 'blackman']:
-- raise ValueError, "Window is not of 'flat', 'hanning', 'hamming', 'bartlett', 'blackman'"
-+ raise ValueError("Window is not of 'flat', 'hanning', 'hamming', 'bartlett', 'blackman'")
-
- # interpolate to constant time sample width
- min_dt = np.min( np.diff(t) )
-diff -Naur old/SU2_PY/compute_uncertainty.py new/SU2_PY/compute_uncertainty.py
---- old/SU2_PY/compute_uncertainty.py 2020-05-01 19:09:18.000000000 +0300
-+++ new/SU2_PY/compute_uncertainty.py 2020-05-10 16:17:07.000000000 +0300
-@@ -66,13 +66,13 @@
-
- # perform eigenvalue perturbations
- for comp in range(1,4):
-- print "\n\n =================== Performing " + str(comp) + " Component Perturbation =================== \n\n"
-+ print('\n\n =================== Performing ' + str(comp) + ' Component Perturbation =================== \n\n')
-
- # make copies
- konfig = copy.deepcopy(config)
- ztate = copy.deepcopy(state)
-
-- # set componentality
-+ # set componentality
- konfig.UQ_COMPONENT = comp
-
- # send output to a folder
-@@ -85,14 +85,14 @@
- # run su2
- info = SU2.run.CFD(konfig)
- ztate.update(info)
--
-- # Solution merging
-- konfig.SOLUTION_FILENAME = konfig.RESTART_FILENAME
-- info = SU2.run.merge(konfig)
-- ztate.update(info)
-+
-+ # Solution merging
-+ konfig.SOLUTION_FILENAME = konfig.RESTART_FILENAME
-+ info = SU2.run.merge(konfig)
-+ ztate.update(info)
-
-
-- print "\n\n =================== Performing p1c1 Component Perturbation =================== \n\n"
-+ print('\n\n =================== Performing p1c1 Component Perturbation =================== \n\n')
-
- # make copies
- konfig = copy.deepcopy(config)
-@@ -118,7 +118,7 @@
- info = SU2.run.merge(konfig)
- state.update(info)
-
-- print "\n\n =================== Performing p1c2 Component Perturbation =================== \n\n"
-+ print('\n\n =================== Performing p1c2 Component Perturbation =================== \n\n')
-
- # make copies
- konfig = copy.deepcopy(config)
-diff -Naur old/SU2_PY/fsi_computation.py new/SU2_PY/fsi_computation.py
---- old/SU2_PY/fsi_computation.py 2020-05-01 19:09:18.000000000 +0300
-+++ new/SU2_PY/fsi_computation.py 2020-05-10 16:17:07.000000000 +0300
-@@ -74,9 +74,9 @@
- if myid == rootProcess:
- if os.getcwd() not in sys.path:
- sys.path.append(os.getcwd())
-- print("Setting working directory : {}".format(os.getcwd()))
-- else:
-- print("Working directory is set to {}".format(os.getcwd()))
-+ print("Setting working directory : {}".format(os.getcwd()))
-+ else:
-+ print("Working directory is set to {}".format(os.getcwd()))
-
- # starts timer
- start = timer.time()
diff --git a/sci-physics/SU2/files/SU2-7.0.6-fix-env.patch b/sci-physics/SU2/files/SU2-7.0.6-fix-env.patch
deleted file mode 100644
index baf7955d00..0000000000
--- a/sci-physics/SU2/files/SU2-7.0.6-fix-env.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur old_env/UnitTests/meson.build new_env/UnitTests/meson.build
---- old_env/UnitTests/meson.build 2020-06-15 17:03:43.000000000 +0300
-+++ new_env/UnitTests/meson.build 2020-06-15 17:04:35.000000000 +0300
-@@ -26,7 +26,7 @@
- test_driver = executable(
- 'test_driver',
- unit_test_files,
-- install : true,
-+ install : false,
- dependencies : [su2_cfd_dep, common_dep, su2_deps, catch2_dep],
- cpp_args: ['-fPIC', default_warning_flags, su2_cpp_args]
- )
diff --git a/sci-physics/SU2/files/SU2-7.0.7-fix-env.patch b/sci-physics/SU2/files/SU2-7.0.7-fix-env.patch
deleted file mode 100644
index baf7955d00..0000000000
--- a/sci-physics/SU2/files/SU2-7.0.7-fix-env.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur old_env/UnitTests/meson.build new_env/UnitTests/meson.build
---- old_env/UnitTests/meson.build 2020-06-15 17:03:43.000000000 +0300
-+++ new_env/UnitTests/meson.build 2020-06-15 17:04:35.000000000 +0300
-@@ -26,7 +26,7 @@
- test_driver = executable(
- 'test_driver',
- unit_test_files,
-- install : true,
-+ install : false,
- dependencies : [su2_cfd_dep, common_dep, su2_deps, catch2_dep],
- cpp_args: ['-fPIC', default_warning_flags, su2_cpp_args]
- )
diff --git a/sci-physics/SU2/files/SU2-7.0.7-fix-python-optimize.patch b/sci-physics/SU2/files/SU2-7.0.7-fix-python-optimize.patch
deleted file mode 100644
index 0b35037c19..0000000000
--- a/sci-physics/SU2/files/SU2-7.0.7-fix-python-optimize.patch
+++ /dev/null
@@ -1,2212 +0,0 @@
-diff -Naur old/SU2_PY/FSI/FSIInterface.py new/SU2_PY/FSI/FSIInterface.py
---- old/SU2_PY/FSI/FSIInterface.py 2020-05-01 19:09:18.000000000 +0300
-+++ new/SU2_PY/FSI/FSIInterface.py 2020-05-10 16:17:07.000000000 +0300
-@@ -6,8 +6,8 @@
- # \version 7.0.7 "Blackbird"
- #
- # SU2 Project Website: https://su2code.github.io
--#
--# The SU2 Project is maintained by the SU2 Foundation
-+#
-+# The SU2 Project is maintained by the SU2 Foundation
- # (http://su2foundation.org)
- #
- # Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md)
-@@ -16,7 +16,7 @@
- # modify it under the terms of the GNU Lesser General Public
- # License as published by the Free Software Foundation; either
- # version 2.1 of the License, or (at your option) any later version.
--#
-+#
- # SU2 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
-@@ -42,19 +42,19 @@
- # ----------------------------------------------------------------------
-
- class Interface:
-- """
-+ """
- FSI interface class that handles fluid/solid solvers synchronisation and communication
- """
--
-+
- def __init__(self, FSI_config, FluidSolver, SolidSolver, have_MPI):
-- """
-- Class constructor. Declare some variables and do some screen outputs.
-- """
--
-+ """
-+ Class constructor. Declare some variables and do some screen outputs.
-+ """
-+
- if have_MPI == True:
- from mpi4py import MPI
- self.MPI = MPI
-- self.comm = MPI.COMM_WORLD #MPI World communicator
-+ self.comm = MPI.COMM_WORLD #MPI World communicator
- self.have_MPI = True
- myid = self.comm.Get_rank()
- else:
-@@ -62,42 +62,42 @@
- self.have_MPI = False
- myid = 0
-
-- self.rootProcess = 0 #the root process is chosen to be MPI rank = 0
-+ self.rootProcess = 0 #the root process is chosen to be MPI rank = 0
-
-- self.nDim = FSI_config['NDIM'] #problem dimension
-+ self.nDim = FSI_config['NDIM'] #problem dimension
-
-- self.haveFluidSolver = False #True if the fluid solver is initialized on the current rank
-- self.haveSolidSolver = False #True if the solid solver is initialized on the current rank
-- self.haveFluidInterface = False #True if the current rank owns at least one fluid interface node
-- self.haveSolidInterface = False #True if the current rank owns at least one solid interface node
-+ self.haveFluidSolver = False #True if the fluid solver is initialized on the current rank
-+ self.haveSolidSolver = False #True if the solid solver is initialized on the current rank
-+ self.haveFluidInterface = False #True if the current rank owns at least one fluid interface node
-+ self.haveSolidInterface = False #True if the current rank owns at least one solid interface node
-
-- self.fluidSolverProcessors = list() #list of partitions where the fluid solver is initialized
-- self.solidSolverProcessors = list() #list of partitions where the solid solver is initialized
-+ self.fluidSolverProcessors = list() #list of partitions where the fluid solver is initialized
-+ self.solidSolverProcessors = list() #list of partitions where the solid solver is initialized
- self.fluidInterfaceProcessors = list() #list of partitions where there are fluid interface nodes
-- self.solidInterfaceProcessors = list() #list of partitions where there are solid interface nodes
-+ self.solidInterfaceProcessors = list() #list of partitions where there are solid interface nodes
-
-- self.fluidInterfaceIdentifier = None #object that can identify the f/s interface within the fluid solver
-- self.solidInterfaceIdentifier = None #object that can identify the f/s interface within the solid solver
-+ self.fluidInterfaceIdentifier = None #object that can identify the f/s interface within the fluid solver
-+ self.solidInterfaceIdentifier = None #object that can identify the f/s interface within the solid solver
-
-- self.fluidGlobalIndexRange = {} #contains the global FSI indexing of each fluid interface node for all partitions
-- self.solidGlobalIndexRange = {} #contains the global FSI indexing of each solid interface node for all partitions
-+ self.fluidGlobalIndexRange = {} #contains the global FSI indexing of each fluid interface node for all partitions
-+ self.solidGlobalIndexRange = {} #contains the global FSI indexing of each solid interface node for all partitions
-
-- self.FluidHaloNodeList = {} #contains the the indices (fluid solver indexing) of the halo nodes for each partition
-- self.fluidIndexing = {} #links between the fluid solver indexing and the FSI indexing for the interface nodes
-- self.SolidHaloNodeList = {} #contains the the indices (solid solver indexing) of the halo nodes for each partition
-- self.solidIndexing = {} #links between the solid solver indexing and the FSI indexing for the interface nodes
--
-- self.nLocalFluidInterfaceNodes = 0 #number of nodes (halo nodes included) on the fluid interface, on each partition
-- self.nLocalFluidInterfaceHaloNode = 0 #number of halo nodes on the fluid intrface, on each partition
-- self.nLocalFluidInterfacePhysicalNodes = 0 #number of physical (= non halo) nodes on the fluid interface, on each partition
-- self.nFluidInterfaceNodes = 0 #number of nodes on the fluid interface, sum over all the partitions
-- self.nFluidInterfacePhysicalNodes = 0 #number of physical nodes on the fluid interface, sum over all partitions
--
-- self.nLocalSolidInterfaceNodes = 0 #number of physical nodes on the solid interface, on each partition
-- self.nLocalSolidInterfaceHaloNode = 0 #number of halo nodes on the solid intrface, on each partition
-- self.nLocalSolidInterfacePhysicalNodes = 0 #number of physical (= non halo) nodes on the solid interface, on each partition
-- self.nSolidInterfaceNodes = 0 #number of nodes on the solid interface, sum over all partitions
-- self.nSolidInterfacePhysicalNodes = 0 #number of physical nodes on the solid interface, sum over all partitions
-+ self.FluidHaloNodeList = {} #contains the the indices (fluid solver indexing) of the halo nodes for each partition
-+ self.fluidIndexing = {} #links between the fluid solver indexing and the FSI indexing for the interface nodes
-+ self.SolidHaloNodeList = {} #contains the the indices (solid solver indexing) of the halo nodes for each partition
-+ self.solidIndexing = {} #links between the solid solver indexing and the FSI indexing for the interface nodes
-+
-+ self.nLocalFluidInterfaceNodes = 0 #number of nodes (halo nodes included) on the fluid interface, on each partition
-+ self.nLocalFluidInterfaceHaloNode = 0 #number of halo nodes on the fluid intrface, on each partition
-+ self.nLocalFluidInterfacePhysicalNodes = 0 #number of physical (= non halo) nodes on the fluid interface, on each partition
-+ self.nFluidInterfaceNodes = 0 #number of nodes on the fluid interface, sum over all the partitions
-+ self.nFluidInterfacePhysicalNodes = 0 #number of physical nodes on the fluid interface, sum over all partitions
-+
-+ self.nLocalSolidInterfaceNodes = 0 #number of physical nodes on the solid interface, on each partition
-+ self.nLocalSolidInterfaceHaloNode = 0 #number of halo nodes on the solid intrface, on each partition
-+ self.nLocalSolidInterfacePhysicalNodes = 0 #number of physical (= non halo) nodes on the solid interface, on each partition
-+ self.nSolidInterfaceNodes = 0 #number of nodes on the solid interface, sum over all partitions
-+ self.nSolidInterfacePhysicalNodes = 0 #number of physical nodes on the solid interface, sum over all partitions
-
- if FSI_config['MATCHING_MESH'] == 'NO' and (FSI_config['MESH_INTERP_METHOD'] == 'RBF' or FSI_config['MESH_INTERP_METHOD'] == 'TPS'):
- self.MappingMatrixA = None
-@@ -106,83 +106,83 @@
- self.MappingMatrixB_T = None
- self.d_RBF = self.nDim+1
- else:
-- self.MappingMatrix = None #interpolation/mapping matrix for meshes interpolation/mapping
-- self.MappingMatrix_T = None #transposed interpolation/mapping matrix for meshes interpolation/mapping
-+ self.MappingMatrix = None #interpolation/mapping matrix for meshes interpolation/mapping
-+ self.MappingMatrix_T = None #transposed interpolation/mapping matrix for meshes interpolation/mapping
- self.d_RBF = 0
-
-- self.localFluidInterface_array_X_init = None #initial fluid interface position on each partition (used for the meshes mapping)
-+ self.localFluidInterface_array_X_init = None #initial fluid interface position on each partition (used for the meshes mapping)
- self.localFluidInterface_array_Y_init = None
- self.localFluidInterface_array_Z_init = None
-
-- self.haloNodesPositionsInit = {} #initial position of the halo nodes (fluid side only)
-+ self.haloNodesPositionsInit = {} #initial position of the halo nodes (fluid side only)
-
-- self.solidInterface_array_DispX = None #solid interface displacement
-+ self.solidInterface_array_DispX = None #solid interface displacement
- self.solidInterface_array_DispY = None
- self.solidInterface_array_DispZ = None
-
-- self.solidInterfaceResidual_array_X = None #solid interface position residual
-+ self.solidInterfaceResidual_array_X = None #solid interface position residual
- self.solidInterfaceResidual_array_Y = None
- self.solidInterfaceResidual_array_Z = None
-
-- self.solidInterfaceResidualnM1_array_X = None #solid interface position residual at the previous BGS iteration
-+ self.solidInterfaceResidualnM1_array_X = None #solid interface position residual at the previous BGS iteration
- self.solidInterfaceResidualnM1_array_Y = None
- self.solidInterfaceResidualnM1_array_Z = None
--
-- self.fluidInterface_array_DispX = None #fluid interface displacement
-+
-+ self.fluidInterface_array_DispX = None #fluid interface displacement
- self.fluidInterface_array_DispY = None
- self.fluidInterface_array_DispZ = None
-
-- self.fluidLoads_array_X = None #loads on the fluid side of the f/s interface
-+ self.fluidLoads_array_X = None #loads on the fluid side of the f/s interface
- self.fluidLoads_array_Y = None
- self.fluidLoads_array_Z = None
-
-- self.solidLoads_array_X = None #loads on the solid side of the f/s interface
-+ self.solidLoads_array_X = None #loads on the solid side of the f/s interface
- self.solidLoads_array_Y = None
- self.solidLoads_array_Z = None
-
-- self.aitkenParam = FSI_config['AITKEN_PARAM'] #relaxation parameter for the BGS method
-- self.FSIIter = 0 #current FSI iteration
-- self.unsteady = False #flag for steady or unsteady simulation (default is steady)
--
-- # ---Some screen output ---
-- self.MPIPrint('Fluid solver : SU2_CFD')
-- self.MPIPrint('Solid solver : {}'.format(FSI_config['CSD_SOLVER']))
-+ self.aitkenParam = FSI_config['AITKEN_PARAM'] #relaxation parameter for the BGS method
-+ self.FSIIter = 0 #current FSI iteration
-+ self.unsteady = False #flag for steady or unsteady simulation (default is steady)
-+
-+ # ---Some screen output ---
-+ self.MPIPrint('Fluid solver : SU2_CFD')
-+ self.MPIPrint('Solid solver : {}'.format(FSI_config['CSD_SOLVER']))
-
-- if FSI_config['TIME_MARCHING'] == 'YES':
-+ if FSI_config['TIME_MARCHING'] == 'YES':
- self.MPIPrint('Unsteady coupled simulation with physical time step : {} s'.format(FSI_config['UNST_TIMESTEP']))
- self.unsteady = True
-- else:
-- self.MPIPrint('Steady coupled simulation')
-+ else:
-+ self.MPIPrint('Steady coupled simulation')
-
-- if FSI_config['MATCHING_MESH'] == 'YES':
-- self.MPIPrint('Matching fluid-solid interface')
-- else:
-+ if FSI_config['MATCHING_MESH'] == 'YES':
-+ self.MPIPrint('Matching fluid-solid interface')
-+ else:
- if FSI_config['MESH_INTERP_METHOD'] == 'TPS':
-- self.MPIPrint('Non matching fluid-solid interface with Thin Plate Spline interpolation')
-+ self.MPIPrint('Non matching fluid-solid interface with Thin Plate Spline interpolation')
- elif FSI_config['MESH_INTERP_METHOD'] == 'RBF':
- self.MPIPrint('Non matching fluid-solid interface with Radial Basis Function interpolation')
- self.RBF_rad = FSI_config['RBF_RADIUS']
-- self.MPIPrint('Radius value : {}'.format(self.RBF_rad))
-+ self.MPIPrint('Radius value : {}'.format(self.RBF_rad))
- else:
-- self.MPIPrint('Non matching fluid-solid interface with Nearest Neighboor interpolation')
-+ self.MPIPrint('Non matching fluid-solid interface with Nearest Neighboor interpolation')
-
-- self.MPIPrint('Solid predictor : {}'.format(FSI_config['DISP_PRED']))
-+ self.MPIPrint('Solid predictor : {}'.format(FSI_config['DISP_PRED']))
-
-- self.MPIPrint('Maximum number of FSI iterations : {}'.format(FSI_config['NB_FSI_ITER']))
-+ self.MPIPrint('Maximum number of FSI iterations : {}'.format(FSI_config['NB_FSI_ITER']))
-
-- self.MPIPrint('FSI tolerance : {}'.format(FSI_config['FSI_TOLERANCE']))
-+ self.MPIPrint('FSI tolerance : {}'.format(FSI_config['FSI_TOLERANCE']))
-
-- if FSI_config['AITKEN_RELAX'] == 'STATIC':
-- self.MPIPrint('Static Aitken under-relaxation with constant parameter {}'.format(FSI_config['AITKEN_PARAM']))
-- elif FSI_config['AITKEN_RELAX'] == 'DYNAMIC':
-- self.MPIPrint('Dynamic Aitken under-relaxation with initial parameter {}'.format(FSI_config['AITKEN_PARAM']))
-- else:
-- self.MPIPrint('No Aitken under-relaxation')
-+ if FSI_config['AITKEN_RELAX'] == 'STATIC':
-+ self.MPIPrint('Static Aitken under-relaxation with constant parameter {}'.format(FSI_config['AITKEN_PARAM']))
-+ elif FSI_config['AITKEN_RELAX'] == 'DYNAMIC':
-+ self.MPIPrint('Dynamic Aitken under-relaxation with initial parameter {}'.format(FSI_config['AITKEN_PARAM']))
-+ else:
-+ self.MPIPrint('No Aitken under-relaxation')
-
- self.MPIPrint('FSI interface is set')
-
- def MPIPrint(self, message):
-- """
-+ """
- Print a message on screen only from the master process.
- """
-
-@@ -198,28 +198,28 @@
- """
- Perform a synchronization barrier in case of parallel run with MPI.
- """
--
-+
- if self.have_MPI == True:
- self.comm.barrier()
-
- def connect(self, FSI_config, FluidSolver, SolidSolver):
-- """
-- Connection between solvers.
-- Creates the communication support between the two solvers.
-- Gets information about f/s interfaces from the two solvers.
-- """
-+ """
-+ Connection between solvers.
-+ Creates the communication support between the two solvers.
-+ Gets information about f/s interfaces from the two solvers.
-+ """
- if self.have_MPI == True:
- myid = self.comm.Get_rank()
-- MPIsize = self.comm.Get_size()
-+ MPIsize = self.comm.Get_size()
- else:
- myid = 0
- MPIsize = 1
--
-- # --- Identify the fluid and solid interfaces and store the number of nodes on both sides (and for each partition) ---
-+
-+ # --- Identify the fluid and solid interfaces and store the number of nodes on both sides (and for each partition) ---
- self.fluidInterfaceIdentifier = None
- self.nLocalFluidInterfaceNodes = 0
- if FluidSolver != None:
-- print('Fluid solver is initialized on process {}'.format(myid))
-+ print('Fluid solver is initialized on process {}'.format(myid))
- self.haveFluidSolver = True
- allMovingMarkersTags = FluidSolver.GetAllMovingMarkersTag()
- allMarkersID = FluidSolver.GetAllBoundaryMarkers()
-@@ -229,23 +229,23 @@
- if allMovingMarkersTags[0] in allMarkersID.keys():
- self.fluidInterfaceIdentifier = allMarkersID[allMovingMarkersTags[0]]
- if self.fluidInterfaceIdentifier != None:
-- self.nLocalFluidInterfaceNodes = FluidSolver.GetNumberVertices(self.fluidInterfaceIdentifier)
-- if self.nLocalFluidInterfaceNodes != 0:
-+ self.nLocalFluidInterfaceNodes = FluidSolver.GetNumberVertices(self.fluidInterfaceIdentifier)
-+ if self.nLocalFluidInterfaceNodes != 0:
- self.haveFluidInterface = True
-- print('Number of interface fluid nodes (halo nodes included) on proccess {} : {}'.format(myid,self.nLocalFluidInterfaceNodes))
-- else:
-- pass
-+ print('Number of interface fluid nodes (halo nodes included) on proccess {} : {}'.format(myid,self.nLocalFluidInterfaceNodes))
-+ else:
-+ pass
-
-- if SolidSolver != None:
-- print('Solid solver is initialized on process {}'.format(myid))
-+ if SolidSolver != None:
-+ print('Solid solver is initialized on process {}'.format(myid))
- self.haveSolidSolver = True
-- self.solidInterfaceIdentifier = SolidSolver.getFSIMarkerID()
-- self.nLocalSolidInterfaceNodes = SolidSolver.getNumberOfSolidInterfaceNodes(self.solidInterfaceIdentifier)
-- if self.nLocalSolidInterfaceNodes != 0:
-+ self.solidInterfaceIdentifier = SolidSolver.getFSIMarkerID()
-+ self.nLocalSolidInterfaceNodes = SolidSolver.getNumberOfSolidInterfaceNodes(self.solidInterfaceIdentifier)
-+ if self.nLocalSolidInterfaceNodes != 0:
- self.haveSolidInterface = True
- print('Number of interface solid nodes (halo nodes included) on proccess {} : {}'.format(myid,self.nLocalSolidInterfaceNodes))
-- else:
-- pass
-+ else:
-+ pass
-
- # --- Exchange information about processors on which the solvers are defined and where the interface nodes are lying ---
- if self.have_MPI == True:
-@@ -266,18 +266,18 @@
- else:
- sendBufSolidInterface = np.array(int(0))
- rcvBufFluid = np.zeros(MPIsize, dtype = int)
-- rcvBufSolid = np.zeros(MPIsize, dtype = int)
-+ rcvBufSolid = np.zeros(MPIsize, dtype = int)
- rcvBufFluidInterface = np.zeros(MPIsize, dtype = int)
-- rcvBufSolidInterface = np.zeros(MPIsize, dtype = int)
-+ rcvBufSolidInterface = np.zeros(MPIsize, dtype = int)
- self.comm.Allgather(sendBufFluid, rcvBufFluid)
- self.comm.Allgather(sendBufSolid, rcvBufSolid)
- self.comm.Allgather(sendBufFluidInterface, rcvBufFluidInterface)
- self.comm.Allgather(sendBufSolidInterface, rcvBufSolidInterface)
- for iProc in range(MPIsize):
-- if rcvBufFluid[iProc] == 1:
-+ if rcvBufFluid[iProc] == 1:
- self.fluidSolverProcessors.append(iProc)
- if rcvBufSolid[iProc] == 1:
-- self.solidSolverProcessors.append(iProc)
-+ self.solidSolverProcessors.append(iProc)
- if rcvBufFluidInterface[iProc] == 1:
- self.fluidInterfaceProcessors.append(iProc)
- if rcvBufSolidInterface[iProc] == 1:
-@@ -285,19 +285,19 @@
- del sendBufFluid, sendBufSolid, rcvBufFluid, rcvBufSolid, sendBufFluidInterface, sendBufSolidInterface, rcvBufFluidInterface, rcvBufSolidInterface
- else:
- self.fluidSolverProcessors.append(0)
-- self.solidSolverProcessors.append(0)
-+ self.solidSolverProcessors.append(0)
- self.fluidInterfaceProcessors.append(0)
- self.solidInterfaceProcessors.append(0)
-
-- self.MPIBarrier()
--
-- # --- Calculate the total number of nodes at the fluid interface (sum over all the partitions) ---
-+ self.MPIBarrier()
-+
-+ # --- Calculate the total number of nodes at the fluid interface (sum over all the partitions) ---
- # Calculate the number of halo nodes on each partition
- self.nLocalFluidInterfaceHaloNode = 0
-- for iVertex in range(self.nLocalFluidInterfaceNodes):
-+ for iVertex in range(self.nLocalFluidInterfaceNodes):
- if FluidSolver.IsAHaloNode(self.fluidInterfaceIdentifier, iVertex) == True:
- GlobalIndex = FluidSolver.GetVertexGlobalIndex(self.fluidInterfaceIdentifier, iVertex)
-- self.FluidHaloNodeList[GlobalIndex] = iVertex
-+ self.FluidHaloNodeList[GlobalIndex] = iVertex
- self.nLocalFluidInterfaceHaloNode += 1
- # Calculate the number of physical (= not halo) nodes on each partition
- self.nLocalFluidInterfacePhysicalNodes = self.nLocalFluidInterfaceNodes - self.nLocalFluidInterfaceHaloNode
-@@ -308,10 +308,10 @@
-
- # Same thing for the solid part
- self.nLocalSolidInterfaceHaloNode = 0
-- #for iVertex in range(self.nLocalSolidInterfaceNodes):
-+ #for iVertex in range(self.nLocalSolidInterfaceNodes):
- #if SoliddSolver.IsAHaloNode(self.fluidInterfaceIdentifier, iVertex) == True:
- #GlobalIndex = SolidSolver.GetVertexGlobalIndex(self.solidInterfaceIdentifier, iVertex)
-- #self.SolidHaloNodeList[GlobalIndex] = iVertex
-+ #self.SolidHaloNodeList[GlobalIndex] = iVertex
- #self.nLocalSolidInterfaceHaloNode += 1
- self.nLocalSolidInterfacePhysicalNodes = self.nLocalSolidInterfaceNodes - self.nLocalSolidInterfaceHaloNode
- if self.have_MPI == True:
-@@ -323,11 +323,11 @@
- # --- Calculate the total number of nodes (with and without halo) at the fluid interface (sum over all the partitions) and broadcast the number accross all processors ---
- sendBuffHalo = np.array(int(self.nLocalFluidInterfaceNodes))
- sendBuffPhysical = np.array(int(self.nLocalFluidInterfacePhysicalNodes))
-- rcvBuffHalo = np.zeros(1, dtype=int)
-+ rcvBuffHalo = np.zeros(1, dtype=int)
- rcvBuffPhysical = np.zeros(1, dtype=int)
-- if self.have_MPI == True:
-+ if self.have_MPI == True:
- self.comm.barrier()
-- self.comm.Allreduce(sendBuffHalo,rcvBuffHalo,op=self.MPI.SUM)
-+ self.comm.Allreduce(sendBuffHalo,rcvBuffHalo,op=self.MPI.SUM)
- self.comm.Allreduce(sendBuffPhysical,rcvBuffPhysical,op=self.MPI.SUM)
- self.nFluidInterfaceNodes = rcvBuffHalo[0]
- self.nFluidInterfacePhysicalNodes = rcvBuffPhysical[0]
-@@ -339,11 +339,11 @@
- # Same thing for the solid part
- sendBuffHalo = np.array(int(self.nLocalSolidInterfaceNodes))
- sendBuffPhysical = np.array(int(self.nLocalSolidInterfacePhysicalNodes))
-- rcvBuffHalo = np.zeros(1, dtype=int)
-+ rcvBuffHalo = np.zeros(1, dtype=int)
- rcvBuffPhysical = np.zeros(1, dtype=int)
- if self.have_MPI == True:
-- self.comm.barrier()
-- self.comm.Allreduce(sendBuffHalo,rcvBuffHalo,op=self.MPI.SUM)
-+ self.comm.barrier()
-+ self.comm.Allreduce(sendBuffHalo,rcvBuffHalo,op=self.MPI.SUM)
- self.comm.Allreduce(sendBuffPhysical,rcvBuffPhysical,op=self.MPI.SUM)
- self.nSolidInterfaceNodes = rcvBuffHalo[0]
- self.nSolidInterfacePhysicalNodes = rcvBuffPhysical[0]
-@@ -375,7 +375,7 @@
- if myid in self.fluidInterfaceProcessors:
- globalIndexStart = 0
- for iProc in range(myid):
-- globalIndexStart += self.fluidPhysicalInterfaceNodesDistribution[iProc]
-+ globalIndexStart += self.fluidPhysicalInterfaceNodesDistribution[iProc]
- globalIndexStop = globalIndexStart + self.nLocalFluidInterfacePhysicalNodes-1
- else:
- globalIndexStart = 0
-@@ -387,8 +387,8 @@
- temp[0] = [0,self.nLocalFluidInterfacePhysicalNodes-1]
- self.fluidGlobalIndexRange = list()
- self.fluidGlobalIndexRange.append(temp)
--
-- # Same thing for the solid part
-+
-+ # Same thing for the solid part
- if self.have_MPI == True:
- if myid in self.solidInterfaceProcessors:
- globalIndexStart = 0
-@@ -404,14 +404,14 @@
- temp = {}
- temp[0] = [0,self.nSolidInterfacePhysicalNodes-1]
- self.solidGlobalIndexRange = list()
-- self.solidGlobalIndexRange.append(temp)
-+ self.solidGlobalIndexRange.append(temp)
-
-- self.MPIPrint('Total number of fluid interface nodes (halo nodes included) : {}'.format(self.nFluidInterfaceNodes))
-- self.MPIPrint('Total number of solid interface nodes (halo nodes included) : {}'.format(self.nSolidInterfaceNodes))
-+ self.MPIPrint('Total number of fluid interface nodes (halo nodes included) : {}'.format(self.nFluidInterfaceNodes))
-+ self.MPIPrint('Total number of solid interface nodes (halo nodes included) : {}'.format(self.nSolidInterfaceNodes))
- self.MPIPrint('Total number of fluid interface nodes : {}'.format(self.nFluidInterfacePhysicalNodes))
- self.MPIPrint('Total number of solid interface nodes : {}'.format(self.nSolidInterfacePhysicalNodes))
-
-- self.MPIBarrier()
-+ self.MPIBarrier()
-
- # --- Create all the PETSc vectors required for parallel communication and parallel mesh mapping/interpolation (working for serial too) ---
- if self.have_MPI == True:
-@@ -432,8 +432,8 @@
- self.solidInterface_array_DispY.setSizes(self.nSolidInterfacePhysicalNodes+self.d_RBF)
- self.solidInterface_array_DispZ.setSizes(self.nSolidInterfacePhysicalNodes+self.d_RBF)
- self.solidInterface_array_DispX.set(0.0)
-- self.solidInterface_array_DispY.set(0.0)
-- self.solidInterface_array_DispZ.set(0.0)
-+ self.solidInterface_array_DispY.set(0.0)
-+ self.solidInterface_array_DispZ.set(0.0)
-
- if self.have_MPI == True:
- self.fluidInterface_array_DispX = PETSc.Vec().create(self.comm)
-@@ -536,30 +536,30 @@
- self.solidInterfaceResidualnM1_array_Z.set(0.0)
-
- def interfaceMapping(self,FluidSolver, SolidSolver, FSI_config):
-- """
-- Creates the one-to-one mapping between interfaces in case of matching meshes.
-- Creates the interpolation rules between interfaces in case of non-matching meshes.
-- """
-- if self.have_MPI == True:
-+ """
-+ Creates the one-to-one mapping between interfaces in case of matching meshes.
-+ Creates the interpolation rules between interfaces in case of non-matching meshes.
-+ """
-+ if self.have_MPI == True:
- myid = self.comm.Get_rank()
-- MPIsize = self.comm.Get_size()
-+ MPIsize = self.comm.Get_size()
- else:
- myid = 0
- MPIsize = 1
-
-- # --- Get the fluid interface from fluid solver on each partition ---
-- GlobalIndex = int()
-+ # --- Get the fluid interface from fluid solver on each partition ---
-+ GlobalIndex = int()
- localIndex = 0
- fluidIndexing_temp = {}
- self.localFluidInterface_array_X_init = np.zeros((self.nLocalFluidInterfacePhysicalNodes))
- self.localFluidInterface_array_Y_init = np.zeros((self.nLocalFluidInterfacePhysicalNodes))
- self.localFluidInterface_array_Z_init = np.zeros((self.nLocalFluidInterfacePhysicalNodes))
- for iVertex in range(self.nLocalFluidInterfaceNodes):
-- GlobalIndex = FluidSolver.GetVertexGlobalIndex(self.fluidInterfaceIdentifier, iVertex)
-- posx = FluidSolver.GetVertexCoordX(self.fluidInterfaceIdentifier, iVertex)
-- posy = FluidSolver.GetVertexCoordY(self.fluidInterfaceIdentifier, iVertex)
-- posz = FluidSolver.GetVertexCoordZ(self.fluidInterfaceIdentifier, iVertex)
-- if GlobalIndex in self.FluidHaloNodeList[myid].keys():
-+ GlobalIndex = FluidSolver.GetVertexGlobalIndex(self.fluidInterfaceIdentifier, iVertex)
-+ posx = FluidSolver.GetVertexCoordX(self.fluidInterfaceIdentifier, iVertex)
-+ posy = FluidSolver.GetVertexCoordY(self.fluidInterfaceIdentifier, iVertex)
-+ posz = FluidSolver.GetVertexCoordZ(self.fluidInterfaceIdentifier, iVertex)
-+ if GlobalIndex in self.FluidHaloNodeList[myid].keys():
- self.haloNodesPositionsInit[GlobalIndex] = (posx, posy, posz)
- else:
- fluidIndexing_temp[GlobalIndex] = self.__getGlobalIndex('fluid', myid, localIndex)
-@@ -576,17 +576,17 @@
- self.fluidIndexing = fluidIndexing_temp.copy()
- del fluidIndexing_temp
-
-- # --- Get the solid interface from solid solver on each partition ---
-+ # --- Get the solid interface from solid solver on each partition ---
- localIndex = 0
- solidIndexing_temp = {}
-- self.localSolidInterface_array_X = np.zeros(self.nLocalSolidInterfaceNodes)
-+ self.localSolidInterface_array_X = np.zeros(self.nLocalSolidInterfaceNodes)
- self.localSolidInterface_array_Y = np.zeros(self.nLocalSolidInterfaceNodes)
- self.localSolidInterface_array_Z = np.zeros(self.nLocalSolidInterfaceNodes)
- for iVertex in range(self.nLocalSolidInterfaceNodes):
- GlobalIndex = SolidSolver.getInterfaceNodeGlobalIndex(self.solidInterfaceIdentifier, iVertex)
-- posx = SolidSolver.getInterfaceNodePosX(self.solidInterfaceIdentifier, iVertex)
-- posy = SolidSolver.getInterfaceNodePosY(self.solidInterfaceIdentifier, iVertex)
-- posz = SolidSolver.getInterfaceNodePosZ(self.solidInterfaceIdentifier, iVertex)
-+ posx = SolidSolver.getInterfaceNodePosX(self.solidInterfaceIdentifier, iVertex)
-+ posy = SolidSolver.getInterfaceNodePosY(self.solidInterfaceIdentifier, iVertex)
-+ posz = SolidSolver.getInterfaceNodePosZ(self.solidInterfaceIdentifier, iVertex)
- if GlobalIndex in self.SolidHaloNodeList[myid].keys():
- pass
- else:
-@@ -605,14 +605,14 @@
- del solidIndexing_temp
-
-
-- # --- Create the PETSc parallel interpolation matrix ---
-+ # --- Create the PETSc parallel interpolation matrix ---
- if FSI_config['MATCHING_MESH'] == 'NO' and (FSI_config['MESH_INTERP_METHOD'] == 'RBF' or FSI_config['MESH_INTERP_METHOD'] == 'TPS'):
- if self.have_MPI == True:
- self.MappingMatrixA = PETSc.Mat().create(self.comm)
- self.MappingMatrixB = PETSc.Mat().create(self.comm)
- self.MappingMatrixA_T = PETSc.Mat().create(self.comm)
- self.MappingMatrixB_T = PETSc.Mat().create(self.comm)
-- if FSI_config['MESH_INTERP_METHOD'] == 'RBF' :
-+ if FSI_config['MESH_INTERP_METHOD'] == 'RBF' :
- self.MappingMatrixA.setType('mpiaij')
- self.MappingMatrixB.setType('mpiaij')
- self.MappingMatrixA_T.setType('mpiaij')
-@@ -627,7 +627,7 @@
- self.MappingMatrixB = PETSc.Mat().create()
- self.MappingMatrixA_T = PETSc.Mat().create()
- self.MappingMatrixB_T = PETSc.Mat().create()
-- if FSI_config['MESH_INTERP_METHOD'] == 'RBF' :
-+ if FSI_config['MESH_INTERP_METHOD'] == 'RBF' :
- self.MappingMatrixA.setType('aij')
- self.MappingMatrixB.setType('aij')
- self.MappingMatrixA_T.setType('aij')
-@@ -637,16 +637,16 @@
- self.MappingMatrixB.setType('aij')
- self.MappingMatrixA_T.setType('aij')
- self.MappingMatrixB_T.setType('aij')
-- self.MappingMatrixA.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nSolidInterfacePhysicalNodes+self.d_RBF))
-+ self.MappingMatrixA.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nSolidInterfacePhysicalNodes+self.d_RBF))
- self.MappingMatrixA.setUp()
- self.MappingMatrixA.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
-- self.MappingMatrixB.setSizes((self.nFluidInterfacePhysicalNodes, self.nSolidInterfacePhysicalNodes+self.d_RBF))
-+ self.MappingMatrixB.setSizes((self.nFluidInterfacePhysicalNodes, self.nSolidInterfacePhysicalNodes+self.d_RBF))
- self.MappingMatrixB.setUp()
- self.MappingMatrixB.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
-- self.MappingMatrixA_T.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nSolidInterfacePhysicalNodes+self.d_RBF))
-+ self.MappingMatrixA_T.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nSolidInterfacePhysicalNodes+self.d_RBF))
- self.MappingMatrixA_T.setUp()
- self.MappingMatrixA_T.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
-- self.MappingMatrixB_T.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nFluidInterfacePhysicalNodes))
-+ self.MappingMatrixB_T.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nFluidInterfacePhysicalNodes))
- self.MappingMatrixB_T.setUp()
- self.MappingMatrixB_T.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
- else:
-@@ -660,21 +660,21 @@
- self.MappingMatrix_T = PETSc.Mat().create()
- self.MappingMatrix.setType('aij')
- self.MappingMatrix_T.setType('aij')
-- self.MappingMatrix.setSizes((self.nFluidInterfacePhysicalNodes, self.nSolidInterfacePhysicalNodes))
-+ self.MappingMatrix.setSizes((self.nFluidInterfacePhysicalNodes, self.nSolidInterfacePhysicalNodes))
- self.MappingMatrix.setUp()
- self.MappingMatrix.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
-- self.MappingMatrix_T.setSizes((self.nSolidInterfacePhysicalNodes, self.nFluidInterfacePhysicalNodes))
-+ self.MappingMatrix_T.setSizes((self.nSolidInterfacePhysicalNodes, self.nFluidInterfacePhysicalNodes))
- self.MappingMatrix_T.setUp()
- self.MappingMatrix_T.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
--
--
-+
-+
- # --- Fill the interpolation matrix in parallel (working in serial too) ---
- if FSI_config['MATCHING_MESH'] == 'NO' and (FSI_config['MESH_INTERP_METHOD'] == 'RBF' or FSI_config['MESH_INTERP_METHOD'] == 'TPS'):
- self.MPIPrint('Building interpolation matrices...')
- if self.have_MPI == True:
- for iProc in self.solidInterfaceProcessors:
- if myid == iProc:
-- for jProc in self.solidInterfaceProcessors:
-+ for jProc in self.solidInterfaceProcessors:
- self.comm.Send(self.localSolidInterface_array_X, dest=jProc, tag=1)
- self.comm.Send(self.localSolidInterface_array_Y, dest=jProc, tag=2)
- self.comm.Send(self.localSolidInterface_array_Z, dest=jProc, tag=3)
-@@ -726,7 +726,7 @@
- self.TPSMeshMapping_B(solidInterfaceBuffRcv_X, solidInterfaceBuffRcv_Y, solidInterfaceBuffRcv_Z, iProc)
- else:
- self.NearestNeighboorMeshMapping(solidInterfaceBuffRcv_X, solidInterfaceBuffRcv_Y, solidInterfaceBuffRcv_Z, iProc)
-- else:
-+ else:
- self.matchingMeshMapping(solidInterfaceBuffRcv_X, solidInterfaceBuffRcv_Y, solidInterfaceBuffRcv_Z, iProc)
- else:
- if FSI_config['MATCHING_MESH'] == 'NO':
-@@ -735,10 +735,10 @@
- elif FSI_config['MESH_INTERP_METHOD'] == 'TPS' :
- self.TPSMeshMapping_B(self.localSolidInterface_array_X, self.localSolidInterface_array_Y, self.localSolidInterface_array_Z, 0)
- else:
-- self.NearestNeighboorMeshMapping(self.localSolidInterface_array_X, self.localSolidInterface_array_Y, self.localSolidInterface_array_Z, 0)
-- else:
-+ self.NearestNeighboorMeshMapping(self.localSolidInterface_array_X, self.localSolidInterface_array_Y, self.localSolidInterface_array_Z, 0)
-+ else:
- self.matchingMeshMapping(self.localSolidInterface_array_X, self.localSolidInterface_array_Y, self.localSolidInterface_array_Z, 0)
--
-+
- if FSI_config['MATCHING_MESH'] == 'NO' and (FSI_config['MESH_INTERP_METHOD'] == 'RBF' or FSI_config['MESH_INTERP_METHOD'] == 'TPS'):
- self.MappingMatrixB.assemblyBegin()
- self.MappingMatrixB.assemblyEnd()
-@@ -751,9 +751,9 @@
- self.MappingMatrix_T.assemblyBegin()
- self.MappingMatrix_T.assemblyEnd()
- self.MPIPrint("Interpolation matrix is built.")
--
-+
- self.MPIBarrier()
--
-+
- del self.localSolidInterface_array_X
- del self.localSolidInterface_array_Y
- del self.localSolidInterface_array_Z
-@@ -768,20 +768,20 @@
- myid = 0
-
- # --- Instantiate the spatial indexing ---
-- prop_index = index.Property()
-- prop_index.dimension = self.nDim
-- SolidSpatialTree = index.Index(properties=prop_index)
--
-+ prop_index = index.Property()
-+ prop_index.dimension = self.nDim
-+ SolidSpatialTree = index.Index(properties=prop_index)
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for jVertex in range(nSolidNodes):
- posX = solidInterfaceBuffRcv_X[jVertex]
- posY = solidInterfaceBuffRcv_Y[jVertex]
- posZ = solidInterfaceBuffRcv_Z[jVertex]
-- if self.nDim == 2 :
-- SolidSpatialTree.add(jVertex, (posX, posY))
-- else :
-- SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-+ if self.nDim == 2 :
-+ SolidSpatialTree.add(jVertex, (posX, posY))
-+ else :
-+ SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-
- if self.nFluidInterfacePhysicalNodes != self.nSolidInterfacePhysicalNodes:
- raise Exception("Fluid and solid interface must have the same number of nodes for matching meshes ! ")
-@@ -822,20 +822,20 @@
- myid = 0
-
- # --- Instantiate the spatial indexing ---
-- prop_index = index.Property()
-- prop_index.dimension = self.nDim
-- SolidSpatialTree = index.Index(properties=prop_index)
--
-+ prop_index = index.Property()
-+ prop_index.dimension = self.nDim
-+ SolidSpatialTree = index.Index(properties=prop_index)
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for jVertex in range(nSolidNodes):
- posX = solidInterfaceBuffRcv_X[jVertex]
- posY = solidInterfaceBuffRcv_Y[jVertex]
- posZ = solidInterfaceBuffRcv_Z[jVertex]
-- if self.nDim == 2 :
-- SolidSpatialTree.add(jVertex, (posX, posY))
-- else :
-- SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-+ if self.nDim == 2 :
-+ SolidSpatialTree.add(jVertex, (posX, posY))
-+ else :
-+ SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-
- # --- For each fluid interface node, find the nearest solid interface node and fill the boolean mapping matrix ---
- for iVertexFluid in range(self.nLocalFluidInterfacePhysicalNodes):
-@@ -863,20 +863,20 @@
- myid = 0
-
- # --- Instantiate the spatial indexing ---
-- prop_index = index.Property()
-- prop_index.dimension = self.nDim
-- SolidSpatialTree = index.Index(properties=prop_index)
--
-+ prop_index = index.Property()
-+ prop_index.dimension = self.nDim
-+ SolidSpatialTree = index.Index(properties=prop_index)
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for jVertex in range(nSolidNodes):
- posX = solidInterfaceBuffRcv_X[jVertex]
- posY = solidInterfaceBuffRcv_Y[jVertex]
- posZ = solidInterfaceBuffRcv_Z[jVertex]
-- if self.nDim == 2 :
-- SolidSpatialTree.add(jVertex, (posX, posY))
-- else :
-- SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-+ if self.nDim == 2 :
-+ SolidSpatialTree.add(jVertex, (posX, posY))
-+ else :
-+ SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-
- for iVertexSolid in range(self.nLocalSolidInterfaceNodes):
- posX = self.localSolidInterface_array_X[iVertexSolid]
-@@ -915,20 +915,20 @@
- myid = 0
-
- # --- Instantiate the spatial indexing ---
-- prop_index = index.Property()
-- prop_index.dimension = self.nDim
-- SolidSpatialTree = index.Index(properties=prop_index)
--
-+ prop_index = index.Property()
-+ prop_index.dimension = self.nDim
-+ SolidSpatialTree = index.Index(properties=prop_index)
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for jVertex in range(nSolidNodes):
- posX = solidInterfaceBuffRcv_X[jVertex]
- posY = solidInterfaceBuffRcv_Y[jVertex]
- posZ = solidInterfaceBuffRcv_Z[jVertex]
-- if self.nDim == 2 :
-- SolidSpatialTree.add(jVertex, (posX, posY))
-- else :
-- SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-+ if self.nDim == 2 :
-+ SolidSpatialTree.add(jVertex, (posX, posY))
-+ else :
-+ SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-
- for iVertexFluid in range(self.nLocalFluidInterfacePhysicalNodes):
- posX = self.localFluidInterface_array_X_init[iVertexFluid]
-@@ -965,7 +965,7 @@
- myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for iVertexSolid in range(self.nLocalSolidInterfaceNodes):
-@@ -999,7 +999,7 @@
- myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for iVertexFluid in range(self.nLocalFluidInterfacePhysicalNodes):
-@@ -1031,7 +1031,7 @@
- """
- phi = 0.0
- eps = distance/rad
--
-+
- if eps < 1:
- phi = ((1.0-eps)**4)*(4.0*eps+1.0)
- else:
-@@ -1044,20 +1044,20 @@
- Description
- """
- phi = 0.0
--
-+
- if distance > 0.0:
- phi = (distance**2)*np.log10(distance)
- else:
- phi = 0.0
-
-- return phi
-+ return phi
-
-
- def interpolateSolidPositionOnFluidMesh(self, FSI_config):
-- """
-- Applies the one-to-one mapping or the interpolaiton rules from solid to fluid mesh.
-- """
-- if self.have_MPI == True:
-+ """
-+ Applies the one-to-one mapping or the interpolaiton rules from solid to fluid mesh.
-+ """
-+ if self.have_MPI == True:
- myid = self.comm.Get_rank()
- MPIsize = self.comm.Get_size()
- else:
-@@ -1110,12 +1110,12 @@
- del gamma_array_DispY
- del gamma_array_DispZ
- del KSP_solver
-- else:
-+ else:
- self.MappingMatrix.mult(self.solidInterface_array_DispX, self.fluidInterface_array_DispX)
- self.MappingMatrix.mult(self.solidInterface_array_DispY, self.fluidInterface_array_DispY)
- self.MappingMatrix.mult(self.solidInterface_array_DispZ, self.fluidInterface_array_DispZ)
-
-- # --- Checking conservation ---
-+ # --- Checking conservation ---
- WSX = self.solidLoads_array_X.dot(self.solidInterface_array_DispX)
- WSY = self.solidLoads_array_Y.dot(self.solidInterface_array_DispY)
- WSZ = self.solidLoads_array_Z.dot(self.solidInterface_array_DispZ)
-@@ -1124,11 +1124,11 @@
- WFY = self.fluidLoads_array_Y.dot(self.fluidInterface_array_DispY)
- WFZ = self.fluidLoads_array_Z.dot(self.fluidInterface_array_DispZ)
-
-- self.MPIPrint("Checking f/s interface conservation...")
-- self.MPIPrint('Solid side (Wx, Wy, Wz) = ({}, {}, {})'.format(WSX, WSY, WSZ))
-- self.MPIPrint('Fluid side (Wx, Wy, Wz) = ({}, {}, {})'.format(WFX, WFY, WFZ))
-+ self.MPIPrint("Checking f/s interface conservation...")
-+ self.MPIPrint('Solid side (Wx, Wy, Wz) = ({}, {}, {})'.format(WSX, WSY, WSZ))
-+ self.MPIPrint('Fluid side (Wx, Wy, Wz) = ({}, {}, {})'.format(WFX, WFY, WFZ))
-+
-
--
- # --- Redistribute the interpolated fluid interface according to the partitions that own the fluid interface ---
- # Gather the fluid interface on the master process
- if self.have_MPI == True:
-@@ -1156,7 +1156,7 @@
- displ = tuple(displ)
-
- del sendBuffNumber, rcvBuffNumber
--
-+
- #print("DEBUG MESSAGE From proc {}, counts = {}".format(myid, counts))
- #print("DEBUG MESSAGE From proc {}, displ = {}".format(myid, displ))
-
-@@ -1213,18 +1213,18 @@
- del sendBuff
-
- def interpolateFluidLoadsOnSolidMesh(self, FSI_config):
-- """
-- Applies the one-to-one mapping or the interpolaiton rules from fluid to solid mesh.
-- """
-- if self.have_MPI == True:
-+ """
-+ Applies the one-to-one mapping or the interpolaiton rules from fluid to solid mesh.
-+ """
-+ if self.have_MPI == True:
- myid = self.comm.Get_rank()
- MPIsize = self.comm.Get_size()
- else:
- myid = 0
- MPIsize = 1
--
-+
- # --- Interpolate (or map) in parallel the fluid interface loads on the solid interface ---
-- #self.MappingMatrix.transpose()
-+ #self.MappingMatrix.transpose()
- if FSI_config['MATCHING_MESH'] == 'NO' and (FSI_config['MESH_INTERP_METHOD'] == 'RBF' or FSI_config['MESH_INTERP_METHOD'] == 'TPS'):
- if self.have_MPI == True:
- gamma_array_LoadX = PETSc.Vec().create(self.comm)
-@@ -1280,10 +1280,10 @@
- self.solidLoads_array_X_recon = None
- self.solidLoads_array_Y_recon = None
- self.solidLoads_array_Z_recon = None
-- if myid == self.rootProcess:
-- self.solidLoads_array_X_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
-- self.solidLoads_array_Y_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
-- self.solidLoads_array_Z_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
-+ if myid == self.rootProcess:
-+ self.solidLoads_array_X_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
-+ self.solidLoads_array_Y_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
-+ self.solidLoads_array_Z_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
- myNumberOfNodes = self.solidLoads_array_X.getArray().shape[0]
- sendBuffNumber = np.array([myNumberOfNodes], dtype=int)
- rcvBuffNumber = np.zeros(MPIsize, dtype=int)
-@@ -1293,9 +1293,9 @@
- displ = np.zeros(MPIsize, dtype=int)
- for ii in range(rcvBuffNumber.shape[0]):
- displ[ii] = rcvBuffNumber[0:ii].sum()
-- displ = tuple(displ)
-+ displ = tuple(displ)
-
-- del sendBuffNumber, rcvBuffNumber
-+ del sendBuffNumber, rcvBuffNumber
-
- self.comm.Gatherv(self.solidLoads_array_X.getArray(), [self.solidLoads_array_X_recon, counts, displ, self.MPI.DOUBLE], root=self.rootProcess)
- self.comm.Gatherv(self.solidLoads_array_Y.getArray(), [self.solidLoads_array_Y_recon, counts, displ, self.MPI.DOUBLE], root=self.rootProcess)
-@@ -1336,25 +1336,25 @@
-
-
- '''def getSolidInterfacePosition(self, SolidSolver):
-- """
-- Gets the current solid interface position from the solid solver.
-- """
-+ """
-+ Gets the current solid interface position from the solid solver.
-+ """
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- # --- Get the solid interface position from the solid solver and directly fill the corresponding PETSc vector ---
- GlobalIndex = int()
- localIndex = 0
-- for iVertex in range(self.nLocalSolidInterfaceNodes):
-+ for iVertex in range(self.nLocalSolidInterfaceNodes):
- GlobalIndex = SolidSolver.getInterfaceNodeGlobalIndex(self.solidInterfaceIdentifier, iVertex)
- if GlobalIndex in self.SolidHaloNodeList[myid].keys():
- pass
- else:
-- newPosx = SolidSolver.getInterfaceNodePosX(self.solidInterfaceIdentifier, iVertex)
-- newPosy = SolidSolver.getInterfaceNodePosY(self.solidInterfaceIdentifier, iVertex)
-- newPosz = SolidSolver.getInterfaceNodePosZ(self.solidInterfaceIdentifier, iVertex)
-+ newPosx = SolidSolver.getInterfaceNodePosX(self.solidInterfaceIdentifier, iVertex)
-+ newPosy = SolidSolver.getInterfaceNodePosY(self.solidInterfaceIdentifier, iVertex)
-+ newPosz = SolidSolver.getInterfaceNodePosZ(self.solidInterfaceIdentifier, iVertex)
- iGlobalVertex = self.__getGlobalIndex('solid', myid, localIndex)
- self.solidInterface_array_X.setValues([iGlobalVertex],newPosx)
- self.solidInterface_array_Y.setValues([iGlobalVertex],newPosy)
-@@ -1375,25 +1375,25 @@
- #print("DEBUG MESSAGE From PROC {} : array_X = {}".format(myid, self.solidInterface_array_X.getArray()))'''
-
- def getSolidInterfaceDisplacement(self, SolidSolver):
-- """
-- Gets the current solid interface position from the solid solver.
-- """
-+ """
-+ Gets the current solid interface position from the solid solver.
-+ """
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- # --- Get the solid interface position from the solid solver and directly fill the corresponding PETSc vector ---
- GlobalIndex = int()
- localIndex = 0
-- for iVertex in range(self.nLocalSolidInterfaceNodes):
-+ for iVertex in range(self.nLocalSolidInterfaceNodes):
- GlobalIndex = SolidSolver.getInterfaceNodeGlobalIndex(self.solidInterfaceIdentifier, iVertex)
- if GlobalIndex in self.SolidHaloNodeList[myid].keys():
- pass
- else:
-- newDispx = SolidSolver.getInterfaceNodeDispX(self.solidInterfaceIdentifier, iVertex)
-- newDispy = SolidSolver.getInterfaceNodeDispY(self.solidInterfaceIdentifier, iVertex)
-- newDispz = SolidSolver.getInterfaceNodeDispZ(self.solidInterfaceIdentifier, iVertex)
-+ newDispx = SolidSolver.getInterfaceNodeDispX(self.solidInterfaceIdentifier, iVertex)
-+ newDispy = SolidSolver.getInterfaceNodeDispY(self.solidInterfaceIdentifier, iVertex)
-+ newDispz = SolidSolver.getInterfaceNodeDispZ(self.solidInterfaceIdentifier, iVertex)
- iGlobalVertex = self.__getGlobalIndex('solid', myid, localIndex)
- self.solidInterface_array_DispX.setValues([iGlobalVertex],newDispx)
- self.solidInterface_array_DispY.setValues([iGlobalVertex],newDispy)
-@@ -1408,9 +1408,9 @@
- self.solidInterface_array_DispZ.assemblyEnd()
-
- def getFluidInterfaceNodalForce(self, FSI_config, FluidSolver):
-- """
-- Gets the fluid interface loads from the fluid solver.
-- """
-+ """
-+ Gets the fluid interface loads from the fluid solver.
-+ """
- if self.have_MPI == True:
- myid = self.comm.Get_rank()
- else:
-@@ -1422,17 +1422,17 @@
- FZ = 0.0
-
- # --- Get the fluid interface loads from the fluid solver and directly fill the corresponding PETSc vector ---
-- for iVertex in range(self.nLocalFluidInterfaceNodes):
-- halo = FluidSolver.ComputeVertexForces(self.fluidInterfaceIdentifier, iVertex) # !!we have to ignore halo node coming from mesh partitioning because they introduice non-physical forces
-- if halo==False:
-- if FSI_config['CSD_SOLVER'] == 'GETDP':
-- newFx = FluidSolver.GetVertexForceDensityX(self.fluidInterfaceIdentifier, iVertex)
-- newFy = FluidSolver.GetVertexForceDensityY(self.fluidInterfaceIdentifier, iVertex)
-- newFz = FluidSolver.GetVertexForceDensityZ(self.fluidInterfaceIdentifier, iVertex)
-- else:
-- newFx = FluidSolver.GetVertexForceX(self.fluidInterfaceIdentifier, iVertex)
-- newFy = FluidSolver.GetVertexForceY(self.fluidInterfaceIdentifier, iVertex)
-- newFz = FluidSolver.GetVertexForceZ(self.fluidInterfaceIdentifier, iVertex)
-+ for iVertex in range(self.nLocalFluidInterfaceNodes):
-+ halo = FluidSolver.ComputeVertexForces(self.fluidInterfaceIdentifier, iVertex) # !!we have to ignore halo node coming from mesh partitioning because they introduice non-physical forces
-+ if halo==False:
-+ if FSI_config['CSD_SOLVER'] == 'GETDP':
-+ newFx = FluidSolver.GetVertexForceDensityX(self.fluidInterfaceIdentifier, iVertex)
-+ newFy = FluidSolver.GetVertexForceDensityY(self.fluidInterfaceIdentifier, iVertex)
-+ newFz = FluidSolver.GetVertexForceDensityZ(self.fluidInterfaceIdentifier, iVertex)
-+ else:
-+ newFx = FluidSolver.GetVertexForceX(self.fluidInterfaceIdentifier, iVertex)
-+ newFy = FluidSolver.GetVertexForceY(self.fluidInterfaceIdentifier, iVertex)
-+ newFz = FluidSolver.GetVertexForceZ(self.fluidInterfaceIdentifier, iVertex)
- iGlobalVertex = self.__getGlobalIndex('fluid', myid, localIndex)
- self.fluidLoads_array_X.setValues([iGlobalVertex], newFx)
- self.fluidLoads_array_Y.setValues([iGlobalVertex], newFy)
-@@ -1457,22 +1457,22 @@
- FX_b = self.fluidLoads_array_X.sum()
- FY_b = self.fluidLoads_array_Y.sum()
- FZ_b = self.fluidLoads_array_Z.sum()
--
-+
-
- def setFluidInterfaceVarCoord(self, FluidSolver):
-- """
-- Communicate the change of coordinates of the fluid interface to the fluid solver.
-- Prepare the fluid solver for mesh deformation.
-- """
-+ """
-+ Communicate the change of coordinates of the fluid interface to the fluid solver.
-+ Prepare the fluid solver for mesh deformation.
-+ """
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- # --- Send the new fluid interface position to the fluid solver (on each partition, halo nodes included) ---
- localIndex = 0
-- for iVertex in range(self.nLocalFluidInterfaceNodes):
-- GlobalIndex = FluidSolver.GetVertexGlobalIndex(self.fluidInterfaceIdentifier, iVertex)
-+ for iVertex in range(self.nLocalFluidInterfaceNodes):
-+ GlobalIndex = FluidSolver.GetVertexGlobalIndex(self.fluidInterfaceIdentifier, iVertex)
- if GlobalIndex in self.FluidHaloNodeList[myid].keys():
- posX0, posY0, posZ0 = self.haloNodesPositionsInit[GlobalIndex]
- DispX, DispY, DispZ = self.haloNodesDisplacements[GlobalIndex]
-@@ -1491,32 +1491,32 @@
- FluidSolver.SetVertexCoordZ(self.fluidInterfaceIdentifier, iVertex, posZ)
- localIndex += 1
- # Prepares the mesh deformation in the fluid solver
-- nodalVarCoordNorm = FluidSolver.SetVertexVarCoord(self.fluidInterfaceIdentifier, iVertex)
-+ nodalVarCoordNorm = FluidSolver.SetVertexVarCoord(self.fluidInterfaceIdentifier, iVertex)
-+
-
--
- def setSolidInterfaceLoads(self, SolidSolver, FSI_config, time):
-- """
-- Communicates the new solid interface loads to the solid solver.
-- In case of rigid body motion, calculates the new resultant forces (lift, drag, ...).
-- """
-+ """
-+ Communicates the new solid interface loads to the solid solver.
-+ In case of rigid body motion, calculates the new resultant forces (lift, drag, ...).
-+ """
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
-
-- FY = 0.0 # solid-side resultant forces
-+ FY = 0.0 # solid-side resultant forces
- FX = 0.0
- FZ = 0.0
-- FFX = 0.0 # fluid-side resultant forces
-- FFY = 0.0
-- FFZ = 0.0
-+ FFX = 0.0 # fluid-side resultant forces
-+ FFY = 0.0
-+ FFZ = 0.0
-
- # --- Check for total force conservation after interpolation
- FFX = self.fluidLoads_array_X.sum()
- FFY = self.fluidLoads_array_Y.sum()
- FFZ = self.fluidLoads_array_Z.sum()
-
--
-+
- for iVertex in range(self.nLocalSolidInterfaceNodes):
- FX += self.localSolidLoads_array_X[iVertex]
- FY += self.localSolidLoads_array_Y[iVertex]
-@@ -1527,9 +1527,9 @@
- FY = self.comm.allreduce(FY)
- FZ = self.comm.allreduce(FZ)
-
-- self.MPIPrint("Checking f/s interface total force...")
-- self.MPIPrint('Solid side (Fx, Fy, Fz) = ({}, {}, {})'.format(FX, FY, FZ))
-- self.MPIPrint('Fluid side (Fx, Fy, Fz) = ({}, {}, {})'.format(FFX, FFY, FFZ))
-+ self.MPIPrint("Checking f/s interface total force...")
-+ self.MPIPrint('Solid side (Fx, Fy, Fz) = ({}, {}, {})'.format(FX, FY, FZ))
-+ self.MPIPrint('Fluid side (Fx, Fy, Fz) = ({}, {}, {})'.format(FFX, FFY, FFZ))
-
- # --- Send the new solid interface loads to the solid solver (on each partition, halo nodes included) ---
- GlobalIndex = int()
-@@ -1541,25 +1541,25 @@
- pass
- else:
- Fx = self.localSolidLoads_array_X[localIndex]
-- Fy = self.localSolidLoads_array_Y[localIndex]
-- Fz = self.localSolidLoads_array_Z[localIndex]
-+ Fy = self.localSolidLoads_array_Y[localIndex]
-+ Fz = self.localSolidLoads_array_Z[localIndex]
- SolidSolver.applyload(iVertex, Fx, Fy, Fz, time)
- localIndex += 1
-- if FSI_config['CSD_SOLVER'] == 'NATIVE':
-+ if FSI_config['CSD_SOLVER'] == 'NATIVE':
- SolidSolver.setGeneralisedForce()
-- SolidSolver.setGeneralisedMoment()
-+ SolidSolver.setGeneralisedMoment()
-
- def computeSolidInterfaceResidual(self, SolidSolver):
-- """
-- Computes the solid interface FSI displacement residual.
-- """
-+ """
-+ Computes the solid interface FSI displacement residual.
-+ """
-
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
-
-- normInterfaceResidualSquare = 0.0
-+ normInterfaceResidualSquare = 0.0
-
- # --- Create and fill the PETSc vector for the predicted solid interface position (predicted by the solid computation) ---
- if self.have_MPI == True:
-@@ -1575,27 +1575,27 @@
- predDisp_array_Y = PETSc.Vec().create()
- predDisp_array_Y.setType('seq')
- predDisp_array_Z = PETSc.Vec().create()
-- predDisp_array_Z.setType('seq')
-+ predDisp_array_Z.setType('seq')
- predDisp_array_X.setSizes(self.nSolidInterfacePhysicalNodes+self.d_RBF)
- predDisp_array_Y.setSizes(self.nSolidInterfacePhysicalNodes+self.d_RBF)
- predDisp_array_Z.setSizes(self.nSolidInterfacePhysicalNodes+self.d_RBF)
--
-- if myid in self.solidSolverProcessors:
-- for iVertex in range(self.nLocalSolidInterfaceNodes):
-- predDispx = SolidSolver.getInterfaceNodeDispX(self.solidInterfaceIdentifier, iVertex)
-- predDispy = SolidSolver.getInterfaceNodeDispY(self.solidInterfaceIdentifier, iVertex)
-- predDispz = SolidSolver.getInterfaceNodeDispZ(self.solidInterfaceIdentifier, iVertex)
-+
-+ if myid in self.solidSolverProcessors:
-+ for iVertex in range(self.nLocalSolidInterfaceNodes):
-+ predDispx = SolidSolver.getInterfaceNodeDispX(self.solidInterfaceIdentifier, iVertex)
-+ predDispy = SolidSolver.getInterfaceNodeDispY(self.solidInterfaceIdentifier, iVertex)
-+ predDispz = SolidSolver.getInterfaceNodeDispZ(self.solidInterfaceIdentifier, iVertex)
- iGlobalVertex = self.__getGlobalIndex('solid', myid, iVertex)
- predDisp_array_X.setValues([iGlobalVertex], predDispx)
- predDisp_array_Y.setValues([iGlobalVertex], predDispy)
- predDisp_array_Z.setValues([iGlobalVertex], predDispz)
--
-- predDisp_array_X.assemblyBegin()
-- predDisp_array_X.assemblyEnd()
-- predDisp_array_Y.assemblyBegin()
-- predDisp_array_Y.assemblyEnd()
-- predDisp_array_Z.assemblyBegin()
-- predDisp_array_Z.assemblyEnd()
-+
-+ predDisp_array_X.assemblyBegin()
-+ predDisp_array_X.assemblyEnd()
-+ predDisp_array_Y.assemblyBegin()
-+ predDisp_array_Y.assemblyEnd()
-+ predDisp_array_Z.assemblyBegin()
-+ predDisp_array_Z.assemblyEnd()
-
- # --- Calculate the residual (vector and norm) ---
- self.solidInterfaceResidual_array_X = predDisp_array_X - self.solidInterface_array_DispX
-@@ -1615,45 +1615,45 @@
- del predDisp_array_Y
- del predDisp_array_Z
-
-- return sqrt(normInterfaceResidualSquare)
-+ return sqrt(normInterfaceResidualSquare)
-
- def relaxSolidPosition(self,FSI_config):
-- """
-- Apply solid displacement under-relaxation.
-- """
-+ """
-+ Apply solid displacement under-relaxation.
-+ """
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
-
- # --- Set the Aitken coefficient for the relaxation ---
-- if FSI_config['AITKEN_RELAX'] == 'STATIC':
-- self.aitkenParam = FSI_config['AITKEN_PARAM']
-- elif FSI_config['AITKEN_RELAX'] == 'DYNAMIC':
-- self.setAitkenCoefficient(FSI_config)
-- else:
-- self.aitkenParam = 1.0
-+ if FSI_config['AITKEN_RELAX'] == 'STATIC':
-+ self.aitkenParam = FSI_config['AITKEN_PARAM']
-+ elif FSI_config['AITKEN_RELAX'] == 'DYNAMIC':
-+ self.setAitkenCoefficient(FSI_config)
-+ else:
-+ self.aitkenParam = 1.0
-
-- self.MPIPrint('Aitken under-relaxation step with parameter {}'.format(self.aitkenParam))
-+ self.MPIPrint('Aitken under-relaxation step with parameter {}'.format(self.aitkenParam))
-
- # --- Relax the solid interface position ---
- self.solidInterface_array_DispX += self.aitkenParam*self.solidInterfaceResidual_array_X
- self.solidInterface_array_DispY += self.aitkenParam*self.solidInterfaceResidual_array_Y
- self.solidInterface_array_DispZ += self.aitkenParam*self.solidInterfaceResidual_array_Z
--
-+
-
- def setAitkenCoefficient(self, FSI_config):
-- """
-- Computes the Aitken coefficients for solid displacement under-relaxation.
-- """
--
-- deltaResNormSquare = 0.0
-- prodScalRes = 0.0
--
-+ """
-+ Computes the Aitken coefficients for solid displacement under-relaxation.
-+ """
-+
-+ deltaResNormSquare = 0.0
-+ prodScalRes = 0.0
-+
- # --- Create the PETSc vector for the difference between the residuals (current and previous FSI iter) ---
-- if self.FSIIter == 0:
-- self.aitkenParam = max(FSI_config['AITKEN_PARAM'], self.aitkenParam)
-- else:
-+ if self.FSIIter == 0:
-+ self.aitkenParam = max(FSI_config['AITKEN_PARAM'], self.aitkenParam)
-+ else:
- if self.have_MPI:
- deltaResx_array_X = PETSc.Vec().create(self.comm)
- deltaResx_array_X.setType('mpi')
-@@ -1688,9 +1688,9 @@
- deltaResNormSquare_X = (deltaResx_array_X.norm())**2
- deltaResNormSquare_Y = (deltaResx_array_Y.norm())**2
- deltaResNormSquare_Z = (deltaResx_array_Z.norm())**2
-- deltaResNormSquare = deltaResNormSquare_X + deltaResNormSquare_Y + deltaResNormSquare_Z
-+ deltaResNormSquare = deltaResNormSquare_X + deltaResNormSquare_Y + deltaResNormSquare_Z
-
-- self.aitkenParam *= -prodScalRes/deltaResNormSquare
-+ self.aitkenParam *= -prodScalRes/deltaResNormSquare
-
- deltaResx_array_X.destroy()
- deltaResx_array_Y.destroy()
-@@ -1708,27 +1708,27 @@
- self.solidInterfaceResidual_array_Z.copy(self.solidInterfaceResidualnM1_array_Z)
-
- def displacementPredictor(self, FSI_config , SolidSolver, deltaT):
-- """
-- Calculates a prediciton for the solid interface position for the next time step.
-- """
-+ """
-+ Calculates a prediciton for the solid interface position for the next time step.
-+ """
-
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
-
-- if FSI_config['DISP_PRED'] == 'FIRST_ORDER':
-- self.MPIPrint("First order predictor")
-- alpha_0 = 1.0
-- alpha_1 = 0.0
-- elif FSI_config['DISP_PRED'] == 'SECOND_ORDER':
-- self.MPIPrint("Second order predictor")
-- alpha_0 = 1.0
-- alpha_1 = 0.5
-- else:
-- self.MPIPrint("No predictor")
-- alpha_0 = 0.0
-- alpha_1 = 0.0
-+ if FSI_config['DISP_PRED'] == 'FIRST_ORDER':
-+ self.MPIPrint("First order predictor")
-+ alpha_0 = 1.0
-+ alpha_1 = 0.0
-+ elif FSI_config['DISP_PRED'] == 'SECOND_ORDER':
-+ self.MPIPrint("Second order predictor")
-+ alpha_0 = 1.0
-+ alpha_1 = 0.5
-+ else:
-+ self.MPIPrint("No predictor")
-+ alpha_0 = 0.0
-+ alpha_1 = 0.0
-
- # --- Create the PETSc vectors to store the solid interface velocity ---
- if self.have_MPI == True:
-@@ -1774,18 +1774,18 @@
- # --- Fill the PETSc vectors ---
- GlobalIndex = int()
- localIndex = 0
-- for iVertex in range(self.nLocalSolidInterfaceNodes):
-- GlobalIndex = SolidSolver.getInterfaceNodeGlobalIndex(self.solidInterfaceIdentifier, iVertex)
-+ for iVertex in range(self.nLocalSolidInterfaceNodes):
-+ GlobalIndex = SolidSolver.getInterfaceNodeGlobalIndex(self.solidInterfaceIdentifier, iVertex)
- if GlobalIndex in self.SolidHaloNodeList[myid].keys():
- pass
- else:
- iGlobalVertex = self.__getGlobalIndex('solid', myid, localIndex)
-- velx = SolidSolver.getInterfaceNodeVelX(self.solidInterfaceIdentifier, iVertex)
-- vely = SolidSolver.getInterfaceNodeVelY(self.solidInterfaceIdentifier, iVertex)
-- velz = SolidSolver.getInterfaceNodeVelZ(self.solidInterfaceIdentifier, iVertex)
-- velxNm1 = SolidSolver.getInterfaceNodeVelXNm1(self.solidInterfaceIdentifier, iVertex)
-- velyNm1 = SolidSolver.getInterfaceNodeVelYNm1(self.solidInterfaceIdentifier, iVertex)
-- velzNm1 = SolidSolver.getInterfaceNodeVelZNm1(self.solidInterfaceIdentifier, iVertex)
-+ velx = SolidSolver.getInterfaceNodeVelX(self.solidInterfaceIdentifier, iVertex)
-+ vely = SolidSolver.getInterfaceNodeVelY(self.solidInterfaceIdentifier, iVertex)
-+ velz = SolidSolver.getInterfaceNodeVelZ(self.solidInterfaceIdentifier, iVertex)
-+ velxNm1 = SolidSolver.getInterfaceNodeVelXNm1(self.solidInterfaceIdentifier, iVertex)
-+ velyNm1 = SolidSolver.getInterfaceNodeVelYNm1(self.solidInterfaceIdentifier, iVertex)
-+ velzNm1 = SolidSolver.getInterfaceNodeVelZNm1(self.solidInterfaceIdentifier, iVertex)
- Vel_array_X.setValues([iGlobalVertex],velx)
- Vel_array_Y.setValues([iGlobalVertex],vely)
- Vel_array_Z.setValues([iGlobalVertex],velz)
-@@ -1822,27 +1822,27 @@
- del VelnM1_array_X, VelnM1_array_Y, VelnM1_array_Z
-
- def writeFSIHistory(self, TimeIter, time, varCoordNorm, FSIConv):
-- """
-- Write the FSI history file of the computaion.
-- """
-+ """
-+ Write the FSI history file of the computaion.
-+ """
-
- if self.have_MPI == True:
- myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- if myid == self.rootProcess:
-- if self.unsteady:
-- if TimeIter == 0:
-- histFile = open('FSIhistory.dat', "w")
-+ if self.unsteady:
-+ if TimeIter == 0:
-+ histFile = open('FSIhistory.dat', "w")
- histFile.write("TimeIter\tTime\tFSIRes\tFSINbIter\n")
-- else:
-- histFile = open('FSIhistory.dat', "a")
-- if FSIConv:
-- histFile.write(str(TimeIter) + '\t' + str(time) + '\t' + str(varCoordNorm) + '\t' + str(self.FSIIter+1) + '\n')
-- else:
-- histFile.write(str(TimeIter) + '\t' + str(time) + '\t' + str(varCoordNorm) + '\t' + str(self.FSIIter) + '\n')
-- histFile.close()
-+ else:
-+ histFile = open('FSIhistory.dat', "a")
-+ if FSIConv:
-+ histFile.write(str(TimeIter) + '\t' + str(time) + '\t' + str(varCoordNorm) + '\t' + str(self.FSIIter+1) + '\n')
-+ else:
-+ histFile.write(str(TimeIter) + '\t' + str(time) + '\t' + str(varCoordNorm) + '\t' + str(self.FSIIter) + '\n')
-+ histFile.close()
- else:
- if self.FSIIter == 0:
- histFile = open('FSIhistory.dat', "w")
-@@ -1851,7 +1851,7 @@
- histFile = open('FSIhistory.dat', "a")
- histFile.write(str(self.FSIIter) + '\t' + str(varCoordNorm) + '\n')
- histFile.close()
--
-+
-
- self.MPIBarrier()
-
-@@ -1868,254 +1868,254 @@
- globalIndex = globalStartIndex + iLocalVertex
-
- return globalIndex
--
-+
-
- def UnsteadyFSI(self,FSI_config, FluidSolver, SolidSolver):
-- """
-- Run the unsteady FSI computation by synchronizing the fluid and solid solvers.
-- F/s interface data are exchanged through interface mapping and interpolation (if non mathcing meshes).
-- """
-+ """
-+ Run the unsteady FSI computation by synchronizing the fluid and solid solvers.
-+ F/s interface data are exchanged through interface mapping and interpolation (if non mathcing meshes).
-+ """
-
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-- numberPart = self.comm.Get_size()
-+ myid = self.comm.Get_rank()
-+ numberPart = self.comm.Get_size()
- else:
- myid = 0
- numberPart = 1
-
-- # --- Set some general variables for the unsteady computation --- #
-- deltaT = FSI_config['UNST_TIMESTEP'] # physical time step
-- totTime = FSI_config['UNST_TIME'] # physical simulation time
-- NbFSIIterMax = FSI_config['NB_FSI_ITER'] # maximum number of FSI iteration (for each time step)
-- FSITolerance = FSI_config['FSI_TOLERANCE'] # f/s interface tolerance
-- TimeIterTreshold = 0 # time iteration from which we allow the solid to deform
--
-- if FSI_config['RESTART_SOL'] == 'YES':
-- startTime = FSI_config['START_TIME']
-- NbTimeIter = ((totTime)/deltaT)-1
-- time = startTime
-- TimeIter = FSI_config['RESTART_ITER']
-- else:
-- NbTimeIter = (totTime/deltaT)-1 # number of time iterations
-- time = 0.0 # initial time
-- TimeIter = 0 # initial time iteration
--
-- NbTimeIter = int(NbTimeIter) # be sure that NbTimeIter is an integer
--
-- varCoordNorm = 0.0 # FSI residual
-- FSIConv = False # FSI convergence flag
--
-- self.MPIPrint('\n**********************************')
-- self.MPIPrint('* Begin unsteady FSI computation *')
-- self.MPIPrint('**********************************\n')
--
-- # --- Initialize the coupled solution --- #
-- #If restart (DOES NOT WORK YET)
-- if FSI_config['RESTART_SOL'] == 'YES':
-- TimeIterTreshold = -1
-- FluidSolver.setTemporalIteration(TimeIter)
-- if myid == self.rootProcess:
-- SolidSolver.outputDisplacements(FluidSolver.getInterRigidDispArray(), True)
-+ # --- Set some general variables for the unsteady computation --- #
-+ deltaT = FSI_config['UNST_TIMESTEP'] # physical time step
-+ totTime = FSI_config['UNST_TIME'] # physical simulation time
-+ NbFSIIterMax = FSI_config['NB_FSI_ITER'] # maximum number of FSI iteration (for each time step)
-+ FSITolerance = FSI_config['FSI_TOLERANCE'] # f/s interface tolerance
-+ TimeIterTreshold = 0 # time iteration from which we allow the solid to deform
-+
-+ if FSI_config['RESTART_SOL'] == 'YES':
-+ startTime = FSI_config['START_TIME']
-+ NbTimeIter = ((totTime)/deltaT)-1
-+ time = startTime
-+ TimeIter = FSI_config['RESTART_ITER']
-+ else:
-+ NbTimeIter = (totTime/deltaT)-1 # number of time iterations
-+ time = 0.0 # initial time
-+ TimeIter = 0 # initial time iteration
-+
-+ NbTimeIter = int(NbTimeIter) # be sure that NbTimeIter is an integer
-+
-+ varCoordNorm = 0.0 # FSI residual
-+ FSIConv = False # FSI convergence flag
-+
-+ self.MPIPrint('\n**********************************')
-+ self.MPIPrint('* Begin unsteady FSI computation *')
-+ self.MPIPrint('**********************************\n')
-+
-+ # --- Initialize the coupled solution --- #
-+ #If restart (DOES NOT WORK YET)
-+ if FSI_config['RESTART_SOL'] == 'YES':
-+ TimeIterTreshold = -1
-+ FluidSolver.setTemporalIteration(TimeIter)
-+ if myid == self.rootProcess:
-+ SolidSolver.outputDisplacements(FluidSolver.getInterRigidDispArray(), True)
-+ if self.have_MPI == True:
-+ self.comm.barrier()
-+ FluidSolver.setInitialMesh(True)
-+ if myid == self.rootProcess:
-+ SolidSolver.displacementPredictor(FluidSolver.getInterRigidDispArray())
- if self.have_MPI == True:
-- self.comm.barrier()
-- FluidSolver.setInitialMesh(True)
-- if myid == self.rootProcess:
-- SolidSolver.displacementPredictor(FluidSolver.getInterRigidDispArray())
-- if self.have_MPI == True:
-- self.comm.barrier()
-- if myid == self.rootProcess:
-- SolidSolver.updateSolution()
-- #If no restart
-- else:
-- self.MPIPrint('Setting FSI initial conditions')
-+ self.comm.barrier()
-+ if myid == self.rootProcess:
-+ SolidSolver.updateSolution()
-+ #If no restart
-+ else:
-+ self.MPIPrint('Setting FSI initial conditions')
- if myid in self.solidSolverProcessors:
-- SolidSolver.setInitialDisplacements()
-+ SolidSolver.setInitialDisplacements()
- self.getSolidInterfaceDisplacement(SolidSolver)
-- self.interpolateSolidPositionOnFluidMesh(FSI_config)
-- self.setFluidInterfaceVarCoord(FluidSolver)
-- FluidSolver.SetInitialMesh() # if there is an initial deformation in the solid, it has to be communicated to the fluid solver
-- self.MPIPrint('\nFSI initial conditions are set')
-- self.MPIPrint('Beginning time integration\n')
--
-- # --- External temporal loop --- #
-- while TimeIter <= NbTimeIter:
--
-- if TimeIter > TimeIterTreshold:
-- NbFSIIter = NbFSIIterMax
-- self.MPIPrint('\n*************** Enter Block Gauss Seidel (BGS) method for strong coupling FSI on time iteration {} ***************'.format(TimeIter))
-- else:
-- NbFSIIter = 1
--
-- self.FSIIter = 0
-- FSIConv = False
-- FluidSolver.PreprocessExtIter(TimeIter) # set some parameters before temporal fluid iteration
--
-- # --- Internal FSI loop --- #
-- while self.FSIIter <= (NbFSIIter-1):
-+ self.interpolateSolidPositionOnFluidMesh(FSI_config)
-+ self.setFluidInterfaceVarCoord(FluidSolver)
-+ FluidSolver.SetInitialMesh() # if there is an initial deformation in the solid, it has to be communicated to the fluid solver
-+ self.MPIPrint('\nFSI initial conditions are set')
-+ self.MPIPrint('Beginning time integration\n')
-+
-+ # --- External temporal loop --- #
-+ while TimeIter <= NbTimeIter:
-+
-+ if TimeIter > TimeIterTreshold:
-+ NbFSIIter = NbFSIIterMax
-+ self.MPIPrint('\n*************** Enter Block Gauss Seidel (BGS) method for strong coupling FSI on time iteration {} ***************'.format(TimeIter))
-+ else:
-+ NbFSIIter = 1
-+
-+ self.FSIIter = 0
-+ FSIConv = False
-+ FluidSolver.PreprocessExtIter(TimeIter) # set some parameters before temporal fluid iteration
-
-- self.MPIPrint("\n>>>> Time iteration {} / FSI iteration {} <<<<".format(TimeIter,self.FSIIter))
-+ # --- Internal FSI loop --- #
-+ while self.FSIIter <= (NbFSIIter-1):
-
-- # --- Mesh morphing step (displacements interpolation, displacements communication, and mesh morpher call) --- #
-- self.interpolateSolidPositionOnFluidMesh(FSI_config)
-+ self.MPIPrint("\n>>>> Time iteration {} / FSI iteration {} <<<<".format(TimeIter,self.FSIIter))
-+
-+ # --- Mesh morphing step (displacements interpolation, displacements communication, and mesh morpher call) --- #
-+ self.interpolateSolidPositionOnFluidMesh(FSI_config)
- self.MPIPrint('\nPerforming dynamic mesh deformation (ALE)...\n')
- self.setFluidInterfaceVarCoord(FluidSolver)
- FluidSolver.DynamicMeshUpdate(TimeIter)
--
-- # --- Fluid solver call for FSI subiteration --- #
-- self.MPIPrint('\nLaunching fluid solver for one single dual-time iteration...')
-+
-+ # --- Fluid solver call for FSI subiteration --- #
-+ self.MPIPrint('\nLaunching fluid solver for one single dual-time iteration...')
- self.MPIBarrier()
-- FluidSolver.ResetConvergence()
-- FluidSolver.Run()
-+ FluidSolver.ResetConvergence()
-+ FluidSolver.Run()
- self.MPIBarrier()
-
-- # --- Surface fluid loads interpolation and communication --- #
-- self.MPIPrint('\nProcessing interface fluid loads...\n')
-+ # --- Surface fluid loads interpolation and communication --- #
-+ self.MPIPrint('\nProcessing interface fluid loads...\n')
- self.MPIBarrier()
-- self.getFluidInterfaceNodalForce(FSI_config, FluidSolver)
-+ self.getFluidInterfaceNodalForce(FSI_config, FluidSolver)
- self.MPIBarrier()
-- if TimeIter > TimeIterTreshold:
-- self.interpolateFluidLoadsOnSolidMesh(FSI_config)
-- self.setSolidInterfaceLoads(SolidSolver, FSI_config, time)
-+ if TimeIter > TimeIterTreshold:
-+ self.interpolateFluidLoadsOnSolidMesh(FSI_config)
-+ self.setSolidInterfaceLoads(SolidSolver, FSI_config, time)
-
-- # --- Solid solver call for FSI subiteration --- #
-- self.MPIPrint('\nLaunching solid solver for a single time iteration...\n')
-+ # --- Solid solver call for FSI subiteration --- #
-+ self.MPIPrint('\nLaunching solid solver for a single time iteration...\n')
- if myid in self.solidSolverProcessors:
-- if FSI_config['CSD_SOLVER'] == 'NATIVE':
-- SolidSolver.timeIteration(time)
-- elif FSI_config['CSD_SOLVER'] == 'METAFOR' or FSI_config['CSD_SOLVER'] == 'GETDP' or FSI_config['CSD_SOLVER'] == 'TESTER':
-- SolidSolver.run(time-deltaT, time)
--
-- # --- Compute and monitor the FSI residual --- #
-- varCoordNorm = self.computeSolidInterfaceResidual(SolidSolver)
-- self.MPIPrint('\nFSI displacement norm : {}\n'.format(varCoordNorm))
-- if varCoordNorm < FSITolerance:
-- FSIConv = True
-- break
-+ if FSI_config['CSD_SOLVER'] == 'NATIVE':
-+ SolidSolver.timeIteration(time)
-+ elif FSI_config['CSD_SOLVER'] == 'METAFOR' or FSI_config['CSD_SOLVER'] == 'GETDP' or FSI_config['CSD_SOLVER'] == 'TESTER':
-+ SolidSolver.run(time-deltaT, time)
-+
-+ # --- Compute and monitor the FSI residual --- #
-+ varCoordNorm = self.computeSolidInterfaceResidual(SolidSolver)
-+ self.MPIPrint('\nFSI displacement norm : {}\n'.format(varCoordNorm))
-+ if varCoordNorm < FSITolerance:
-+ FSIConv = True
-+ break
-
-- # --- Relaxe the solid position --- #
-+ # --- Relaxe the solid position --- #
- self.MPIPrint('\nProcessing interface displacements...\n')
-- self.relaxSolidPosition(FSI_config)
--
-- self.FSIIter += 1
-- # --- End OF FSI loop --- #
-+ self.relaxSolidPosition(FSI_config)
-+
-+ self.FSIIter += 1
-+ # --- End OF FSI loop --- #
-
- self.MPIBarrier()
-
-- # --- Update the FSI history file --- #
-- if TimeIter > TimeIterTreshold:
-- self.MPIPrint('\nBGS is converged (strong coupling)')
-- self.writeFSIHistory(TimeIter, time, varCoordNorm, FSIConv)
--
-- # --- Update, monitor and output the fluid solution before the next time step ---#
-- FluidSolver.Update()
-- FluidSolver.Monitor(TimeIter)
-- FluidSolver.Output(TimeIter)
--
-- if TimeIter >= TimeIterTreshold:
-- if myid in self.solidSolverProcessors:
-- # --- Output the solid solution before thr next time step --- #
-- SolidSolver.writeSolution(time, self.FSIIter, TimeIter, NbTimeIter)
--
-- # --- Displacement predictor for the next time step and update of the solid solution --- #
-- self.MPIPrint('\nSolid displacement prediction for next time step')
-- self.displacementPredictor(FSI_config, SolidSolver, deltaT)
-+ # --- Update the FSI history file --- #
-+ if TimeIter > TimeIterTreshold:
-+ self.MPIPrint('\nBGS is converged (strong coupling)')
-+ self.writeFSIHistory(TimeIter, time, varCoordNorm, FSIConv)
-+
-+ # --- Update, monitor and output the fluid solution before the next time step ---#
-+ FluidSolver.Update()
-+ FluidSolver.Monitor(TimeIter)
-+ FluidSolver.Output(TimeIter)
-+
-+ if TimeIter >= TimeIterTreshold:
-+ if myid in self.solidSolverProcessors:
-+ # --- Output the solid solution before thr next time step --- #
-+ SolidSolver.writeSolution(time, self.FSIIter, TimeIter, NbTimeIter)
-+
-+ # --- Displacement predictor for the next time step and update of the solid solution --- #
-+ self.MPIPrint('\nSolid displacement prediction for next time step')
-+ self.displacementPredictor(FSI_config, SolidSolver, deltaT)
- if myid in self.solidSolverProcessors:
-- SolidSolver.updateSolution()
--
-- TimeIter += 1
-- time += deltaT
-- #--- End of the temporal loop --- #
-+ SolidSolver.updateSolution()
-+
-+ TimeIter += 1
-+ time += deltaT
-+ #--- End of the temporal loop --- #
-
- self.MPIBarrier()
-
-- self.MPIPrint('\n*************************')
-- self.MPIPrint('* End FSI computation *')
-- self.MPIPrint('*************************\n')
-+ self.MPIPrint('\n*************************')
-+ self.MPIPrint('* End FSI computation *')
-+ self.MPIPrint('*************************\n')
-
- def SteadyFSI(self, FSI_config,FluidSolver, SolidSolver):
-- """
-- Runs the steady FSI computation by synchronizing the fluid and solid solver with data exchange at the f/s interface.
-- """
-+ """
-+ Runs the steady FSI computation by synchronizing the fluid and solid solver with data exchange at the f/s interface.
-+ """
-
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-- numberPart = self.comm.Get_size()
-+ myid = self.comm.Get_rank()
-+ numberPart = self.comm.Get_size()
- else:
- myid = 0
- numberPart = 1
-
-- # --- Set some general variables for the steady computation --- #
-- NbIter = FSI_config['NB_EXT_ITER'] # number of fluid iteration at each FSI step
-- NbFSIIterMax = FSI_config['NB_FSI_ITER'] # maximum number of FSI iteration (for each time step)
-- FSITolerance = FSI_config['FSI_TOLERANCE'] # f/s interface tolerance
-- varCoordNorm = 0.0
--
-- self.MPIPrint('\n********************************')
-- self.MPIPrint('* Begin steady FSI computation *')
-- self.MPIPrint('********************************\n')
-- self.MPIPrint('\n*************** Enter Block Gauss Seidel (BGS) method for strong coupling FSI ***************')
-+ # --- Set some general variables for the steady computation --- #
-+ NbIter = FSI_config['NB_EXT_ITER'] # number of fluid iteration at each FSI step
-+ NbFSIIterMax = FSI_config['NB_FSI_ITER'] # maximum number of FSI iteration (for each time step)
-+ FSITolerance = FSI_config['FSI_TOLERANCE'] # f/s interface tolerance
-+ varCoordNorm = 0.0
-+
-+ self.MPIPrint('\n********************************')
-+ self.MPIPrint('* Begin steady FSI computation *')
-+ self.MPIPrint('********************************\n')
-+ self.MPIPrint('\n*************** Enter Block Gauss Seidel (BGS) method for strong coupling FSI ***************')
-
- self.getSolidInterfaceDisplacement(SolidSolver)
-
-- # --- External FSI loop --- #
-- self.FSIIter = 0
-- while self.FSIIter < NbFSIIterMax:
-- self.MPIPrint("\n>>>> FSI iteration {} <<<<".format(self.FSIIter))
-- self.MPIPrint('\nLaunching fluid solver for a steady computation...')
-- # --- Fluid solver call for FSI subiteration ---#
-- Iter = 0
-- FluidSolver.ResetConvergence()
-- while Iter < NbIter:
-- FluidSolver.PreprocessExtIter(Iter)
-- FluidSolver.Run()
-- StopIntegration = FluidSolver.Monitor(Iter)
-- FluidSolver.Output(Iter)
-- if StopIntegration:
-- break;
-- Iter += 1
--
-- # --- Surface fluid loads interpolation and communication ---#
-- self.MPIPrint('\nProcessing interface fluid loads...\n')
-+ # --- External FSI loop --- #
-+ self.FSIIter = 0
-+ while self.FSIIter < NbFSIIterMax:
-+ self.MPIPrint("\n>>>> FSI iteration {} <<<<".format(self.FSIIter))
-+ self.MPIPrint('\nLaunching fluid solver for a steady computation...')
-+ # --- Fluid solver call for FSI subiteration ---#
-+ Iter = 0
-+ FluidSolver.ResetConvergence()
-+ while Iter < NbIter:
-+ FluidSolver.PreprocessExtIter(Iter)
-+ FluidSolver.Run()
-+ StopIntegration = FluidSolver.Monitor(Iter)
-+ FluidSolver.Output(Iter)
-+ if StopIntegration:
-+ break;
-+ Iter += 1
-+
-+ # --- Surface fluid loads interpolation and communication ---#
-+ self.MPIPrint('\nProcessing interface fluid loads...\n')
- self.MPIBarrier()
-- self.getFluidInterfaceNodalForce(FSI_config, FluidSolver)
-+ self.getFluidInterfaceNodalForce(FSI_config, FluidSolver)
- self.MPIBarrier()
-- self.interpolateFluidLoadsOnSolidMesh(FSI_config)
-- self.setSolidInterfaceLoads(SolidSolver, FSI_config, 0.05)
--
-- # --- Solid solver call for FSI subiteration --- #
-- self.MPIPrint('\nLaunching solid solver for a static computation...\n')
-+ self.interpolateFluidLoadsOnSolidMesh(FSI_config)
-+ self.setSolidInterfaceLoads(SolidSolver, FSI_config, 0.05)
-+
-+ # --- Solid solver call for FSI subiteration --- #
-+ self.MPIPrint('\nLaunching solid solver for a static computation...\n')
- if myid in self.solidSolverProcessors:
-- if FSI_config['CSD_SOLVER'] == 'NATIVE':
-- SolidSolver.staticComputation()
-+ if FSI_config['CSD_SOLVER'] == 'NATIVE':
-+ SolidSolver.staticComputation()
- else:
- SolidSolver.run(0.0, 0.05)
-- SolidSolver.writeSolution(0.0, self.FSIIter, Iter, NbIter)
-+ SolidSolver.writeSolution(0.0, self.FSIIter, Iter, NbIter)
-
-- # --- Compute and monitor the FSI residual --- #
-- varCoordNorm = self.computeSolidInterfaceResidual(SolidSolver)
-- self.MPIPrint('\nFSI displacement norm : {}\n'.format(varCoordNorm))
-+ # --- Compute and monitor the FSI residual --- #
-+ varCoordNorm = self.computeSolidInterfaceResidual(SolidSolver)
-+ self.MPIPrint('\nFSI displacement norm : {}\n'.format(varCoordNorm))
- self.writeFSIHistory(0, 0.0, varCoordNorm, False)
-- if varCoordNorm < FSITolerance:
-- break
-+ if varCoordNorm < FSITolerance:
-+ break
-
- # --- Relaxe the solid displacement and update the solid solution --- #
- self.MPIPrint('\nProcessing interface displacements...\n')
-- self.relaxSolidPosition(FSI_config)
-+ self.relaxSolidPosition(FSI_config)
- if myid in self.solidSolverProcessors:
- SolidSolver.updateSolution()
--
-- # --- Mesh morphing step (displacement interpolation, displacements communication, and mesh morpher call) --- #
-- self.interpolateSolidPositionOnFluidMesh(FSI_config)
-- self.MPIPrint('\nPerforming static mesh deformation...\n')
-- self.setFluidInterfaceVarCoord(FluidSolver)
-- FluidSolver.StaticMeshUpdate()
-- self.FSIIter += 1
-+
-+ # --- Mesh morphing step (displacement interpolation, displacements communication, and mesh morpher call) --- #
-+ self.interpolateSolidPositionOnFluidMesh(FSI_config)
-+ self.MPIPrint('\nPerforming static mesh deformation...\n')
-+ self.setFluidInterfaceVarCoord(FluidSolver)
-+ FluidSolver.StaticMeshUpdate()
-+ self.FSIIter += 1
-
- self.MPIBarrier()
-
-- self.MPIPrint('\nBGS is converged (strong coupling)')
-- self.MPIPrint(' ')
-- self.MPIPrint('*************************')
-- self.MPIPrint('* End FSI computation *')
-- self.MPIPrint('*************************')
-- self.MPIPrint(' ')
-+ self.MPIPrint('\nBGS is converged (strong coupling)')
-+ self.MPIPrint(' ')
-+ self.MPIPrint('*************************')
-+ self.MPIPrint('* End FSI computation *')
-+ self.MPIPrint('*************************')
-+ self.MPIPrint(' ')
-diff -Naur old/SU2_PY/FSI/PitchPlungeAirfoilStructuralTester.py new/SU2_PY/FSI/PitchPlungeAirfoilStructuralTester.py
---- old/SU2_PY/FSI/PitchPlungeAirfoilStructuralTester.py 2020-05-01 19:09:18.000000000 +0300
-+++ new/SU2_PY/FSI/PitchPlungeAirfoilStructuralTester.py 2020-05-10 16:17:07.000000000 +0300
-@@ -174,9 +174,9 @@
-
- with open(self.Config_file) as configfile:
- while 1:
-- line = configfile.readline()
-- if not line:
-- break
-+ line = configfile.readline()
-+ if not line:
-+ break
-
- # remove line returns
- line = line.strip('\r\n')
-@@ -189,41 +189,41 @@
- this_value = line[1].strip()
-
- for case in switch(this_param):
-- #integer values
-- #if case("NB_FSI_ITER") :
-- #self.Config[this_param] = int(this_value)
-- #break
--
-- #float values
-- if case("DELTA_T") : pass
-- if case("START_TIME") : pass
-- if case("STOP_TIME") : pass
-- if case("SPRING_MASS") : pass
-- if case("INERTIA_FLEXURAL") : pass
-- if case("SPRING_STIFFNESS") : pass
-- if case("SPRING_DAMPING") : pass
-- if case("TORSIONAL_STIFFNESS") : pass
-- if case("TORSIONAL_DAMPING") : pass
-- if case("CORD") : pass
-- if case("FLEXURAL_AXIS") : pass
-- if case("GRAVITY_CENTER") : pass
-- if case("INITIAL_DISP") : pass
-- if case("INITIAL_ANGLE") : pass
-- if case("RHO") :
-- self.Config[this_param] = float(this_value)
-- break
--
-- #string values
-- if case("TIME_MARCHING") : pass
-- if case("MESH_FILE") : pass
-- if case("CSD_SOLVER") : pass
-- if case("MOVING_MARKER") : pass
-- if case("STRUCT_TYPE") :
-- self.Config[this_param] = this_value
-- break
-+ #integer values
-+ #if case("NB_FSI_ITER") :
-+ #self.Config[this_param] = int(this_value)
-+ #break
-+
-+ #float values
-+ if case("DELTA_T") : pass
-+ if case("START_TIME") : pass
-+ if case("STOP_TIME") : pass
-+ if case("SPRING_MASS") : pass
-+ if case("INERTIA_FLEXURAL") : pass
-+ if case("SPRING_STIFFNESS") : pass
-+ if case("SPRING_DAMPING") : pass
-+ if case("TORSIONAL_STIFFNESS") : pass
-+ if case("TORSIONAL_DAMPING") : pass
-+ if case("CORD") : pass
-+ if case("FLEXURAL_AXIS") : pass
-+ if case("GRAVITY_CENTER") : pass
-+ if case("INITIAL_DISP") : pass
-+ if case("INITIAL_ANGLE") : pass
-+ if case("RHO") :
-+ self.Config[this_param] = float(this_value)
-+ break
-+
-+ #string values
-+ if case("TIME_MARCHING") : pass
-+ if case("MESH_FILE") : pass
-+ if case("CSD_SOLVER") : pass
-+ if case("MOVING_MARKER") : pass
-+ if case("STRUCT_TYPE") :
-+ self.Config[this_param] = this_value
-+ break
-
-- if case():
-- print(this_param + " is an invalid option !")
-+ if case():
-+ print(this_param + " is an invalid option !")
- break
-
- def __readSU2Mesh(self):
-@@ -233,78 +233,78 @@
- print('Opened mesh file ' + self.Mesh_file + '.')
- while 1:
- line = meshfile.readline()
-- if not line:
-- break
-+ if not line:
-+ break
-
-- pos = line.find('NDIM')
-- if pos != -1:
-- line = line.strip('\r\n')
-+ pos = line.find('NDIM')
-+ if pos != -1:
-+ line = line.strip('\r\n')
- line = line.split("=",1)
-- self.nDim = int(line[1])
-- continue
--
-- pos = line.find('NELEM')
-- if pos != -1:
-- line = line.strip('\r\n')
-+ self.nDim = int(line[1])
-+ continue
-+
-+ pos = line.find('NELEM')
-+ if pos != -1:
-+ line = line.strip('\r\n')
- line = line.split("=",1)
-- self.nElem = int(line[1])
-- continue
-+ self.nElem = int(line[1])
-+ continue
-
-- pos = line.find('NPOIN')
-- if pos != -1:
-- line = line.strip('\r\n')
-+ pos = line.find('NPOIN')
-+ if pos != -1:
-+ line = line.strip('\r\n')
- line = line.split("=",1)
-- self.nPoint = int(line[1])
-+ self.nPoint = int(line[1])
- for iPoint in range(self.nPoint):
-- self.node.append(Point())
-- line = meshfile.readline()
-- line = line.strip('\r\n')
-- line = line.split(' ',self.nDim)
-- x = float(line[0])
-- y = float(line[1])
-+ self.node.append(Point())
-+ line = meshfile.readline()
-+ line = line.strip('\r\n')
-+ line = line.split(' ',self.nDim)
-+ x = float(line[0])
-+ y = float(line[1])
- z = 0.0
-- if self.nDim == 3:
-- z = float(line[2])
-- self.node[iPoint].SetCoord((x,y,z))
-+ if self.nDim == 3:
-+ z = float(line[2])
-+ self.node[iPoint].SetCoord((x,y,z))
- self.node[iPoint].SetCoord0((x,y,z))
-- self.node[iPoint].SetCoord_n((x,y,z))
-- continue
-+ self.node[iPoint].SetCoord_n((x,y,z))
-+ continue
-
-- pos = line.find('NMARK')
-- if pos != -1:
-- line = line.strip('\r\n')
-+ pos = line.find('NMARK')
-+ if pos != -1:
-+ line = line.strip('\r\n')
- line = line.split("=",1)
-- self.nMarker = int(line[1])
-- continue
-+ self.nMarker = int(line[1])
-+ continue
-
-- pos = line.find('MARKER_TAG')
-- if pos != -1:
-- line = line.strip('\r\n')
-- line = line.replace(" ", "")
-+ pos = line.find('MARKER_TAG')
-+ if pos != -1:
-+ line = line.strip('\r\n')
-+ line = line.replace(" ", "")
- line = line.split("=",1)
-- markerTag = line[1]
-- if markerTag == self.FSI_marker:
-- self.markers[markerTag] = []
-- line = meshfile.readline()
-- line = line.strip('\r\n')
-- line = line.split("=",1)
-- nElem = int(line[1])
-- for iElem in range(nElem):
-- line = meshfile.readline()
-- line = line.strip('\r\n')
-- line = line.split(' ',1)
-- elemType = int(line[0])
-- if elemType == 3:
-- nodes = line[1].split(' ', 1)
-- if not int(nodes[0]) in self.markers[markerTag]:
-- self.markers[markerTag].append(int(nodes[0]))
-- if not int(nodes[1]) in self.markers[markerTag]:
-- self.markers[markerTag].append(int(nodes[1]))
-- else:
-- print("Element type {} is not recognized !!".format(elemType))
-- continue
-- else:
-- continue
-+ markerTag = line[1]
-+ if markerTag == self.FSI_marker:
-+ self.markers[markerTag] = []
-+ line = meshfile.readline()
-+ line = line.strip('\r\n')
-+ line = line.split("=",1)
-+ nElem = int(line[1])
-+ for iElem in range(nElem):
-+ line = meshfile.readline()
-+ line = line.strip('\r\n')
-+ line = line.split(' ',1)
-+ elemType = int(line[0])
-+ if elemType == 3:
-+ nodes = line[1].split(' ', 1)
-+ if not int(nodes[0]) in self.markers[markerTag]:
-+ self.markers[markerTag].append(int(nodes[0]))
-+ if not int(nodes[1]) in self.markers[markerTag]:
-+ self.markers[markerTag].append(int(nodes[1]))
-+ else:
-+ print("Element type {} is not recognized !!".format(elemType))
-+ continue
-+ else:
-+ continue
-
- print("Number of dimensions: {}".format(self.nDim))
- print("Number of elements: {}".format(self.nElem))
-@@ -441,23 +441,23 @@
- Coord_n = self.node[iPoint].GetCoord_n()
-
- if self.Unsteady:
-- r = Coord_n - self.centerOfRotation_n
-- else:
-- r = Coord - self.centerOfRotation
-+ r = Coord_n - self.centerOfRotation_n
-+ else:
-+ r = Coord - self.centerOfRotation
-
-- rotCoord = rotMatrix.dot(r)
-+ rotCoord = rotMatrix.dot(r)
-
- newCoord = newCenter + rotCoord
- newVel[0] = Centerdot[0]+psidot*(newCoord[1]-newCenter[1])
-- newVel[1] = Centerdot[1]-psidot*(newCoord[0]-newCenter[0])
-- newVel[2] = Centerdot[2]+0.0
-+ newVel[1] = Centerdot[1]-psidot*(newCoord[0]-newCenter[0])
-+ newVel[2] = Centerdot[2]+0.0
-
- self.node[iPoint].SetCoord((newCoord[0], newCoord[1], newCoord[2]))
- self.node[iPoint].SetVel((newVel[0], newVel[1], newVel[2]))
-
-- if initialize:
-- self.node[iPoint].SetCoord_n((newCoord[0], newCoord[1], newCoord[2]))
-- self.node[iPoint].SetVel_n((newVel[0], newVel[1], newVel[2]))
-+ if initialize:
-+ self.node[iPoint].SetCoord_n((newCoord[0], newCoord[1], newCoord[2]))
-+ self.node[iPoint].SetVel_n((newVel[0], newVel[1], newVel[2]))
-
- self.centerOfRotation = np.copy(newCenter)
-
-diff -Naur old/SU2_PY/FSI/io/FSI_config.py new/SU2_PY/FSI/io/FSI_config.py
---- old/SU2_PY/FSI/io/FSI_config.py 2020-05-01 19:09:18.000000000 +0300
-+++ new/SU2_PY/FSI/io/FSI_config.py 2020-05-10 16:17:07.000000000 +0300
-@@ -58,23 +58,23 @@
- self.readConfig()
-
- def __str__(self):
-- tempString = str()
-- for key, value in self._ConfigContent.items():
-- tempString += "{} = {}\n".format(key,value)
-- return tempString
-+ tempString = str()
-+ for key, value in self._ConfigContent.items():
-+ tempString += "{} = {}\n".format(key,value)
-+ return tempString
-
- def __getitem__(self,key):
-- return self._ConfigContent[key]
-+ return self._ConfigContent[key]
-
- def __setitem__(self, key, value):
-- self._ConfigContent[key] = value
-+ self._ConfigContent[key] = value
-
- def readConfig(self):
- input_file = open(self.ConfigFileName)
- while 1:
-- line = input_file.readline()
-- if not line:
-- break
-+ line = input_file.readline()
-+ if not line:
-+ break
- # remove line returns
- line = line.strip('\r\n')
- # make sure it has useful data
-@@ -86,46 +86,46 @@
- this_value = line[1].strip()
-
- for case in switch(this_param):
-- #integer values
-- if case("NDIM") : pass
-- #if case("MESH_DEF_LIN_ITER") : pass
-- #if case("MESH_DEF_NONLIN_ITER") : pass
-- if case("RESTART_ITER") : pass
-- if case("NB_EXT_ITER") : pass
-- if case("NB_FSI_ITER") :
-- self._ConfigContent[this_param] = int(this_value)
-- break
-+ #integer values
-+ if case("NDIM") : pass
-+ #if case("MESH_DEF_LIN_ITER") : pass
-+ #if case("MESH_DEF_NONLIN_ITER") : pass
-+ if case("RESTART_ITER") : pass
-+ if case("NB_EXT_ITER") : pass
-+ if case("NB_FSI_ITER") :
-+ self._ConfigContent[this_param] = int(this_value)
-+ break
-
-- #float values
-+ #float values
- if case("RBF_RADIUS") : pass
-- if case("AITKEN_PARAM") : pass
-- if case("START_TIME") : pass
-- if case("UNST_TIMESTEP") : pass
-- if case("UNST_TIME") : pass
-- if case("FSI_TOLERANCE") :
-- self._ConfigContent[this_param] = float(this_value)
-- break
--
-- #string values
-- if case("CFD_CONFIG_FILE_NAME") : pass
-- if case("CSD_SOLVER") : pass
-- if case("CSD_CONFIG_FILE_NAME") : pass
-- if case("RESTART_SOL") : pass
-- if case("MATCHING_MESH") : pass
-+ if case("AITKEN_PARAM") : pass
-+ if case("START_TIME") : pass
-+ if case("UNST_TIMESTEP") : pass
-+ if case("UNST_TIME") : pass
-+ if case("FSI_TOLERANCE") :
-+ self._ConfigContent[this_param] = float(this_value)
-+ break
-+
-+ #string values
-+ if case("CFD_CONFIG_FILE_NAME") : pass
-+ if case("CSD_SOLVER") : pass
-+ if case("CSD_CONFIG_FILE_NAME") : pass
-+ if case("RESTART_SOL") : pass
-+ if case("MATCHING_MESH") : pass
- if case("MESH_INTERP_METHOD") : pass
-- if case("DISP_PRED") : pass
-- if case("AITKEN_RELAX") : pass
-- if case("TIME_MARCHING") : pass
-- if case("INTERNAL_FLOW") :
-- #if case("MESH_DEF_METHOD") : pass
-- self._ConfigContent[this_param] = this_value
-- break
--
-- if case():
-- print(this_param + " is an invalid option !")
-- break
-- #end for
--
-+ if case("DISP_PRED") : pass
-+ if case("AITKEN_RELAX") : pass
-+ if case("TIME_MARCHING") : pass
-+ if case("INTERNAL_FLOW") :
-+ #if case("MESH_DEF_METHOD") : pass
-+ self._ConfigContent[this_param] = this_value
-+ break
-+
-+ if case():
-+ print(this_param + " is an invalid option !")
-+ break
-+ #end for
-+
-
-
- #def dump()
diff --git a/sci-physics/SU2/files/SU2-7.0.8-fix-python-optimize.patch b/sci-physics/SU2/files/SU2-7.0.8-fix-python-optimize.patch
deleted file mode 100644
index 64bff0a33f..0000000000
--- a/sci-physics/SU2/files/SU2-7.0.8-fix-python-optimize.patch
+++ /dev/null
@@ -1,2212 +0,0 @@
-diff -Naur old/SU2_PY/FSI/FSIInterface.py new/SU2_PY/FSI/FSIInterface.py
---- old/SU2_PY/FSI/FSIInterface.py 2020-05-01 19:09:18.000000000 +0300
-+++ new/SU2_PY/FSI/FSIInterface.py 2020-05-10 16:17:07.000000000 +0300
-@@ -6,8 +6,8 @@
- # \version 7.0.8 "Blackbird"
- #
- # SU2 Project Website: https://su2code.github.io
--#
--# The SU2 Project is maintained by the SU2 Foundation
-+#
-+# The SU2 Project is maintained by the SU2 Foundation
- # (http://su2foundation.org)
- #
- # Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md)
-@@ -16,7 +16,7 @@
- # modify it under the terms of the GNU Lesser General Public
- # License as published by the Free Software Foundation; either
- # version 2.1 of the License, or (at your option) any later version.
--#
-+#
- # SU2 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
-@@ -42,19 +42,19 @@
- # ----------------------------------------------------------------------
-
- class Interface:
-- """
-+ """
- FSI interface class that handles fluid/solid solvers synchronisation and communication
- """
--
-+
- def __init__(self, FSI_config, FluidSolver, SolidSolver, have_MPI):
-- """
-- Class constructor. Declare some variables and do some screen outputs.
-- """
--
-+ """
-+ Class constructor. Declare some variables and do some screen outputs.
-+ """
-+
- if have_MPI == True:
- from mpi4py import MPI
- self.MPI = MPI
-- self.comm = MPI.COMM_WORLD #MPI World communicator
-+ self.comm = MPI.COMM_WORLD #MPI World communicator
- self.have_MPI = True
- myid = self.comm.Get_rank()
- else:
-@@ -62,42 +62,42 @@
- self.have_MPI = False
- myid = 0
-
-- self.rootProcess = 0 #the root process is chosen to be MPI rank = 0
-+ self.rootProcess = 0 #the root process is chosen to be MPI rank = 0
-
-- self.nDim = FSI_config['NDIM'] #problem dimension
-+ self.nDim = FSI_config['NDIM'] #problem dimension
-
-- self.haveFluidSolver = False #True if the fluid solver is initialized on the current rank
-- self.haveSolidSolver = False #True if the solid solver is initialized on the current rank
-- self.haveFluidInterface = False #True if the current rank owns at least one fluid interface node
-- self.haveSolidInterface = False #True if the current rank owns at least one solid interface node
-+ self.haveFluidSolver = False #True if the fluid solver is initialized on the current rank
-+ self.haveSolidSolver = False #True if the solid solver is initialized on the current rank
-+ self.haveFluidInterface = False #True if the current rank owns at least one fluid interface node
-+ self.haveSolidInterface = False #True if the current rank owns at least one solid interface node
-
-- self.fluidSolverProcessors = list() #list of partitions where the fluid solver is initialized
-- self.solidSolverProcessors = list() #list of partitions where the solid solver is initialized
-+ self.fluidSolverProcessors = list() #list of partitions where the fluid solver is initialized
-+ self.solidSolverProcessors = list() #list of partitions where the solid solver is initialized
- self.fluidInterfaceProcessors = list() #list of partitions where there are fluid interface nodes
-- self.solidInterfaceProcessors = list() #list of partitions where there are solid interface nodes
-+ self.solidInterfaceProcessors = list() #list of partitions where there are solid interface nodes
-
-- self.fluidInterfaceIdentifier = None #object that can identify the f/s interface within the fluid solver
-- self.solidInterfaceIdentifier = None #object that can identify the f/s interface within the solid solver
-+ self.fluidInterfaceIdentifier = None #object that can identify the f/s interface within the fluid solver
-+ self.solidInterfaceIdentifier = None #object that can identify the f/s interface within the solid solver
-
-- self.fluidGlobalIndexRange = {} #contains the global FSI indexing of each fluid interface node for all partitions
-- self.solidGlobalIndexRange = {} #contains the global FSI indexing of each solid interface node for all partitions
-+ self.fluidGlobalIndexRange = {} #contains the global FSI indexing of each fluid interface node for all partitions
-+ self.solidGlobalIndexRange = {} #contains the global FSI indexing of each solid interface node for all partitions
-
-- self.FluidHaloNodeList = {} #contains the the indices (fluid solver indexing) of the halo nodes for each partition
-- self.fluidIndexing = {} #links between the fluid solver indexing and the FSI indexing for the interface nodes
-- self.SolidHaloNodeList = {} #contains the the indices (solid solver indexing) of the halo nodes for each partition
-- self.solidIndexing = {} #links between the solid solver indexing and the FSI indexing for the interface nodes
--
-- self.nLocalFluidInterfaceNodes = 0 #number of nodes (halo nodes included) on the fluid interface, on each partition
-- self.nLocalFluidInterfaceHaloNode = 0 #number of halo nodes on the fluid intrface, on each partition
-- self.nLocalFluidInterfacePhysicalNodes = 0 #number of physical (= non halo) nodes on the fluid interface, on each partition
-- self.nFluidInterfaceNodes = 0 #number of nodes on the fluid interface, sum over all the partitions
-- self.nFluidInterfacePhysicalNodes = 0 #number of physical nodes on the fluid interface, sum over all partitions
--
-- self.nLocalSolidInterfaceNodes = 0 #number of physical nodes on the solid interface, on each partition
-- self.nLocalSolidInterfaceHaloNode = 0 #number of halo nodes on the solid intrface, on each partition
-- self.nLocalSolidInterfacePhysicalNodes = 0 #number of physical (= non halo) nodes on the solid interface, on each partition
-- self.nSolidInterfaceNodes = 0 #number of nodes on the solid interface, sum over all partitions
-- self.nSolidInterfacePhysicalNodes = 0 #number of physical nodes on the solid interface, sum over all partitions
-+ self.FluidHaloNodeList = {} #contains the the indices (fluid solver indexing) of the halo nodes for each partition
-+ self.fluidIndexing = {} #links between the fluid solver indexing and the FSI indexing for the interface nodes
-+ self.SolidHaloNodeList = {} #contains the the indices (solid solver indexing) of the halo nodes for each partition
-+ self.solidIndexing = {} #links between the solid solver indexing and the FSI indexing for the interface nodes
-+
-+ self.nLocalFluidInterfaceNodes = 0 #number of nodes (halo nodes included) on the fluid interface, on each partition
-+ self.nLocalFluidInterfaceHaloNode = 0 #number of halo nodes on the fluid intrface, on each partition
-+ self.nLocalFluidInterfacePhysicalNodes = 0 #number of physical (= non halo) nodes on the fluid interface, on each partition
-+ self.nFluidInterfaceNodes = 0 #number of nodes on the fluid interface, sum over all the partitions
-+ self.nFluidInterfacePhysicalNodes = 0 #number of physical nodes on the fluid interface, sum over all partitions
-+
-+ self.nLocalSolidInterfaceNodes = 0 #number of physical nodes on the solid interface, on each partition
-+ self.nLocalSolidInterfaceHaloNode = 0 #number of halo nodes on the solid intrface, on each partition
-+ self.nLocalSolidInterfacePhysicalNodes = 0 #number of physical (= non halo) nodes on the solid interface, on each partition
-+ self.nSolidInterfaceNodes = 0 #number of nodes on the solid interface, sum over all partitions
-+ self.nSolidInterfacePhysicalNodes = 0 #number of physical nodes on the solid interface, sum over all partitions
-
- if FSI_config['MATCHING_MESH'] == 'NO' and (FSI_config['MESH_INTERP_METHOD'] == 'RBF' or FSI_config['MESH_INTERP_METHOD'] == 'TPS'):
- self.MappingMatrixA = None
-@@ -106,83 +106,83 @@
- self.MappingMatrixB_T = None
- self.d_RBF = self.nDim+1
- else:
-- self.MappingMatrix = None #interpolation/mapping matrix for meshes interpolation/mapping
-- self.MappingMatrix_T = None #transposed interpolation/mapping matrix for meshes interpolation/mapping
-+ self.MappingMatrix = None #interpolation/mapping matrix for meshes interpolation/mapping
-+ self.MappingMatrix_T = None #transposed interpolation/mapping matrix for meshes interpolation/mapping
- self.d_RBF = 0
-
-- self.localFluidInterface_array_X_init = None #initial fluid interface position on each partition (used for the meshes mapping)
-+ self.localFluidInterface_array_X_init = None #initial fluid interface position on each partition (used for the meshes mapping)
- self.localFluidInterface_array_Y_init = None
- self.localFluidInterface_array_Z_init = None
-
-- self.haloNodesPositionsInit = {} #initial position of the halo nodes (fluid side only)
-+ self.haloNodesPositionsInit = {} #initial position of the halo nodes (fluid side only)
-
-- self.solidInterface_array_DispX = None #solid interface displacement
-+ self.solidInterface_array_DispX = None #solid interface displacement
- self.solidInterface_array_DispY = None
- self.solidInterface_array_DispZ = None
-
-- self.solidInterfaceResidual_array_X = None #solid interface position residual
-+ self.solidInterfaceResidual_array_X = None #solid interface position residual
- self.solidInterfaceResidual_array_Y = None
- self.solidInterfaceResidual_array_Z = None
-
-- self.solidInterfaceResidualnM1_array_X = None #solid interface position residual at the previous BGS iteration
-+ self.solidInterfaceResidualnM1_array_X = None #solid interface position residual at the previous BGS iteration
- self.solidInterfaceResidualnM1_array_Y = None
- self.solidInterfaceResidualnM1_array_Z = None
--
-- self.fluidInterface_array_DispX = None #fluid interface displacement
-+
-+ self.fluidInterface_array_DispX = None #fluid interface displacement
- self.fluidInterface_array_DispY = None
- self.fluidInterface_array_DispZ = None
-
-- self.fluidLoads_array_X = None #loads on the fluid side of the f/s interface
-+ self.fluidLoads_array_X = None #loads on the fluid side of the f/s interface
- self.fluidLoads_array_Y = None
- self.fluidLoads_array_Z = None
-
-- self.solidLoads_array_X = None #loads on the solid side of the f/s interface
-+ self.solidLoads_array_X = None #loads on the solid side of the f/s interface
- self.solidLoads_array_Y = None
- self.solidLoads_array_Z = None
-
-- self.aitkenParam = FSI_config['AITKEN_PARAM'] #relaxation parameter for the BGS method
-- self.FSIIter = 0 #current FSI iteration
-- self.unsteady = False #flag for steady or unsteady simulation (default is steady)
--
-- # ---Some screen output ---
-- self.MPIPrint('Fluid solver : SU2_CFD')
-- self.MPIPrint('Solid solver : {}'.format(FSI_config['CSD_SOLVER']))
-+ self.aitkenParam = FSI_config['AITKEN_PARAM'] #relaxation parameter for the BGS method
-+ self.FSIIter = 0 #current FSI iteration
-+ self.unsteady = False #flag for steady or unsteady simulation (default is steady)
-+
-+ # ---Some screen output ---
-+ self.MPIPrint('Fluid solver : SU2_CFD')
-+ self.MPIPrint('Solid solver : {}'.format(FSI_config['CSD_SOLVER']))
-
-- if FSI_config['TIME_MARCHING'] == 'YES':
-+ if FSI_config['TIME_MARCHING'] == 'YES':
- self.MPIPrint('Unsteady coupled simulation with physical time step : {} s'.format(FSI_config['UNST_TIMESTEP']))
- self.unsteady = True
-- else:
-- self.MPIPrint('Steady coupled simulation')
-+ else:
-+ self.MPIPrint('Steady coupled simulation')
-
-- if FSI_config['MATCHING_MESH'] == 'YES':
-- self.MPIPrint('Matching fluid-solid interface')
-- else:
-+ if FSI_config['MATCHING_MESH'] == 'YES':
-+ self.MPIPrint('Matching fluid-solid interface')
-+ else:
- if FSI_config['MESH_INTERP_METHOD'] == 'TPS':
-- self.MPIPrint('Non matching fluid-solid interface with Thin Plate Spline interpolation')
-+ self.MPIPrint('Non matching fluid-solid interface with Thin Plate Spline interpolation')
- elif FSI_config['MESH_INTERP_METHOD'] == 'RBF':
- self.MPIPrint('Non matching fluid-solid interface with Radial Basis Function interpolation')
- self.RBF_rad = FSI_config['RBF_RADIUS']
-- self.MPIPrint('Radius value : {}'.format(self.RBF_rad))
-+ self.MPIPrint('Radius value : {}'.format(self.RBF_rad))
- else:
-- self.MPIPrint('Non matching fluid-solid interface with Nearest Neighboor interpolation')
-+ self.MPIPrint('Non matching fluid-solid interface with Nearest Neighboor interpolation')
-
-- self.MPIPrint('Solid predictor : {}'.format(FSI_config['DISP_PRED']))
-+ self.MPIPrint('Solid predictor : {}'.format(FSI_config['DISP_PRED']))
-
-- self.MPIPrint('Maximum number of FSI iterations : {}'.format(FSI_config['NB_FSI_ITER']))
-+ self.MPIPrint('Maximum number of FSI iterations : {}'.format(FSI_config['NB_FSI_ITER']))
-
-- self.MPIPrint('FSI tolerance : {}'.format(FSI_config['FSI_TOLERANCE']))
-+ self.MPIPrint('FSI tolerance : {}'.format(FSI_config['FSI_TOLERANCE']))
-
-- if FSI_config['AITKEN_RELAX'] == 'STATIC':
-- self.MPIPrint('Static Aitken under-relaxation with constant parameter {}'.format(FSI_config['AITKEN_PARAM']))
-- elif FSI_config['AITKEN_RELAX'] == 'DYNAMIC':
-- self.MPIPrint('Dynamic Aitken under-relaxation with initial parameter {}'.format(FSI_config['AITKEN_PARAM']))
-- else:
-- self.MPIPrint('No Aitken under-relaxation')
-+ if FSI_config['AITKEN_RELAX'] == 'STATIC':
-+ self.MPIPrint('Static Aitken under-relaxation with constant parameter {}'.format(FSI_config['AITKEN_PARAM']))
-+ elif FSI_config['AITKEN_RELAX'] == 'DYNAMIC':
-+ self.MPIPrint('Dynamic Aitken under-relaxation with initial parameter {}'.format(FSI_config['AITKEN_PARAM']))
-+ else:
-+ self.MPIPrint('No Aitken under-relaxation')
-
- self.MPIPrint('FSI interface is set')
-
- def MPIPrint(self, message):
-- """
-+ """
- Print a message on screen only from the master process.
- """
-
-@@ -198,28 +198,28 @@
- """
- Perform a synchronization barrier in case of parallel run with MPI.
- """
--
-+
- if self.have_MPI == True:
- self.comm.barrier()
-
- def connect(self, FSI_config, FluidSolver, SolidSolver):
-- """
-- Connection between solvers.
-- Creates the communication support between the two solvers.
-- Gets information about f/s interfaces from the two solvers.
-- """
-+ """
-+ Connection between solvers.
-+ Creates the communication support between the two solvers.
-+ Gets information about f/s interfaces from the two solvers.
-+ """
- if self.have_MPI == True:
- myid = self.comm.Get_rank()
-- MPIsize = self.comm.Get_size()
-+ MPIsize = self.comm.Get_size()
- else:
- myid = 0
- MPIsize = 1
--
-- # --- Identify the fluid and solid interfaces and store the number of nodes on both sides (and for each partition) ---
-+
-+ # --- Identify the fluid and solid interfaces and store the number of nodes on both sides (and for each partition) ---
- self.fluidInterfaceIdentifier = None
- self.nLocalFluidInterfaceNodes = 0
- if FluidSolver != None:
-- print('Fluid solver is initialized on process {}'.format(myid))
-+ print('Fluid solver is initialized on process {}'.format(myid))
- self.haveFluidSolver = True
- allMovingMarkersTags = FluidSolver.GetAllMovingMarkersTag()
- allMarkersID = FluidSolver.GetAllBoundaryMarkers()
-@@ -229,23 +229,23 @@
- if allMovingMarkersTags[0] in allMarkersID.keys():
- self.fluidInterfaceIdentifier = allMarkersID[allMovingMarkersTags[0]]
- if self.fluidInterfaceIdentifier != None:
-- self.nLocalFluidInterfaceNodes = FluidSolver.GetNumberVertices(self.fluidInterfaceIdentifier)
-- if self.nLocalFluidInterfaceNodes != 0:
-+ self.nLocalFluidInterfaceNodes = FluidSolver.GetNumberVertices(self.fluidInterfaceIdentifier)
-+ if self.nLocalFluidInterfaceNodes != 0:
- self.haveFluidInterface = True
-- print('Number of interface fluid nodes (halo nodes included) on proccess {} : {}'.format(myid,self.nLocalFluidInterfaceNodes))
-- else:
-- pass
-+ print('Number of interface fluid nodes (halo nodes included) on proccess {} : {}'.format(myid,self.nLocalFluidInterfaceNodes))
-+ else:
-+ pass
-
-- if SolidSolver != None:
-- print('Solid solver is initialized on process {}'.format(myid))
-+ if SolidSolver != None:
-+ print('Solid solver is initialized on process {}'.format(myid))
- self.haveSolidSolver = True
-- self.solidInterfaceIdentifier = SolidSolver.getFSIMarkerID()
-- self.nLocalSolidInterfaceNodes = SolidSolver.getNumberOfSolidInterfaceNodes(self.solidInterfaceIdentifier)
-- if self.nLocalSolidInterfaceNodes != 0:
-+ self.solidInterfaceIdentifier = SolidSolver.getFSIMarkerID()
-+ self.nLocalSolidInterfaceNodes = SolidSolver.getNumberOfSolidInterfaceNodes(self.solidInterfaceIdentifier)
-+ if self.nLocalSolidInterfaceNodes != 0:
- self.haveSolidInterface = True
- print('Number of interface solid nodes (halo nodes included) on proccess {} : {}'.format(myid,self.nLocalSolidInterfaceNodes))
-- else:
-- pass
-+ else:
-+ pass
-
- # --- Exchange information about processors on which the solvers are defined and where the interface nodes are lying ---
- if self.have_MPI == True:
-@@ -266,18 +266,18 @@
- else:
- sendBufSolidInterface = np.array(int(0))
- rcvBufFluid = np.zeros(MPIsize, dtype = int)
-- rcvBufSolid = np.zeros(MPIsize, dtype = int)
-+ rcvBufSolid = np.zeros(MPIsize, dtype = int)
- rcvBufFluidInterface = np.zeros(MPIsize, dtype = int)
-- rcvBufSolidInterface = np.zeros(MPIsize, dtype = int)
-+ rcvBufSolidInterface = np.zeros(MPIsize, dtype = int)
- self.comm.Allgather(sendBufFluid, rcvBufFluid)
- self.comm.Allgather(sendBufSolid, rcvBufSolid)
- self.comm.Allgather(sendBufFluidInterface, rcvBufFluidInterface)
- self.comm.Allgather(sendBufSolidInterface, rcvBufSolidInterface)
- for iProc in range(MPIsize):
-- if rcvBufFluid[iProc] == 1:
-+ if rcvBufFluid[iProc] == 1:
- self.fluidSolverProcessors.append(iProc)
- if rcvBufSolid[iProc] == 1:
-- self.solidSolverProcessors.append(iProc)
-+ self.solidSolverProcessors.append(iProc)
- if rcvBufFluidInterface[iProc] == 1:
- self.fluidInterfaceProcessors.append(iProc)
- if rcvBufSolidInterface[iProc] == 1:
-@@ -285,19 +285,19 @@
- del sendBufFluid, sendBufSolid, rcvBufFluid, rcvBufSolid, sendBufFluidInterface, sendBufSolidInterface, rcvBufFluidInterface, rcvBufSolidInterface
- else:
- self.fluidSolverProcessors.append(0)
-- self.solidSolverProcessors.append(0)
-+ self.solidSolverProcessors.append(0)
- self.fluidInterfaceProcessors.append(0)
- self.solidInterfaceProcessors.append(0)
-
-- self.MPIBarrier()
--
-- # --- Calculate the total number of nodes at the fluid interface (sum over all the partitions) ---
-+ self.MPIBarrier()
-+
-+ # --- Calculate the total number of nodes at the fluid interface (sum over all the partitions) ---
- # Calculate the number of halo nodes on each partition
- self.nLocalFluidInterfaceHaloNode = 0
-- for iVertex in range(self.nLocalFluidInterfaceNodes):
-+ for iVertex in range(self.nLocalFluidInterfaceNodes):
- if FluidSolver.IsAHaloNode(self.fluidInterfaceIdentifier, iVertex) == True:
- GlobalIndex = FluidSolver.GetVertexGlobalIndex(self.fluidInterfaceIdentifier, iVertex)
-- self.FluidHaloNodeList[GlobalIndex] = iVertex
-+ self.FluidHaloNodeList[GlobalIndex] = iVertex
- self.nLocalFluidInterfaceHaloNode += 1
- # Calculate the number of physical (= not halo) nodes on each partition
- self.nLocalFluidInterfacePhysicalNodes = self.nLocalFluidInterfaceNodes - self.nLocalFluidInterfaceHaloNode
-@@ -308,10 +308,10 @@
-
- # Same thing for the solid part
- self.nLocalSolidInterfaceHaloNode = 0
-- #for iVertex in range(self.nLocalSolidInterfaceNodes):
-+ #for iVertex in range(self.nLocalSolidInterfaceNodes):
- #if SoliddSolver.IsAHaloNode(self.fluidInterfaceIdentifier, iVertex) == True:
- #GlobalIndex = SolidSolver.GetVertexGlobalIndex(self.solidInterfaceIdentifier, iVertex)
-- #self.SolidHaloNodeList[GlobalIndex] = iVertex
-+ #self.SolidHaloNodeList[GlobalIndex] = iVertex
- #self.nLocalSolidInterfaceHaloNode += 1
- self.nLocalSolidInterfacePhysicalNodes = self.nLocalSolidInterfaceNodes - self.nLocalSolidInterfaceHaloNode
- if self.have_MPI == True:
-@@ -323,11 +323,11 @@
- # --- Calculate the total number of nodes (with and without halo) at the fluid interface (sum over all the partitions) and broadcast the number accross all processors ---
- sendBuffHalo = np.array(int(self.nLocalFluidInterfaceNodes))
- sendBuffPhysical = np.array(int(self.nLocalFluidInterfacePhysicalNodes))
-- rcvBuffHalo = np.zeros(1, dtype=int)
-+ rcvBuffHalo = np.zeros(1, dtype=int)
- rcvBuffPhysical = np.zeros(1, dtype=int)
-- if self.have_MPI == True:
-+ if self.have_MPI == True:
- self.comm.barrier()
-- self.comm.Allreduce(sendBuffHalo,rcvBuffHalo,op=self.MPI.SUM)
-+ self.comm.Allreduce(sendBuffHalo,rcvBuffHalo,op=self.MPI.SUM)
- self.comm.Allreduce(sendBuffPhysical,rcvBuffPhysical,op=self.MPI.SUM)
- self.nFluidInterfaceNodes = rcvBuffHalo[0]
- self.nFluidInterfacePhysicalNodes = rcvBuffPhysical[0]
-@@ -339,11 +339,11 @@
- # Same thing for the solid part
- sendBuffHalo = np.array(int(self.nLocalSolidInterfaceNodes))
- sendBuffPhysical = np.array(int(self.nLocalSolidInterfacePhysicalNodes))
-- rcvBuffHalo = np.zeros(1, dtype=int)
-+ rcvBuffHalo = np.zeros(1, dtype=int)
- rcvBuffPhysical = np.zeros(1, dtype=int)
- if self.have_MPI == True:
-- self.comm.barrier()
-- self.comm.Allreduce(sendBuffHalo,rcvBuffHalo,op=self.MPI.SUM)
-+ self.comm.barrier()
-+ self.comm.Allreduce(sendBuffHalo,rcvBuffHalo,op=self.MPI.SUM)
- self.comm.Allreduce(sendBuffPhysical,rcvBuffPhysical,op=self.MPI.SUM)
- self.nSolidInterfaceNodes = rcvBuffHalo[0]
- self.nSolidInterfacePhysicalNodes = rcvBuffPhysical[0]
-@@ -375,7 +375,7 @@
- if myid in self.fluidInterfaceProcessors:
- globalIndexStart = 0
- for iProc in range(myid):
-- globalIndexStart += self.fluidPhysicalInterfaceNodesDistribution[iProc]
-+ globalIndexStart += self.fluidPhysicalInterfaceNodesDistribution[iProc]
- globalIndexStop = globalIndexStart + self.nLocalFluidInterfacePhysicalNodes-1
- else:
- globalIndexStart = 0
-@@ -387,8 +387,8 @@
- temp[0] = [0,self.nLocalFluidInterfacePhysicalNodes-1]
- self.fluidGlobalIndexRange = list()
- self.fluidGlobalIndexRange.append(temp)
--
-- # Same thing for the solid part
-+
-+ # Same thing for the solid part
- if self.have_MPI == True:
- if myid in self.solidInterfaceProcessors:
- globalIndexStart = 0
-@@ -404,14 +404,14 @@
- temp = {}
- temp[0] = [0,self.nSolidInterfacePhysicalNodes-1]
- self.solidGlobalIndexRange = list()
-- self.solidGlobalIndexRange.append(temp)
-+ self.solidGlobalIndexRange.append(temp)
-
-- self.MPIPrint('Total number of fluid interface nodes (halo nodes included) : {}'.format(self.nFluidInterfaceNodes))
-- self.MPIPrint('Total number of solid interface nodes (halo nodes included) : {}'.format(self.nSolidInterfaceNodes))
-+ self.MPIPrint('Total number of fluid interface nodes (halo nodes included) : {}'.format(self.nFluidInterfaceNodes))
-+ self.MPIPrint('Total number of solid interface nodes (halo nodes included) : {}'.format(self.nSolidInterfaceNodes))
- self.MPIPrint('Total number of fluid interface nodes : {}'.format(self.nFluidInterfacePhysicalNodes))
- self.MPIPrint('Total number of solid interface nodes : {}'.format(self.nSolidInterfacePhysicalNodes))
-
-- self.MPIBarrier()
-+ self.MPIBarrier()
-
- # --- Create all the PETSc vectors required for parallel communication and parallel mesh mapping/interpolation (working for serial too) ---
- if self.have_MPI == True:
-@@ -432,8 +432,8 @@
- self.solidInterface_array_DispY.setSizes(self.nSolidInterfacePhysicalNodes+self.d_RBF)
- self.solidInterface_array_DispZ.setSizes(self.nSolidInterfacePhysicalNodes+self.d_RBF)
- self.solidInterface_array_DispX.set(0.0)
-- self.solidInterface_array_DispY.set(0.0)
-- self.solidInterface_array_DispZ.set(0.0)
-+ self.solidInterface_array_DispY.set(0.0)
-+ self.solidInterface_array_DispZ.set(0.0)
-
- if self.have_MPI == True:
- self.fluidInterface_array_DispX = PETSc.Vec().create(self.comm)
-@@ -536,30 +536,30 @@
- self.solidInterfaceResidualnM1_array_Z.set(0.0)
-
- def interfaceMapping(self,FluidSolver, SolidSolver, FSI_config):
-- """
-- Creates the one-to-one mapping between interfaces in case of matching meshes.
-- Creates the interpolation rules between interfaces in case of non-matching meshes.
-- """
-- if self.have_MPI == True:
-+ """
-+ Creates the one-to-one mapping between interfaces in case of matching meshes.
-+ Creates the interpolation rules between interfaces in case of non-matching meshes.
-+ """
-+ if self.have_MPI == True:
- myid = self.comm.Get_rank()
-- MPIsize = self.comm.Get_size()
-+ MPIsize = self.comm.Get_size()
- else:
- myid = 0
- MPIsize = 1
-
-- # --- Get the fluid interface from fluid solver on each partition ---
-- GlobalIndex = int()
-+ # --- Get the fluid interface from fluid solver on each partition ---
-+ GlobalIndex = int()
- localIndex = 0
- fluidIndexing_temp = {}
- self.localFluidInterface_array_X_init = np.zeros((self.nLocalFluidInterfacePhysicalNodes))
- self.localFluidInterface_array_Y_init = np.zeros((self.nLocalFluidInterfacePhysicalNodes))
- self.localFluidInterface_array_Z_init = np.zeros((self.nLocalFluidInterfacePhysicalNodes))
- for iVertex in range(self.nLocalFluidInterfaceNodes):
-- GlobalIndex = FluidSolver.GetVertexGlobalIndex(self.fluidInterfaceIdentifier, iVertex)
-- posx = FluidSolver.GetVertexCoordX(self.fluidInterfaceIdentifier, iVertex)
-- posy = FluidSolver.GetVertexCoordY(self.fluidInterfaceIdentifier, iVertex)
-- posz = FluidSolver.GetVertexCoordZ(self.fluidInterfaceIdentifier, iVertex)
-- if GlobalIndex in self.FluidHaloNodeList[myid].keys():
-+ GlobalIndex = FluidSolver.GetVertexGlobalIndex(self.fluidInterfaceIdentifier, iVertex)
-+ posx = FluidSolver.GetVertexCoordX(self.fluidInterfaceIdentifier, iVertex)
-+ posy = FluidSolver.GetVertexCoordY(self.fluidInterfaceIdentifier, iVertex)
-+ posz = FluidSolver.GetVertexCoordZ(self.fluidInterfaceIdentifier, iVertex)
-+ if GlobalIndex in self.FluidHaloNodeList[myid].keys():
- self.haloNodesPositionsInit[GlobalIndex] = (posx, posy, posz)
- else:
- fluidIndexing_temp[GlobalIndex] = self.__getGlobalIndex('fluid', myid, localIndex)
-@@ -576,17 +576,17 @@
- self.fluidIndexing = fluidIndexing_temp.copy()
- del fluidIndexing_temp
-
-- # --- Get the solid interface from solid solver on each partition ---
-+ # --- Get the solid interface from solid solver on each partition ---
- localIndex = 0
- solidIndexing_temp = {}
-- self.localSolidInterface_array_X = np.zeros(self.nLocalSolidInterfaceNodes)
-+ self.localSolidInterface_array_X = np.zeros(self.nLocalSolidInterfaceNodes)
- self.localSolidInterface_array_Y = np.zeros(self.nLocalSolidInterfaceNodes)
- self.localSolidInterface_array_Z = np.zeros(self.nLocalSolidInterfaceNodes)
- for iVertex in range(self.nLocalSolidInterfaceNodes):
- GlobalIndex = SolidSolver.getInterfaceNodeGlobalIndex(self.solidInterfaceIdentifier, iVertex)
-- posx = SolidSolver.getInterfaceNodePosX(self.solidInterfaceIdentifier, iVertex)
-- posy = SolidSolver.getInterfaceNodePosY(self.solidInterfaceIdentifier, iVertex)
-- posz = SolidSolver.getInterfaceNodePosZ(self.solidInterfaceIdentifier, iVertex)
-+ posx = SolidSolver.getInterfaceNodePosX(self.solidInterfaceIdentifier, iVertex)
-+ posy = SolidSolver.getInterfaceNodePosY(self.solidInterfaceIdentifier, iVertex)
-+ posz = SolidSolver.getInterfaceNodePosZ(self.solidInterfaceIdentifier, iVertex)
- if GlobalIndex in self.SolidHaloNodeList[myid].keys():
- pass
- else:
-@@ -605,14 +605,14 @@
- del solidIndexing_temp
-
-
-- # --- Create the PETSc parallel interpolation matrix ---
-+ # --- Create the PETSc parallel interpolation matrix ---
- if FSI_config['MATCHING_MESH'] == 'NO' and (FSI_config['MESH_INTERP_METHOD'] == 'RBF' or FSI_config['MESH_INTERP_METHOD'] == 'TPS'):
- if self.have_MPI == True:
- self.MappingMatrixA = PETSc.Mat().create(self.comm)
- self.MappingMatrixB = PETSc.Mat().create(self.comm)
- self.MappingMatrixA_T = PETSc.Mat().create(self.comm)
- self.MappingMatrixB_T = PETSc.Mat().create(self.comm)
-- if FSI_config['MESH_INTERP_METHOD'] == 'RBF' :
-+ if FSI_config['MESH_INTERP_METHOD'] == 'RBF' :
- self.MappingMatrixA.setType('mpiaij')
- self.MappingMatrixB.setType('mpiaij')
- self.MappingMatrixA_T.setType('mpiaij')
-@@ -627,7 +627,7 @@
- self.MappingMatrixB = PETSc.Mat().create()
- self.MappingMatrixA_T = PETSc.Mat().create()
- self.MappingMatrixB_T = PETSc.Mat().create()
-- if FSI_config['MESH_INTERP_METHOD'] == 'RBF' :
-+ if FSI_config['MESH_INTERP_METHOD'] == 'RBF' :
- self.MappingMatrixA.setType('aij')
- self.MappingMatrixB.setType('aij')
- self.MappingMatrixA_T.setType('aij')
-@@ -637,16 +637,16 @@
- self.MappingMatrixB.setType('aij')
- self.MappingMatrixA_T.setType('aij')
- self.MappingMatrixB_T.setType('aij')
-- self.MappingMatrixA.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nSolidInterfacePhysicalNodes+self.d_RBF))
-+ self.MappingMatrixA.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nSolidInterfacePhysicalNodes+self.d_RBF))
- self.MappingMatrixA.setUp()
- self.MappingMatrixA.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
-- self.MappingMatrixB.setSizes((self.nFluidInterfacePhysicalNodes, self.nSolidInterfacePhysicalNodes+self.d_RBF))
-+ self.MappingMatrixB.setSizes((self.nFluidInterfacePhysicalNodes, self.nSolidInterfacePhysicalNodes+self.d_RBF))
- self.MappingMatrixB.setUp()
- self.MappingMatrixB.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
-- self.MappingMatrixA_T.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nSolidInterfacePhysicalNodes+self.d_RBF))
-+ self.MappingMatrixA_T.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nSolidInterfacePhysicalNodes+self.d_RBF))
- self.MappingMatrixA_T.setUp()
- self.MappingMatrixA_T.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
-- self.MappingMatrixB_T.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nFluidInterfacePhysicalNodes))
-+ self.MappingMatrixB_T.setSizes((self.nSolidInterfacePhysicalNodes+self.d_RBF, self.nFluidInterfacePhysicalNodes))
- self.MappingMatrixB_T.setUp()
- self.MappingMatrixB_T.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
- else:
-@@ -660,21 +660,21 @@
- self.MappingMatrix_T = PETSc.Mat().create()
- self.MappingMatrix.setType('aij')
- self.MappingMatrix_T.setType('aij')
-- self.MappingMatrix.setSizes((self.nFluidInterfacePhysicalNodes, self.nSolidInterfacePhysicalNodes))
-+ self.MappingMatrix.setSizes((self.nFluidInterfacePhysicalNodes, self.nSolidInterfacePhysicalNodes))
- self.MappingMatrix.setUp()
- self.MappingMatrix.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
-- self.MappingMatrix_T.setSizes((self.nSolidInterfacePhysicalNodes, self.nFluidInterfacePhysicalNodes))
-+ self.MappingMatrix_T.setSizes((self.nSolidInterfacePhysicalNodes, self.nFluidInterfacePhysicalNodes))
- self.MappingMatrix_T.setUp()
- self.MappingMatrix_T.setOption(PETSc.Mat().Option.NEW_NONZERO_ALLOCATION_ERR, False)
--
--
-+
-+
- # --- Fill the interpolation matrix in parallel (working in serial too) ---
- if FSI_config['MATCHING_MESH'] == 'NO' and (FSI_config['MESH_INTERP_METHOD'] == 'RBF' or FSI_config['MESH_INTERP_METHOD'] == 'TPS'):
- self.MPIPrint('Building interpolation matrices...')
- if self.have_MPI == True:
- for iProc in self.solidInterfaceProcessors:
- if myid == iProc:
-- for jProc in self.solidInterfaceProcessors:
-+ for jProc in self.solidInterfaceProcessors:
- self.comm.Send(self.localSolidInterface_array_X, dest=jProc, tag=1)
- self.comm.Send(self.localSolidInterface_array_Y, dest=jProc, tag=2)
- self.comm.Send(self.localSolidInterface_array_Z, dest=jProc, tag=3)
-@@ -726,7 +726,7 @@
- self.TPSMeshMapping_B(solidInterfaceBuffRcv_X, solidInterfaceBuffRcv_Y, solidInterfaceBuffRcv_Z, iProc)
- else:
- self.NearestNeighboorMeshMapping(solidInterfaceBuffRcv_X, solidInterfaceBuffRcv_Y, solidInterfaceBuffRcv_Z, iProc)
-- else:
-+ else:
- self.matchingMeshMapping(solidInterfaceBuffRcv_X, solidInterfaceBuffRcv_Y, solidInterfaceBuffRcv_Z, iProc)
- else:
- if FSI_config['MATCHING_MESH'] == 'NO':
-@@ -735,10 +735,10 @@
- elif FSI_config['MESH_INTERP_METHOD'] == 'TPS' :
- self.TPSMeshMapping_B(self.localSolidInterface_array_X, self.localSolidInterface_array_Y, self.localSolidInterface_array_Z, 0)
- else:
-- self.NearestNeighboorMeshMapping(self.localSolidInterface_array_X, self.localSolidInterface_array_Y, self.localSolidInterface_array_Z, 0)
-- else:
-+ self.NearestNeighboorMeshMapping(self.localSolidInterface_array_X, self.localSolidInterface_array_Y, self.localSolidInterface_array_Z, 0)
-+ else:
- self.matchingMeshMapping(self.localSolidInterface_array_X, self.localSolidInterface_array_Y, self.localSolidInterface_array_Z, 0)
--
-+
- if FSI_config['MATCHING_MESH'] == 'NO' and (FSI_config['MESH_INTERP_METHOD'] == 'RBF' or FSI_config['MESH_INTERP_METHOD'] == 'TPS'):
- self.MappingMatrixB.assemblyBegin()
- self.MappingMatrixB.assemblyEnd()
-@@ -751,9 +751,9 @@
- self.MappingMatrix_T.assemblyBegin()
- self.MappingMatrix_T.assemblyEnd()
- self.MPIPrint("Interpolation matrix is built.")
--
-+
- self.MPIBarrier()
--
-+
- del self.localSolidInterface_array_X
- del self.localSolidInterface_array_Y
- del self.localSolidInterface_array_Z
-@@ -768,20 +768,20 @@
- myid = 0
-
- # --- Instantiate the spatial indexing ---
-- prop_index = index.Property()
-- prop_index.dimension = self.nDim
-- SolidSpatialTree = index.Index(properties=prop_index)
--
-+ prop_index = index.Property()
-+ prop_index.dimension = self.nDim
-+ SolidSpatialTree = index.Index(properties=prop_index)
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for jVertex in range(nSolidNodes):
- posX = solidInterfaceBuffRcv_X[jVertex]
- posY = solidInterfaceBuffRcv_Y[jVertex]
- posZ = solidInterfaceBuffRcv_Z[jVertex]
-- if self.nDim == 2 :
-- SolidSpatialTree.add(jVertex, (posX, posY))
-- else :
-- SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-+ if self.nDim == 2 :
-+ SolidSpatialTree.add(jVertex, (posX, posY))
-+ else :
-+ SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-
- if self.nFluidInterfacePhysicalNodes != self.nSolidInterfacePhysicalNodes:
- raise Exception("Fluid and solid interface must have the same number of nodes for matching meshes ! ")
-@@ -822,20 +822,20 @@
- myid = 0
-
- # --- Instantiate the spatial indexing ---
-- prop_index = index.Property()
-- prop_index.dimension = self.nDim
-- SolidSpatialTree = index.Index(properties=prop_index)
--
-+ prop_index = index.Property()
-+ prop_index.dimension = self.nDim
-+ SolidSpatialTree = index.Index(properties=prop_index)
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for jVertex in range(nSolidNodes):
- posX = solidInterfaceBuffRcv_X[jVertex]
- posY = solidInterfaceBuffRcv_Y[jVertex]
- posZ = solidInterfaceBuffRcv_Z[jVertex]
-- if self.nDim == 2 :
-- SolidSpatialTree.add(jVertex, (posX, posY))
-- else :
-- SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-+ if self.nDim == 2 :
-+ SolidSpatialTree.add(jVertex, (posX, posY))
-+ else :
-+ SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-
- # --- For each fluid interface node, find the nearest solid interface node and fill the boolean mapping matrix ---
- for iVertexFluid in range(self.nLocalFluidInterfacePhysicalNodes):
-@@ -863,20 +863,20 @@
- myid = 0
-
- # --- Instantiate the spatial indexing ---
-- prop_index = index.Property()
-- prop_index.dimension = self.nDim
-- SolidSpatialTree = index.Index(properties=prop_index)
--
-+ prop_index = index.Property()
-+ prop_index.dimension = self.nDim
-+ SolidSpatialTree = index.Index(properties=prop_index)
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for jVertex in range(nSolidNodes):
- posX = solidInterfaceBuffRcv_X[jVertex]
- posY = solidInterfaceBuffRcv_Y[jVertex]
- posZ = solidInterfaceBuffRcv_Z[jVertex]
-- if self.nDim == 2 :
-- SolidSpatialTree.add(jVertex, (posX, posY))
-- else :
-- SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-+ if self.nDim == 2 :
-+ SolidSpatialTree.add(jVertex, (posX, posY))
-+ else :
-+ SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-
- for iVertexSolid in range(self.nLocalSolidInterfaceNodes):
- posX = self.localSolidInterface_array_X[iVertexSolid]
-@@ -915,20 +915,20 @@
- myid = 0
-
- # --- Instantiate the spatial indexing ---
-- prop_index = index.Property()
-- prop_index.dimension = self.nDim
-- SolidSpatialTree = index.Index(properties=prop_index)
--
-+ prop_index = index.Property()
-+ prop_index.dimension = self.nDim
-+ SolidSpatialTree = index.Index(properties=prop_index)
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for jVertex in range(nSolidNodes):
- posX = solidInterfaceBuffRcv_X[jVertex]
- posY = solidInterfaceBuffRcv_Y[jVertex]
- posZ = solidInterfaceBuffRcv_Z[jVertex]
-- if self.nDim == 2 :
-- SolidSpatialTree.add(jVertex, (posX, posY))
-- else :
-- SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-+ if self.nDim == 2 :
-+ SolidSpatialTree.add(jVertex, (posX, posY))
-+ else :
-+ SolidSpatialTree.add(jVertex, (posX, posY, posZ))
-
- for iVertexFluid in range(self.nLocalFluidInterfacePhysicalNodes):
- posX = self.localFluidInterface_array_X_init[iVertexFluid]
-@@ -965,7 +965,7 @@
- myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for iVertexSolid in range(self.nLocalSolidInterfaceNodes):
-@@ -999,7 +999,7 @@
- myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- nSolidNodes = solidInterfaceBuffRcv_X.shape[0]
-
- for iVertexFluid in range(self.nLocalFluidInterfacePhysicalNodes):
-@@ -1031,7 +1031,7 @@
- """
- phi = 0.0
- eps = distance/rad
--
-+
- if eps < 1:
- phi = ((1.0-eps)**4)*(4.0*eps+1.0)
- else:
-@@ -1044,20 +1044,20 @@
- Description
- """
- phi = 0.0
--
-+
- if distance > 0.0:
- phi = (distance**2)*np.log10(distance)
- else:
- phi = 0.0
-
-- return phi
-+ return phi
-
-
- def interpolateSolidPositionOnFluidMesh(self, FSI_config):
-- """
-- Applies the one-to-one mapping or the interpolaiton rules from solid to fluid mesh.
-- """
-- if self.have_MPI == True:
-+ """
-+ Applies the one-to-one mapping or the interpolaiton rules from solid to fluid mesh.
-+ """
-+ if self.have_MPI == True:
- myid = self.comm.Get_rank()
- MPIsize = self.comm.Get_size()
- else:
-@@ -1110,12 +1110,12 @@
- del gamma_array_DispY
- del gamma_array_DispZ
- del KSP_solver
-- else:
-+ else:
- self.MappingMatrix.mult(self.solidInterface_array_DispX, self.fluidInterface_array_DispX)
- self.MappingMatrix.mult(self.solidInterface_array_DispY, self.fluidInterface_array_DispY)
- self.MappingMatrix.mult(self.solidInterface_array_DispZ, self.fluidInterface_array_DispZ)
-
-- # --- Checking conservation ---
-+ # --- Checking conservation ---
- WSX = self.solidLoads_array_X.dot(self.solidInterface_array_DispX)
- WSY = self.solidLoads_array_Y.dot(self.solidInterface_array_DispY)
- WSZ = self.solidLoads_array_Z.dot(self.solidInterface_array_DispZ)
-@@ -1124,11 +1124,11 @@
- WFY = self.fluidLoads_array_Y.dot(self.fluidInterface_array_DispY)
- WFZ = self.fluidLoads_array_Z.dot(self.fluidInterface_array_DispZ)
-
-- self.MPIPrint("Checking f/s interface conservation...")
-- self.MPIPrint('Solid side (Wx, Wy, Wz) = ({}, {}, {})'.format(WSX, WSY, WSZ))
-- self.MPIPrint('Fluid side (Wx, Wy, Wz) = ({}, {}, {})'.format(WFX, WFY, WFZ))
-+ self.MPIPrint("Checking f/s interface conservation...")
-+ self.MPIPrint('Solid side (Wx, Wy, Wz) = ({}, {}, {})'.format(WSX, WSY, WSZ))
-+ self.MPIPrint('Fluid side (Wx, Wy, Wz) = ({}, {}, {})'.format(WFX, WFY, WFZ))
-+
-
--
- # --- Redistribute the interpolated fluid interface according to the partitions that own the fluid interface ---
- # Gather the fluid interface on the master process
- if self.have_MPI == True:
-@@ -1156,7 +1156,7 @@
- displ = tuple(displ)
-
- del sendBuffNumber, rcvBuffNumber
--
-+
- #print("DEBUG MESSAGE From proc {}, counts = {}".format(myid, counts))
- #print("DEBUG MESSAGE From proc {}, displ = {}".format(myid, displ))
-
-@@ -1213,18 +1213,18 @@
- del sendBuff
-
- def interpolateFluidLoadsOnSolidMesh(self, FSI_config):
-- """
-- Applies the one-to-one mapping or the interpolaiton rules from fluid to solid mesh.
-- """
-- if self.have_MPI == True:
-+ """
-+ Applies the one-to-one mapping or the interpolaiton rules from fluid to solid mesh.
-+ """
-+ if self.have_MPI == True:
- myid = self.comm.Get_rank()
- MPIsize = self.comm.Get_size()
- else:
- myid = 0
- MPIsize = 1
--
-+
- # --- Interpolate (or map) in parallel the fluid interface loads on the solid interface ---
-- #self.MappingMatrix.transpose()
-+ #self.MappingMatrix.transpose()
- if FSI_config['MATCHING_MESH'] == 'NO' and (FSI_config['MESH_INTERP_METHOD'] == 'RBF' or FSI_config['MESH_INTERP_METHOD'] == 'TPS'):
- if self.have_MPI == True:
- gamma_array_LoadX = PETSc.Vec().create(self.comm)
-@@ -1280,10 +1280,10 @@
- self.solidLoads_array_X_recon = None
- self.solidLoads_array_Y_recon = None
- self.solidLoads_array_Z_recon = None
-- if myid == self.rootProcess:
-- self.solidLoads_array_X_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
-- self.solidLoads_array_Y_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
-- self.solidLoads_array_Z_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
-+ if myid == self.rootProcess:
-+ self.solidLoads_array_X_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
-+ self.solidLoads_array_Y_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
-+ self.solidLoads_array_Z_recon = np.zeros(self.nSolidInterfacePhysicalNodes+self.d_RBF)
- myNumberOfNodes = self.solidLoads_array_X.getArray().shape[0]
- sendBuffNumber = np.array([myNumberOfNodes], dtype=int)
- rcvBuffNumber = np.zeros(MPIsize, dtype=int)
-@@ -1293,9 +1293,9 @@
- displ = np.zeros(MPIsize, dtype=int)
- for ii in range(rcvBuffNumber.shape[0]):
- displ[ii] = rcvBuffNumber[0:ii].sum()
-- displ = tuple(displ)
-+ displ = tuple(displ)
-
-- del sendBuffNumber, rcvBuffNumber
-+ del sendBuffNumber, rcvBuffNumber
-
- self.comm.Gatherv(self.solidLoads_array_X.getArray(), [self.solidLoads_array_X_recon, counts, displ, self.MPI.DOUBLE], root=self.rootProcess)
- self.comm.Gatherv(self.solidLoads_array_Y.getArray(), [self.solidLoads_array_Y_recon, counts, displ, self.MPI.DOUBLE], root=self.rootProcess)
-@@ -1336,25 +1336,25 @@
-
-
- '''def getSolidInterfacePosition(self, SolidSolver):
-- """
-- Gets the current solid interface position from the solid solver.
-- """
-+ """
-+ Gets the current solid interface position from the solid solver.
-+ """
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- # --- Get the solid interface position from the solid solver and directly fill the corresponding PETSc vector ---
- GlobalIndex = int()
- localIndex = 0
-- for iVertex in range(self.nLocalSolidInterfaceNodes):
-+ for iVertex in range(self.nLocalSolidInterfaceNodes):
- GlobalIndex = SolidSolver.getInterfaceNodeGlobalIndex(self.solidInterfaceIdentifier, iVertex)
- if GlobalIndex in self.SolidHaloNodeList[myid].keys():
- pass
- else:
-- newPosx = SolidSolver.getInterfaceNodePosX(self.solidInterfaceIdentifier, iVertex)
-- newPosy = SolidSolver.getInterfaceNodePosY(self.solidInterfaceIdentifier, iVertex)
-- newPosz = SolidSolver.getInterfaceNodePosZ(self.solidInterfaceIdentifier, iVertex)
-+ newPosx = SolidSolver.getInterfaceNodePosX(self.solidInterfaceIdentifier, iVertex)
-+ newPosy = SolidSolver.getInterfaceNodePosY(self.solidInterfaceIdentifier, iVertex)
-+ newPosz = SolidSolver.getInterfaceNodePosZ(self.solidInterfaceIdentifier, iVertex)
- iGlobalVertex = self.__getGlobalIndex('solid', myid, localIndex)
- self.solidInterface_array_X.setValues([iGlobalVertex],newPosx)
- self.solidInterface_array_Y.setValues([iGlobalVertex],newPosy)
-@@ -1375,25 +1375,25 @@
- #print("DEBUG MESSAGE From PROC {} : array_X = {}".format(myid, self.solidInterface_array_X.getArray()))'''
-
- def getSolidInterfaceDisplacement(self, SolidSolver):
-- """
-- Gets the current solid interface position from the solid solver.
-- """
-+ """
-+ Gets the current solid interface position from the solid solver.
-+ """
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- # --- Get the solid interface position from the solid solver and directly fill the corresponding PETSc vector ---
- GlobalIndex = int()
- localIndex = 0
-- for iVertex in range(self.nLocalSolidInterfaceNodes):
-+ for iVertex in range(self.nLocalSolidInterfaceNodes):
- GlobalIndex = SolidSolver.getInterfaceNodeGlobalIndex(self.solidInterfaceIdentifier, iVertex)
- if GlobalIndex in self.SolidHaloNodeList[myid].keys():
- pass
- else:
-- newDispx = SolidSolver.getInterfaceNodeDispX(self.solidInterfaceIdentifier, iVertex)
-- newDispy = SolidSolver.getInterfaceNodeDispY(self.solidInterfaceIdentifier, iVertex)
-- newDispz = SolidSolver.getInterfaceNodeDispZ(self.solidInterfaceIdentifier, iVertex)
-+ newDispx = SolidSolver.getInterfaceNodeDispX(self.solidInterfaceIdentifier, iVertex)
-+ newDispy = SolidSolver.getInterfaceNodeDispY(self.solidInterfaceIdentifier, iVertex)
-+ newDispz = SolidSolver.getInterfaceNodeDispZ(self.solidInterfaceIdentifier, iVertex)
- iGlobalVertex = self.__getGlobalIndex('solid', myid, localIndex)
- self.solidInterface_array_DispX.setValues([iGlobalVertex],newDispx)
- self.solidInterface_array_DispY.setValues([iGlobalVertex],newDispy)
-@@ -1408,9 +1408,9 @@
- self.solidInterface_array_DispZ.assemblyEnd()
-
- def getFluidInterfaceNodalForce(self, FSI_config, FluidSolver):
-- """
-- Gets the fluid interface loads from the fluid solver.
-- """
-+ """
-+ Gets the fluid interface loads from the fluid solver.
-+ """
- if self.have_MPI == True:
- myid = self.comm.Get_rank()
- else:
-@@ -1422,17 +1422,17 @@
- FZ = 0.0
-
- # --- Get the fluid interface loads from the fluid solver and directly fill the corresponding PETSc vector ---
-- for iVertex in range(self.nLocalFluidInterfaceNodes):
-- halo = FluidSolver.ComputeVertexForces(self.fluidInterfaceIdentifier, iVertex) # !!we have to ignore halo node coming from mesh partitioning because they introduice non-physical forces
-- if halo==False:
-- if FSI_config['CSD_SOLVER'] == 'GETDP':
-- newFx = FluidSolver.GetVertexForceDensityX(self.fluidInterfaceIdentifier, iVertex)
-- newFy = FluidSolver.GetVertexForceDensityY(self.fluidInterfaceIdentifier, iVertex)
-- newFz = FluidSolver.GetVertexForceDensityZ(self.fluidInterfaceIdentifier, iVertex)
-- else:
-- newFx = FluidSolver.GetVertexForceX(self.fluidInterfaceIdentifier, iVertex)
-- newFy = FluidSolver.GetVertexForceY(self.fluidInterfaceIdentifier, iVertex)
-- newFz = FluidSolver.GetVertexForceZ(self.fluidInterfaceIdentifier, iVertex)
-+ for iVertex in range(self.nLocalFluidInterfaceNodes):
-+ halo = FluidSolver.ComputeVertexForces(self.fluidInterfaceIdentifier, iVertex) # !!we have to ignore halo node coming from mesh partitioning because they introduice non-physical forces
-+ if halo==False:
-+ if FSI_config['CSD_SOLVER'] == 'GETDP':
-+ newFx = FluidSolver.GetVertexForceDensityX(self.fluidInterfaceIdentifier, iVertex)
-+ newFy = FluidSolver.GetVertexForceDensityY(self.fluidInterfaceIdentifier, iVertex)
-+ newFz = FluidSolver.GetVertexForceDensityZ(self.fluidInterfaceIdentifier, iVertex)
-+ else:
-+ newFx = FluidSolver.GetVertexForceX(self.fluidInterfaceIdentifier, iVertex)
-+ newFy = FluidSolver.GetVertexForceY(self.fluidInterfaceIdentifier, iVertex)
-+ newFz = FluidSolver.GetVertexForceZ(self.fluidInterfaceIdentifier, iVertex)
- iGlobalVertex = self.__getGlobalIndex('fluid', myid, localIndex)
- self.fluidLoads_array_X.setValues([iGlobalVertex], newFx)
- self.fluidLoads_array_Y.setValues([iGlobalVertex], newFy)
-@@ -1457,22 +1457,22 @@
- FX_b = self.fluidLoads_array_X.sum()
- FY_b = self.fluidLoads_array_Y.sum()
- FZ_b = self.fluidLoads_array_Z.sum()
--
-+
-
- def setFluidInterfaceVarCoord(self, FluidSolver):
-- """
-- Communicate the change of coordinates of the fluid interface to the fluid solver.
-- Prepare the fluid solver for mesh deformation.
-- """
-+ """
-+ Communicate the change of coordinates of the fluid interface to the fluid solver.
-+ Prepare the fluid solver for mesh deformation.
-+ """
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- # --- Send the new fluid interface position to the fluid solver (on each partition, halo nodes included) ---
- localIndex = 0
-- for iVertex in range(self.nLocalFluidInterfaceNodes):
-- GlobalIndex = FluidSolver.GetVertexGlobalIndex(self.fluidInterfaceIdentifier, iVertex)
-+ for iVertex in range(self.nLocalFluidInterfaceNodes):
-+ GlobalIndex = FluidSolver.GetVertexGlobalIndex(self.fluidInterfaceIdentifier, iVertex)
- if GlobalIndex in self.FluidHaloNodeList[myid].keys():
- posX0, posY0, posZ0 = self.haloNodesPositionsInit[GlobalIndex]
- DispX, DispY, DispZ = self.haloNodesDisplacements[GlobalIndex]
-@@ -1491,32 +1491,32 @@
- FluidSolver.SetVertexCoordZ(self.fluidInterfaceIdentifier, iVertex, posZ)
- localIndex += 1
- # Prepares the mesh deformation in the fluid solver
-- nodalVarCoordNorm = FluidSolver.SetVertexVarCoord(self.fluidInterfaceIdentifier, iVertex)
-+ nodalVarCoordNorm = FluidSolver.SetVertexVarCoord(self.fluidInterfaceIdentifier, iVertex)
-+
-
--
- def setSolidInterfaceLoads(self, SolidSolver, FSI_config, time):
-- """
-- Communicates the new solid interface loads to the solid solver.
-- In case of rigid body motion, calculates the new resultant forces (lift, drag, ...).
-- """
-+ """
-+ Communicates the new solid interface loads to the solid solver.
-+ In case of rigid body motion, calculates the new resultant forces (lift, drag, ...).
-+ """
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
-
-- FY = 0.0 # solid-side resultant forces
-+ FY = 0.0 # solid-side resultant forces
- FX = 0.0
- FZ = 0.0
-- FFX = 0.0 # fluid-side resultant forces
-- FFY = 0.0
-- FFZ = 0.0
-+ FFX = 0.0 # fluid-side resultant forces
-+ FFY = 0.0
-+ FFZ = 0.0
-
- # --- Check for total force conservation after interpolation
- FFX = self.fluidLoads_array_X.sum()
- FFY = self.fluidLoads_array_Y.sum()
- FFZ = self.fluidLoads_array_Z.sum()
-
--
-+
- for iVertex in range(self.nLocalSolidInterfaceNodes):
- FX += self.localSolidLoads_array_X[iVertex]
- FY += self.localSolidLoads_array_Y[iVertex]
-@@ -1527,9 +1527,9 @@
- FY = self.comm.allreduce(FY)
- FZ = self.comm.allreduce(FZ)
-
-- self.MPIPrint("Checking f/s interface total force...")
-- self.MPIPrint('Solid side (Fx, Fy, Fz) = ({}, {}, {})'.format(FX, FY, FZ))
-- self.MPIPrint('Fluid side (Fx, Fy, Fz) = ({}, {}, {})'.format(FFX, FFY, FFZ))
-+ self.MPIPrint("Checking f/s interface total force...")
-+ self.MPIPrint('Solid side (Fx, Fy, Fz) = ({}, {}, {})'.format(FX, FY, FZ))
-+ self.MPIPrint('Fluid side (Fx, Fy, Fz) = ({}, {}, {})'.format(FFX, FFY, FFZ))
-
- # --- Send the new solid interface loads to the solid solver (on each partition, halo nodes included) ---
- GlobalIndex = int()
-@@ -1541,25 +1541,25 @@
- pass
- else:
- Fx = self.localSolidLoads_array_X[localIndex]
-- Fy = self.localSolidLoads_array_Y[localIndex]
-- Fz = self.localSolidLoads_array_Z[localIndex]
-+ Fy = self.localSolidLoads_array_Y[localIndex]
-+ Fz = self.localSolidLoads_array_Z[localIndex]
- SolidSolver.applyload(iVertex, Fx, Fy, Fz, time)
- localIndex += 1
-- if FSI_config['CSD_SOLVER'] == 'NATIVE':
-+ if FSI_config['CSD_SOLVER'] == 'NATIVE':
- SolidSolver.setGeneralisedForce()
-- SolidSolver.setGeneralisedMoment()
-+ SolidSolver.setGeneralisedMoment()
-
- def computeSolidInterfaceResidual(self, SolidSolver):
-- """
-- Computes the solid interface FSI displacement residual.
-- """
-+ """
-+ Computes the solid interface FSI displacement residual.
-+ """
-
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
-
-- normInterfaceResidualSquare = 0.0
-+ normInterfaceResidualSquare = 0.0
-
- # --- Create and fill the PETSc vector for the predicted solid interface position (predicted by the solid computation) ---
- if self.have_MPI == True:
-@@ -1575,27 +1575,27 @@
- predDisp_array_Y = PETSc.Vec().create()
- predDisp_array_Y.setType('seq')
- predDisp_array_Z = PETSc.Vec().create()
-- predDisp_array_Z.setType('seq')
-+ predDisp_array_Z.setType('seq')
- predDisp_array_X.setSizes(self.nSolidInterfacePhysicalNodes+self.d_RBF)
- predDisp_array_Y.setSizes(self.nSolidInterfacePhysicalNodes+self.d_RBF)
- predDisp_array_Z.setSizes(self.nSolidInterfacePhysicalNodes+self.d_RBF)
--
-- if myid in self.solidSolverProcessors:
-- for iVertex in range(self.nLocalSolidInterfaceNodes):
-- predDispx = SolidSolver.getInterfaceNodeDispX(self.solidInterfaceIdentifier, iVertex)
-- predDispy = SolidSolver.getInterfaceNodeDispY(self.solidInterfaceIdentifier, iVertex)
-- predDispz = SolidSolver.getInterfaceNodeDispZ(self.solidInterfaceIdentifier, iVertex)
-+
-+ if myid in self.solidSolverProcessors:
-+ for iVertex in range(self.nLocalSolidInterfaceNodes):
-+ predDispx = SolidSolver.getInterfaceNodeDispX(self.solidInterfaceIdentifier, iVertex)
-+ predDispy = SolidSolver.getInterfaceNodeDispY(self.solidInterfaceIdentifier, iVertex)
-+ predDispz = SolidSolver.getInterfaceNodeDispZ(self.solidInterfaceIdentifier, iVertex)
- iGlobalVertex = self.__getGlobalIndex('solid', myid, iVertex)
- predDisp_array_X.setValues([iGlobalVertex], predDispx)
- predDisp_array_Y.setValues([iGlobalVertex], predDispy)
- predDisp_array_Z.setValues([iGlobalVertex], predDispz)
--
-- predDisp_array_X.assemblyBegin()
-- predDisp_array_X.assemblyEnd()
-- predDisp_array_Y.assemblyBegin()
-- predDisp_array_Y.assemblyEnd()
-- predDisp_array_Z.assemblyBegin()
-- predDisp_array_Z.assemblyEnd()
-+
-+ predDisp_array_X.assemblyBegin()
-+ predDisp_array_X.assemblyEnd()
-+ predDisp_array_Y.assemblyBegin()
-+ predDisp_array_Y.assemblyEnd()
-+ predDisp_array_Z.assemblyBegin()
-+ predDisp_array_Z.assemblyEnd()
-
- # --- Calculate the residual (vector and norm) ---
- self.solidInterfaceResidual_array_X = predDisp_array_X - self.solidInterface_array_DispX
-@@ -1615,45 +1615,45 @@
- del predDisp_array_Y
- del predDisp_array_Z
-
-- return sqrt(normInterfaceResidualSquare)
-+ return sqrt(normInterfaceResidualSquare)
-
- def relaxSolidPosition(self,FSI_config):
-- """
-- Apply solid displacement under-relaxation.
-- """
-+ """
-+ Apply solid displacement under-relaxation.
-+ """
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
-
- # --- Set the Aitken coefficient for the relaxation ---
-- if FSI_config['AITKEN_RELAX'] == 'STATIC':
-- self.aitkenParam = FSI_config['AITKEN_PARAM']
-- elif FSI_config['AITKEN_RELAX'] == 'DYNAMIC':
-- self.setAitkenCoefficient(FSI_config)
-- else:
-- self.aitkenParam = 1.0
-+ if FSI_config['AITKEN_RELAX'] == 'STATIC':
-+ self.aitkenParam = FSI_config['AITKEN_PARAM']
-+ elif FSI_config['AITKEN_RELAX'] == 'DYNAMIC':
-+ self.setAitkenCoefficient(FSI_config)
-+ else:
-+ self.aitkenParam = 1.0
-
-- self.MPIPrint('Aitken under-relaxation step with parameter {}'.format(self.aitkenParam))
-+ self.MPIPrint('Aitken under-relaxation step with parameter {}'.format(self.aitkenParam))
-
- # --- Relax the solid interface position ---
- self.solidInterface_array_DispX += self.aitkenParam*self.solidInterfaceResidual_array_X
- self.solidInterface_array_DispY += self.aitkenParam*self.solidInterfaceResidual_array_Y
- self.solidInterface_array_DispZ += self.aitkenParam*self.solidInterfaceResidual_array_Z
--
-+
-
- def setAitkenCoefficient(self, FSI_config):
-- """
-- Computes the Aitken coefficients for solid displacement under-relaxation.
-- """
--
-- deltaResNormSquare = 0.0
-- prodScalRes = 0.0
--
-+ """
-+ Computes the Aitken coefficients for solid displacement under-relaxation.
-+ """
-+
-+ deltaResNormSquare = 0.0
-+ prodScalRes = 0.0
-+
- # --- Create the PETSc vector for the difference between the residuals (current and previous FSI iter) ---
-- if self.FSIIter == 0:
-- self.aitkenParam = max(FSI_config['AITKEN_PARAM'], self.aitkenParam)
-- else:
-+ if self.FSIIter == 0:
-+ self.aitkenParam = max(FSI_config['AITKEN_PARAM'], self.aitkenParam)
-+ else:
- if self.have_MPI:
- deltaResx_array_X = PETSc.Vec().create(self.comm)
- deltaResx_array_X.setType('mpi')
-@@ -1688,9 +1688,9 @@
- deltaResNormSquare_X = (deltaResx_array_X.norm())**2
- deltaResNormSquare_Y = (deltaResx_array_Y.norm())**2
- deltaResNormSquare_Z = (deltaResx_array_Z.norm())**2
-- deltaResNormSquare = deltaResNormSquare_X + deltaResNormSquare_Y + deltaResNormSquare_Z
-+ deltaResNormSquare = deltaResNormSquare_X + deltaResNormSquare_Y + deltaResNormSquare_Z
-
-- self.aitkenParam *= -prodScalRes/deltaResNormSquare
-+ self.aitkenParam *= -prodScalRes/deltaResNormSquare
-
- deltaResx_array_X.destroy()
- deltaResx_array_Y.destroy()
-@@ -1708,27 +1708,27 @@
- self.solidInterfaceResidual_array_Z.copy(self.solidInterfaceResidualnM1_array_Z)
-
- def displacementPredictor(self, FSI_config , SolidSolver, deltaT):
-- """
-- Calculates a prediciton for the solid interface position for the next time step.
-- """
-+ """
-+ Calculates a prediciton for the solid interface position for the next time step.
-+ """
-
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-+ myid = self.comm.Get_rank()
- else:
- myid = 0
-
-- if FSI_config['DISP_PRED'] == 'FIRST_ORDER':
-- self.MPIPrint("First order predictor")
-- alpha_0 = 1.0
-- alpha_1 = 0.0
-- elif FSI_config['DISP_PRED'] == 'SECOND_ORDER':
-- self.MPIPrint("Second order predictor")
-- alpha_0 = 1.0
-- alpha_1 = 0.5
-- else:
-- self.MPIPrint("No predictor")
-- alpha_0 = 0.0
-- alpha_1 = 0.0
-+ if FSI_config['DISP_PRED'] == 'FIRST_ORDER':
-+ self.MPIPrint("First order predictor")
-+ alpha_0 = 1.0
-+ alpha_1 = 0.0
-+ elif FSI_config['DISP_PRED'] == 'SECOND_ORDER':
-+ self.MPIPrint("Second order predictor")
-+ alpha_0 = 1.0
-+ alpha_1 = 0.5
-+ else:
-+ self.MPIPrint("No predictor")
-+ alpha_0 = 0.0
-+ alpha_1 = 0.0
-
- # --- Create the PETSc vectors to store the solid interface velocity ---
- if self.have_MPI == True:
-@@ -1774,18 +1774,18 @@
- # --- Fill the PETSc vectors ---
- GlobalIndex = int()
- localIndex = 0
-- for iVertex in range(self.nLocalSolidInterfaceNodes):
-- GlobalIndex = SolidSolver.getInterfaceNodeGlobalIndex(self.solidInterfaceIdentifier, iVertex)
-+ for iVertex in range(self.nLocalSolidInterfaceNodes):
-+ GlobalIndex = SolidSolver.getInterfaceNodeGlobalIndex(self.solidInterfaceIdentifier, iVertex)
- if GlobalIndex in self.SolidHaloNodeList[myid].keys():
- pass
- else:
- iGlobalVertex = self.__getGlobalIndex('solid', myid, localIndex)
-- velx = SolidSolver.getInterfaceNodeVelX(self.solidInterfaceIdentifier, iVertex)
-- vely = SolidSolver.getInterfaceNodeVelY(self.solidInterfaceIdentifier, iVertex)
-- velz = SolidSolver.getInterfaceNodeVelZ(self.solidInterfaceIdentifier, iVertex)
-- velxNm1 = SolidSolver.getInterfaceNodeVelXNm1(self.solidInterfaceIdentifier, iVertex)
-- velyNm1 = SolidSolver.getInterfaceNodeVelYNm1(self.solidInterfaceIdentifier, iVertex)
-- velzNm1 = SolidSolver.getInterfaceNodeVelZNm1(self.solidInterfaceIdentifier, iVertex)
-+ velx = SolidSolver.getInterfaceNodeVelX(self.solidInterfaceIdentifier, iVertex)
-+ vely = SolidSolver.getInterfaceNodeVelY(self.solidInterfaceIdentifier, iVertex)
-+ velz = SolidSolver.getInterfaceNodeVelZ(self.solidInterfaceIdentifier, iVertex)
-+ velxNm1 = SolidSolver.getInterfaceNodeVelXNm1(self.solidInterfaceIdentifier, iVertex)
-+ velyNm1 = SolidSolver.getInterfaceNodeVelYNm1(self.solidInterfaceIdentifier, iVertex)
-+ velzNm1 = SolidSolver.getInterfaceNodeVelZNm1(self.solidInterfaceIdentifier, iVertex)
- Vel_array_X.setValues([iGlobalVertex],velx)
- Vel_array_Y.setValues([iGlobalVertex],vely)
- Vel_array_Z.setValues([iGlobalVertex],velz)
-@@ -1822,27 +1822,27 @@
- del VelnM1_array_X, VelnM1_array_Y, VelnM1_array_Z
-
- def writeFSIHistory(self, TimeIter, time, varCoordNorm, FSIConv):
-- """
-- Write the FSI history file of the computaion.
-- """
-+ """
-+ Write the FSI history file of the computaion.
-+ """
-
- if self.have_MPI == True:
- myid = self.comm.Get_rank()
- else:
- myid = 0
--
-+
- if myid == self.rootProcess:
-- if self.unsteady:
-- if TimeIter == 0:
-- histFile = open('FSIhistory.dat', "w")
-+ if self.unsteady:
-+ if TimeIter == 0:
-+ histFile = open('FSIhistory.dat', "w")
- histFile.write("TimeIter\tTime\tFSIRes\tFSINbIter\n")
-- else:
-- histFile = open('FSIhistory.dat', "a")
-- if FSIConv:
-- histFile.write(str(TimeIter) + '\t' + str(time) + '\t' + str(varCoordNorm) + '\t' + str(self.FSIIter+1) + '\n')
-- else:
-- histFile.write(str(TimeIter) + '\t' + str(time) + '\t' + str(varCoordNorm) + '\t' + str(self.FSIIter) + '\n')
-- histFile.close()
-+ else:
-+ histFile = open('FSIhistory.dat', "a")
-+ if FSIConv:
-+ histFile.write(str(TimeIter) + '\t' + str(time) + '\t' + str(varCoordNorm) + '\t' + str(self.FSIIter+1) + '\n')
-+ else:
-+ histFile.write(str(TimeIter) + '\t' + str(time) + '\t' + str(varCoordNorm) + '\t' + str(self.FSIIter) + '\n')
-+ histFile.close()
- else:
- if self.FSIIter == 0:
- histFile = open('FSIhistory.dat', "w")
-@@ -1851,7 +1851,7 @@
- histFile = open('FSIhistory.dat', "a")
- histFile.write(str(self.FSIIter) + '\t' + str(varCoordNorm) + '\n')
- histFile.close()
--
-+
-
- self.MPIBarrier()
-
-@@ -1868,254 +1868,254 @@
- globalIndex = globalStartIndex + iLocalVertex
-
- return globalIndex
--
-+
-
- def UnsteadyFSI(self,FSI_config, FluidSolver, SolidSolver):
-- """
-- Run the unsteady FSI computation by synchronizing the fluid and solid solvers.
-- F/s interface data are exchanged through interface mapping and interpolation (if non mathcing meshes).
-- """
-+ """
-+ Run the unsteady FSI computation by synchronizing the fluid and solid solvers.
-+ F/s interface data are exchanged through interface mapping and interpolation (if non mathcing meshes).
-+ """
-
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-- numberPart = self.comm.Get_size()
-+ myid = self.comm.Get_rank()
-+ numberPart = self.comm.Get_size()
- else:
- myid = 0
- numberPart = 1
-
-- # --- Set some general variables for the unsteady computation --- #
-- deltaT = FSI_config['UNST_TIMESTEP'] # physical time step
-- totTime = FSI_config['UNST_TIME'] # physical simulation time
-- NbFSIIterMax = FSI_config['NB_FSI_ITER'] # maximum number of FSI iteration (for each time step)
-- FSITolerance = FSI_config['FSI_TOLERANCE'] # f/s interface tolerance
-- TimeIterTreshold = 0 # time iteration from which we allow the solid to deform
--
-- if FSI_config['RESTART_SOL'] == 'YES':
-- startTime = FSI_config['START_TIME']
-- NbTimeIter = ((totTime)/deltaT)-1
-- time = startTime
-- TimeIter = FSI_config['RESTART_ITER']
-- else:
-- NbTimeIter = (totTime/deltaT)-1 # number of time iterations
-- time = 0.0 # initial time
-- TimeIter = 0 # initial time iteration
--
-- NbTimeIter = int(NbTimeIter) # be sure that NbTimeIter is an integer
--
-- varCoordNorm = 0.0 # FSI residual
-- FSIConv = False # FSI convergence flag
--
-- self.MPIPrint('\n**********************************')
-- self.MPIPrint('* Begin unsteady FSI computation *')
-- self.MPIPrint('**********************************\n')
--
-- # --- Initialize the coupled solution --- #
-- #If restart (DOES NOT WORK YET)
-- if FSI_config['RESTART_SOL'] == 'YES':
-- TimeIterTreshold = -1
-- FluidSolver.setTemporalIteration(TimeIter)
-- if myid == self.rootProcess:
-- SolidSolver.outputDisplacements(FluidSolver.getInterRigidDispArray(), True)
-+ # --- Set some general variables for the unsteady computation --- #
-+ deltaT = FSI_config['UNST_TIMESTEP'] # physical time step
-+ totTime = FSI_config['UNST_TIME'] # physical simulation time
-+ NbFSIIterMax = FSI_config['NB_FSI_ITER'] # maximum number of FSI iteration (for each time step)
-+ FSITolerance = FSI_config['FSI_TOLERANCE'] # f/s interface tolerance
-+ TimeIterTreshold = 0 # time iteration from which we allow the solid to deform
-+
-+ if FSI_config['RESTART_SOL'] == 'YES':
-+ startTime = FSI_config['START_TIME']
-+ NbTimeIter = ((totTime)/deltaT)-1
-+ time = startTime
-+ TimeIter = FSI_config['RESTART_ITER']
-+ else:
-+ NbTimeIter = (totTime/deltaT)-1 # number of time iterations
-+ time = 0.0 # initial time
-+ TimeIter = 0 # initial time iteration
-+
-+ NbTimeIter = int(NbTimeIter) # be sure that NbTimeIter is an integer
-+
-+ varCoordNorm = 0.0 # FSI residual
-+ FSIConv = False # FSI convergence flag
-+
-+ self.MPIPrint('\n**********************************')
-+ self.MPIPrint('* Begin unsteady FSI computation *')
-+ self.MPIPrint('**********************************\n')
-+
-+ # --- Initialize the coupled solution --- #
-+ #If restart (DOES NOT WORK YET)
-+ if FSI_config['RESTART_SOL'] == 'YES':
-+ TimeIterTreshold = -1
-+ FluidSolver.setTemporalIteration(TimeIter)
-+ if myid == self.rootProcess:
-+ SolidSolver.outputDisplacements(FluidSolver.getInterRigidDispArray(), True)
-+ if self.have_MPI == True:
-+ self.comm.barrier()
-+ FluidSolver.setInitialMesh(True)
-+ if myid == self.rootProcess:
-+ SolidSolver.displacementPredictor(FluidSolver.getInterRigidDispArray())
- if self.have_MPI == True:
-- self.comm.barrier()
-- FluidSolver.setInitialMesh(True)
-- if myid == self.rootProcess:
-- SolidSolver.displacementPredictor(FluidSolver.getInterRigidDispArray())
-- if self.have_MPI == True:
-- self.comm.barrier()
-- if myid == self.rootProcess:
-- SolidSolver.updateSolution()
-- #If no restart
-- else:
-- self.MPIPrint('Setting FSI initial conditions')
-+ self.comm.barrier()
-+ if myid == self.rootProcess:
-+ SolidSolver.updateSolution()
-+ #If no restart
-+ else:
-+ self.MPIPrint('Setting FSI initial conditions')
- if myid in self.solidSolverProcessors:
-- SolidSolver.setInitialDisplacements()
-+ SolidSolver.setInitialDisplacements()
- self.getSolidInterfaceDisplacement(SolidSolver)
-- self.interpolateSolidPositionOnFluidMesh(FSI_config)
-- self.setFluidInterfaceVarCoord(FluidSolver)
-- FluidSolver.SetInitialMesh() # if there is an initial deformation in the solid, it has to be communicated to the fluid solver
-- self.MPIPrint('\nFSI initial conditions are set')
-- self.MPIPrint('Beginning time integration\n')
--
-- # --- External temporal loop --- #
-- while TimeIter <= NbTimeIter:
--
-- if TimeIter > TimeIterTreshold:
-- NbFSIIter = NbFSIIterMax
-- self.MPIPrint('\n*************** Enter Block Gauss Seidel (BGS) method for strong coupling FSI on time iteration {} ***************'.format(TimeIter))
-- else:
-- NbFSIIter = 1
--
-- self.FSIIter = 0
-- FSIConv = False
-- FluidSolver.PreprocessExtIter(TimeIter) # set some parameters before temporal fluid iteration
--
-- # --- Internal FSI loop --- #
-- while self.FSIIter <= (NbFSIIter-1):
-+ self.interpolateSolidPositionOnFluidMesh(FSI_config)
-+ self.setFluidInterfaceVarCoord(FluidSolver)
-+ FluidSolver.SetInitialMesh() # if there is an initial deformation in the solid, it has to be communicated to the fluid solver
-+ self.MPIPrint('\nFSI initial conditions are set')
-+ self.MPIPrint('Beginning time integration\n')
-+
-+ # --- External temporal loop --- #
-+ while TimeIter <= NbTimeIter:
-+
-+ if TimeIter > TimeIterTreshold:
-+ NbFSIIter = NbFSIIterMax
-+ self.MPIPrint('\n*************** Enter Block Gauss Seidel (BGS) method for strong coupling FSI on time iteration {} ***************'.format(TimeIter))
-+ else:
-+ NbFSIIter = 1
-+
-+ self.FSIIter = 0
-+ FSIConv = False
-+ FluidSolver.PreprocessExtIter(TimeIter) # set some parameters before temporal fluid iteration
-
-- self.MPIPrint("\n>>>> Time iteration {} / FSI iteration {} <<<<".format(TimeIter,self.FSIIter))
-+ # --- Internal FSI loop --- #
-+ while self.FSIIter <= (NbFSIIter-1):
-
-- # --- Mesh morphing step (displacements interpolation, displacements communication, and mesh morpher call) --- #
-- self.interpolateSolidPositionOnFluidMesh(FSI_config)
-+ self.MPIPrint("\n>>>> Time iteration {} / FSI iteration {} <<<<".format(TimeIter,self.FSIIter))
-+
-+ # --- Mesh morphing step (displacements interpolation, displacements communication, and mesh morpher call) --- #
-+ self.interpolateSolidPositionOnFluidMesh(FSI_config)
- self.MPIPrint('\nPerforming dynamic mesh deformation (ALE)...\n')
- self.setFluidInterfaceVarCoord(FluidSolver)
- FluidSolver.DynamicMeshUpdate(TimeIter)
--
-- # --- Fluid solver call for FSI subiteration --- #
-- self.MPIPrint('\nLaunching fluid solver for one single dual-time iteration...')
-+
-+ # --- Fluid solver call for FSI subiteration --- #
-+ self.MPIPrint('\nLaunching fluid solver for one single dual-time iteration...')
- self.MPIBarrier()
-- FluidSolver.ResetConvergence()
-- FluidSolver.Run()
-+ FluidSolver.ResetConvergence()
-+ FluidSolver.Run()
- self.MPIBarrier()
-
-- # --- Surface fluid loads interpolation and communication --- #
-- self.MPIPrint('\nProcessing interface fluid loads...\n')
-+ # --- Surface fluid loads interpolation and communication --- #
-+ self.MPIPrint('\nProcessing interface fluid loads...\n')
- self.MPIBarrier()
-- self.getFluidInterfaceNodalForce(FSI_config, FluidSolver)
-+ self.getFluidInterfaceNodalForce(FSI_config, FluidSolver)
- self.MPIBarrier()
-- if TimeIter > TimeIterTreshold:
-- self.interpolateFluidLoadsOnSolidMesh(FSI_config)
-- self.setSolidInterfaceLoads(SolidSolver, FSI_config, time)
-+ if TimeIter > TimeIterTreshold:
-+ self.interpolateFluidLoadsOnSolidMesh(FSI_config)
-+ self.setSolidInterfaceLoads(SolidSolver, FSI_config, time)
-
-- # --- Solid solver call for FSI subiteration --- #
-- self.MPIPrint('\nLaunching solid solver for a single time iteration...\n')
-+ # --- Solid solver call for FSI subiteration --- #
-+ self.MPIPrint('\nLaunching solid solver for a single time iteration...\n')
- if myid in self.solidSolverProcessors:
-- if FSI_config['CSD_SOLVER'] == 'NATIVE':
-- SolidSolver.timeIteration(time)
-- elif FSI_config['CSD_SOLVER'] == 'METAFOR' or FSI_config['CSD_SOLVER'] == 'GETDP' or FSI_config['CSD_SOLVER'] == 'TESTER':
-- SolidSolver.run(time-deltaT, time)
--
-- # --- Compute and monitor the FSI residual --- #
-- varCoordNorm = self.computeSolidInterfaceResidual(SolidSolver)
-- self.MPIPrint('\nFSI displacement norm : {}\n'.format(varCoordNorm))
-- if varCoordNorm < FSITolerance:
-- FSIConv = True
-- break
-+ if FSI_config['CSD_SOLVER'] == 'NATIVE':
-+ SolidSolver.timeIteration(time)
-+ elif FSI_config['CSD_SOLVER'] == 'METAFOR' or FSI_config['CSD_SOLVER'] == 'GETDP' or FSI_config['CSD_SOLVER'] == 'TESTER':
-+ SolidSolver.run(time-deltaT, time)
-+
-+ # --- Compute and monitor the FSI residual --- #
-+ varCoordNorm = self.computeSolidInterfaceResidual(SolidSolver)
-+ self.MPIPrint('\nFSI displacement norm : {}\n'.format(varCoordNorm))
-+ if varCoordNorm < FSITolerance:
-+ FSIConv = True
-+ break
-
-- # --- Relaxe the solid position --- #
-+ # --- Relaxe the solid position --- #
- self.MPIPrint('\nProcessing interface displacements...\n')
-- self.relaxSolidPosition(FSI_config)
--
-- self.FSIIter += 1
-- # --- End OF FSI loop --- #
-+ self.relaxSolidPosition(FSI_config)
-+
-+ self.FSIIter += 1
-+ # --- End OF FSI loop --- #
-
- self.MPIBarrier()
-
-- # --- Update the FSI history file --- #
-- if TimeIter > TimeIterTreshold:
-- self.MPIPrint('\nBGS is converged (strong coupling)')
-- self.writeFSIHistory(TimeIter, time, varCoordNorm, FSIConv)
--
-- # --- Update, monitor and output the fluid solution before the next time step ---#
-- FluidSolver.Update()
-- FluidSolver.Monitor(TimeIter)
-- FluidSolver.Output(TimeIter)
--
-- if TimeIter >= TimeIterTreshold:
-- if myid in self.solidSolverProcessors:
-- # --- Output the solid solution before thr next time step --- #
-- SolidSolver.writeSolution(time, self.FSIIter, TimeIter, NbTimeIter)
--
-- # --- Displacement predictor for the next time step and update of the solid solution --- #
-- self.MPIPrint('\nSolid displacement prediction for next time step')
-- self.displacementPredictor(FSI_config, SolidSolver, deltaT)
-+ # --- Update the FSI history file --- #
-+ if TimeIter > TimeIterTreshold:
-+ self.MPIPrint('\nBGS is converged (strong coupling)')
-+ self.writeFSIHistory(TimeIter, time, varCoordNorm, FSIConv)
-+
-+ # --- Update, monitor and output the fluid solution before the next time step ---#
-+ FluidSolver.Update()
-+ FluidSolver.Monitor(TimeIter)
-+ FluidSolver.Output(TimeIter)
-+
-+ if TimeIter >= TimeIterTreshold:
-+ if myid in self.solidSolverProcessors:
-+ # --- Output the solid solution before thr next time step --- #
-+ SolidSolver.writeSolution(time, self.FSIIter, TimeIter, NbTimeIter)
-+
-+ # --- Displacement predictor for the next time step and update of the solid solution --- #
-+ self.MPIPrint('\nSolid displacement prediction for next time step')
-+ self.displacementPredictor(FSI_config, SolidSolver, deltaT)
- if myid in self.solidSolverProcessors:
-- SolidSolver.updateSolution()
--
-- TimeIter += 1
-- time += deltaT
-- #--- End of the temporal loop --- #
-+ SolidSolver.updateSolution()
-+
-+ TimeIter += 1
-+ time += deltaT
-+ #--- End of the temporal loop --- #
-
- self.MPIBarrier()
-
-- self.MPIPrint('\n*************************')
-- self.MPIPrint('* End FSI computation *')
-- self.MPIPrint('*************************\n')
-+ self.MPIPrint('\n*************************')
-+ self.MPIPrint('* End FSI computation *')
-+ self.MPIPrint('*************************\n')
-
- def SteadyFSI(self, FSI_config,FluidSolver, SolidSolver):
-- """
-- Runs the steady FSI computation by synchronizing the fluid and solid solver with data exchange at the f/s interface.
-- """
-+ """
-+ Runs the steady FSI computation by synchronizing the fluid and solid solver with data exchange at the f/s interface.
-+ """
-
- if self.have_MPI == True:
-- myid = self.comm.Get_rank()
-- numberPart = self.comm.Get_size()
-+ myid = self.comm.Get_rank()
-+ numberPart = self.comm.Get_size()
- else:
- myid = 0
- numberPart = 1
-
-- # --- Set some general variables for the steady computation --- #
-- NbIter = FSI_config['NB_EXT_ITER'] # number of fluid iteration at each FSI step
-- NbFSIIterMax = FSI_config['NB_FSI_ITER'] # maximum number of FSI iteration (for each time step)
-- FSITolerance = FSI_config['FSI_TOLERANCE'] # f/s interface tolerance
-- varCoordNorm = 0.0
--
-- self.MPIPrint('\n********************************')
-- self.MPIPrint('* Begin steady FSI computation *')
-- self.MPIPrint('********************************\n')
-- self.MPIPrint('\n*************** Enter Block Gauss Seidel (BGS) method for strong coupling FSI ***************')
-+ # --- Set some general variables for the steady computation --- #
-+ NbIter = FSI_config['NB_EXT_ITER'] # number of fluid iteration at each FSI step
-+ NbFSIIterMax = FSI_config['NB_FSI_ITER'] # maximum number of FSI iteration (for each time step)
-+ FSITolerance = FSI_config['FSI_TOLERANCE'] # f/s interface tolerance
-+ varCoordNorm = 0.0
-+
-+ self.MPIPrint('\n********************************')
-+ self.MPIPrint('* Begin steady FSI computation *')
-+ self.MPIPrint('********************************\n')
-+ self.MPIPrint('\n*************** Enter Block Gauss Seidel (BGS) method for strong coupling FSI ***************')
-
- self.getSolidInterfaceDisplacement(SolidSolver)
-
-- # --- External FSI loop --- #
-- self.FSIIter = 0
-- while self.FSIIter < NbFSIIterMax:
-- self.MPIPrint("\n>>>> FSI iteration {} <<<<".format(self.FSIIter))
-- self.MPIPrint('\nLaunching fluid solver for a steady computation...')
-- # --- Fluid solver call for FSI subiteration ---#
-- Iter = 0
-- FluidSolver.ResetConvergence()
-- while Iter < NbIter:
-- FluidSolver.PreprocessExtIter(Iter)
-- FluidSolver.Run()
-- StopIntegration = FluidSolver.Monitor(Iter)
-- FluidSolver.Output(Iter)
-- if StopIntegration:
-- break;
-- Iter += 1
--
-- # --- Surface fluid loads interpolation and communication ---#
-- self.MPIPrint('\nProcessing interface fluid loads...\n')
-+ # --- External FSI loop --- #
-+ self.FSIIter = 0
-+ while self.FSIIter < NbFSIIterMax:
-+ self.MPIPrint("\n>>>> FSI iteration {} <<<<".format(self.FSIIter))
-+ self.MPIPrint('\nLaunching fluid solver for a steady computation...')
-+ # --- Fluid solver call for FSI subiteration ---#
-+ Iter = 0
-+ FluidSolver.ResetConvergence()
-+ while Iter < NbIter:
-+ FluidSolver.PreprocessExtIter(Iter)
-+ FluidSolver.Run()
-+ StopIntegration = FluidSolver.Monitor(Iter)
-+ FluidSolver.Output(Iter)
-+ if StopIntegration:
-+ break;
-+ Iter += 1
-+
-+ # --- Surface fluid loads interpolation and communication ---#
-+ self.MPIPrint('\nProcessing interface fluid loads...\n')
- self.MPIBarrier()
-- self.getFluidInterfaceNodalForce(FSI_config, FluidSolver)
-+ self.getFluidInterfaceNodalForce(FSI_config, FluidSolver)
- self.MPIBarrier()
-- self.interpolateFluidLoadsOnSolidMesh(FSI_config)
-- self.setSolidInterfaceLoads(SolidSolver, FSI_config, 0.05)
--
-- # --- Solid solver call for FSI subiteration --- #
-- self.MPIPrint('\nLaunching solid solver for a static computation...\n')
-+ self.interpolateFluidLoadsOnSolidMesh(FSI_config)
-+ self.setSolidInterfaceLoads(SolidSolver, FSI_config, 0.05)
-+
-+ # --- Solid solver call for FSI subiteration --- #
-+ self.MPIPrint('\nLaunching solid solver for a static computation...\n')
- if myid in self.solidSolverProcessors:
-- if FSI_config['CSD_SOLVER'] == 'NATIVE':
-- SolidSolver.staticComputation()
-+ if FSI_config['CSD_SOLVER'] == 'NATIVE':
-+ SolidSolver.staticComputation()
- else:
- SolidSolver.run(0.0, 0.05)
-- SolidSolver.writeSolution(0.0, self.FSIIter, Iter, NbIter)
-+ SolidSolver.writeSolution(0.0, self.FSIIter, Iter, NbIter)
-
-- # --- Compute and monitor the FSI residual --- #
-- varCoordNorm = self.computeSolidInterfaceResidual(SolidSolver)
-- self.MPIPrint('\nFSI displacement norm : {}\n'.format(varCoordNorm))
-+ # --- Compute and monitor the FSI residual --- #
-+ varCoordNorm = self.computeSolidInterfaceResidual(SolidSolver)
-+ self.MPIPrint('\nFSI displacement norm : {}\n'.format(varCoordNorm))
- self.writeFSIHistory(0, 0.0, varCoordNorm, False)
-- if varCoordNorm < FSITolerance:
-- break
-+ if varCoordNorm < FSITolerance:
-+ break
-
- # --- Relaxe the solid displacement and update the solid solution --- #
- self.MPIPrint('\nProcessing interface displacements...\n')
-- self.relaxSolidPosition(FSI_config)
-+ self.relaxSolidPosition(FSI_config)
- if myid in self.solidSolverProcessors:
- SolidSolver.updateSolution()
--
-- # --- Mesh morphing step (displacement interpolation, displacements communication, and mesh morpher call) --- #
-- self.interpolateSolidPositionOnFluidMesh(FSI_config)
-- self.MPIPrint('\nPerforming static mesh deformation...\n')
-- self.setFluidInterfaceVarCoord(FluidSolver)
-- FluidSolver.StaticMeshUpdate()
-- self.FSIIter += 1
-+
-+ # --- Mesh morphing step (displacement interpolation, displacements communication, and mesh morpher call) --- #
-+ self.interpolateSolidPositionOnFluidMesh(FSI_config)
-+ self.MPIPrint('\nPerforming static mesh deformation...\n')
-+ self.setFluidInterfaceVarCoord(FluidSolver)
-+ FluidSolver.StaticMeshUpdate()
-+ self.FSIIter += 1
-
- self.MPIBarrier()
-
-- self.MPIPrint('\nBGS is converged (strong coupling)')
-- self.MPIPrint(' ')
-- self.MPIPrint('*************************')
-- self.MPIPrint('* End FSI computation *')
-- self.MPIPrint('*************************')
-- self.MPIPrint(' ')
-+ self.MPIPrint('\nBGS is converged (strong coupling)')
-+ self.MPIPrint(' ')
-+ self.MPIPrint('*************************')
-+ self.MPIPrint('* End FSI computation *')
-+ self.MPIPrint('*************************')
-+ self.MPIPrint(' ')
-diff -Naur old/SU2_PY/FSI/PitchPlungeAirfoilStructuralTester.py new/SU2_PY/FSI/PitchPlungeAirfoilStructuralTester.py
---- old/SU2_PY/FSI/PitchPlungeAirfoilStructuralTester.py 2020-05-01 19:09:18.000000000 +0300
-+++ new/SU2_PY/FSI/PitchPlungeAirfoilStructuralTester.py 2020-05-10 16:17:07.000000000 +0300
-@@ -174,9 +174,9 @@
-
- with open(self.Config_file) as configfile:
- while 1:
-- line = configfile.readline()
-- if not line:
-- break
-+ line = configfile.readline()
-+ if not line:
-+ break
-
- # remove line returns
- line = line.strip('\r\n')
-@@ -189,41 +189,41 @@
- this_value = line[1].strip()
-
- for case in switch(this_param):
-- #integer values
-- #if case("NB_FSI_ITER") :
-- #self.Config[this_param] = int(this_value)
-- #break
--
-- #float values
-- if case("DELTA_T") : pass
-- if case("START_TIME") : pass
-- if case("STOP_TIME") : pass
-- if case("SPRING_MASS") : pass
-- if case("INERTIA_FLEXURAL") : pass
-- if case("SPRING_STIFFNESS") : pass
-- if case("SPRING_DAMPING") : pass
-- if case("TORSIONAL_STIFFNESS") : pass
-- if case("TORSIONAL_DAMPING") : pass
-- if case("CORD") : pass
-- if case("FLEXURAL_AXIS") : pass
-- if case("GRAVITY_CENTER") : pass
-- if case("INITIAL_DISP") : pass
-- if case("INITIAL_ANGLE") : pass
-- if case("RHO") :
-- self.Config[this_param] = float(this_value)
-- break
--
-- #string values
-- if case("TIME_MARCHING") : pass
-- if case("MESH_FILE") : pass
-- if case("CSD_SOLVER") : pass
-- if case("MOVING_MARKER") : pass
-- if case("STRUCT_TYPE") :
-- self.Config[this_param] = this_value
-- break
-+ #integer values
-+ #if case("NB_FSI_ITER") :
-+ #self.Config[this_param] = int(this_value)
-+ #break
-+
-+ #float values
-+ if case("DELTA_T") : pass
-+ if case("START_TIME") : pass
-+ if case("STOP_TIME") : pass
-+ if case("SPRING_MASS") : pass
-+ if case("INERTIA_FLEXURAL") : pass
-+ if case("SPRING_STIFFNESS") : pass
-+ if case("SPRING_DAMPING") : pass
-+ if case("TORSIONAL_STIFFNESS") : pass
-+ if case("TORSIONAL_DAMPING") : pass
-+ if case("CORD") : pass
-+ if case("FLEXURAL_AXIS") : pass
-+ if case("GRAVITY_CENTER") : pass
-+ if case("INITIAL_DISP") : pass
-+ if case("INITIAL_ANGLE") : pass
-+ if case("RHO") :
-+ self.Config[this_param] = float(this_value)
-+ break
-+
-+ #string values
-+ if case("TIME_MARCHING") : pass
-+ if case("MESH_FILE") : pass
-+ if case("CSD_SOLVER") : pass
-+ if case("MOVING_MARKER") : pass
-+ if case("STRUCT_TYPE") :
-+ self.Config[this_param] = this_value
-+ break
-
-- if case():
-- print(this_param + " is an invalid option !")
-+ if case():
-+ print(this_param + " is an invalid option !")
- break
-
- def __readSU2Mesh(self):
-@@ -233,78 +233,78 @@
- print('Opened mesh file ' + self.Mesh_file + '.')
- while 1:
- line = meshfile.readline()
-- if not line:
-- break
-+ if not line:
-+ break
-
-- pos = line.find('NDIM')
-- if pos != -1:
-- line = line.strip('\r\n')
-+ pos = line.find('NDIM')
-+ if pos != -1:
-+ line = line.strip('\r\n')
- line = line.split("=",1)
-- self.nDim = int(line[1])
-- continue
--
-- pos = line.find('NELEM')
-- if pos != -1:
-- line = line.strip('\r\n')
-+ self.nDim = int(line[1])
-+ continue
-+
-+ pos = line.find('NELEM')
-+ if pos != -1:
-+ line = line.strip('\r\n')
- line = line.split("=",1)
-- self.nElem = int(line[1])
-- continue
-+ self.nElem = int(line[1])
-+ continue
-
-- pos = line.find('NPOIN')
-- if pos != -1:
-- line = line.strip('\r\n')
-+ pos = line.find('NPOIN')
-+ if pos != -1:
-+ line = line.strip('\r\n')
- line = line.split("=",1)
-- self.nPoint = int(line[1])
-+ self.nPoint = int(line[1])
- for iPoint in range(self.nPoint):
-- self.node.append(Point())
-- line = meshfile.readline()
-- line = line.strip('\r\n')
-- line = line.split(' ',self.nDim)
-- x = float(line[0])
-- y = float(line[1])
-+ self.node.append(Point())
-+ line = meshfile.readline()
-+ line = line.strip('\r\n')
-+ line = line.split(' ',self.nDim)
-+ x = float(line[0])
-+ y = float(line[1])
- z = 0.0
-- if self.nDim == 3:
-- z = float(line[2])
-- self.node[iPoint].SetCoord((x,y,z))
-+ if self.nDim == 3:
-+ z = float(line[2])
-+ self.node[iPoint].SetCoord((x,y,z))
- self.node[iPoint].SetCoord0((x,y,z))
-- self.node[iPoint].SetCoord_n((x,y,z))
-- continue
-+ self.node[iPoint].SetCoord_n((x,y,z))
-+ continue
-
-- pos = line.find('NMARK')
-- if pos != -1:
-- line = line.strip('\r\n')
-+ pos = line.find('NMARK')
-+ if pos != -1:
-+ line = line.strip('\r\n')
- line = line.split("=",1)
-- self.nMarker = int(line[1])
-- continue
-+ self.nMarker = int(line[1])
-+ continue
-
-- pos = line.find('MARKER_TAG')
-- if pos != -1:
-- line = line.strip('\r\n')
-- line = line.replace(" ", "")
-+ pos = line.find('MARKER_TAG')
-+ if pos != -1:
-+ line = line.strip('\r\n')
-+ line = line.replace(" ", "")
- line = line.split("=",1)
-- markerTag = line[1]
-- if markerTag == self.FSI_marker:
-- self.markers[markerTag] = []
-- line = meshfile.readline()
-- line = line.strip('\r\n')
-- line = line.split("=",1)
-- nElem = int(line[1])
-- for iElem in range(nElem):
-- line = meshfile.readline()
-- line = line.strip('\r\n')
-- line = line.split(' ',1)
-- elemType = int(line[0])
-- if elemType == 3:
-- nodes = line[1].split(' ', 1)
-- if not int(nodes[0]) in self.markers[markerTag]:
-- self.markers[markerTag].append(int(nodes[0]))
-- if not int(nodes[1]) in self.markers[markerTag]:
-- self.markers[markerTag].append(int(nodes[1]))
-- else:
-- print("Element type {} is not recognized !!".format(elemType))
-- continue
-- else:
-- continue
-+ markerTag = line[1]
-+ if markerTag == self.FSI_marker:
-+ self.markers[markerTag] = []
-+ line = meshfile.readline()
-+ line = line.strip('\r\n')
-+ line = line.split("=",1)
-+ nElem = int(line[1])
-+ for iElem in range(nElem):
-+ line = meshfile.readline()
-+ line = line.strip('\r\n')
-+ line = line.split(' ',1)
-+ elemType = int(line[0])
-+ if elemType == 3:
-+ nodes = line[1].split(' ', 1)
-+ if not int(nodes[0]) in self.markers[markerTag]:
-+ self.markers[markerTag].append(int(nodes[0]))
-+ if not int(nodes[1]) in self.markers[markerTag]:
-+ self.markers[markerTag].append(int(nodes[1]))
-+ else:
-+ print("Element type {} is not recognized !!".format(elemType))
-+ continue
-+ else:
-+ continue
-
- print("Number of dimensions: {}".format(self.nDim))
- print("Number of elements: {}".format(self.nElem))
-@@ -441,23 +441,23 @@
- Coord_n = self.node[iPoint].GetCoord_n()
-
- if self.Unsteady:
-- r = Coord_n - self.centerOfRotation_n
-- else:
-- r = Coord - self.centerOfRotation
-+ r = Coord_n - self.centerOfRotation_n
-+ else:
-+ r = Coord - self.centerOfRotation
-
-- rotCoord = rotMatrix.dot(r)
-+ rotCoord = rotMatrix.dot(r)
-
- newCoord = newCenter + rotCoord
- newVel[0] = Centerdot[0]+psidot*(newCoord[1]-newCenter[1])
-- newVel[1] = Centerdot[1]-psidot*(newCoord[0]-newCenter[0])
-- newVel[2] = Centerdot[2]+0.0
-+ newVel[1] = Centerdot[1]-psidot*(newCoord[0]-newCenter[0])
-+ newVel[2] = Centerdot[2]+0.0
-
- self.node[iPoint].SetCoord((newCoord[0], newCoord[1], newCoord[2]))
- self.node[iPoint].SetVel((newVel[0], newVel[1], newVel[2]))
-
-- if initialize:
-- self.node[iPoint].SetCoord_n((newCoord[0], newCoord[1], newCoord[2]))
-- self.node[iPoint].SetVel_n((newVel[0], newVel[1], newVel[2]))
-+ if initialize:
-+ self.node[iPoint].SetCoord_n((newCoord[0], newCoord[1], newCoord[2]))
-+ self.node[iPoint].SetVel_n((newVel[0], newVel[1], newVel[2]))
-
- self.centerOfRotation = np.copy(newCenter)
-
-diff -Naur old/SU2_PY/FSI/io/FSI_config.py new/SU2_PY/FSI/io/FSI_config.py
---- old/SU2_PY/FSI/io/FSI_config.py 2020-05-01 19:09:18.000000000 +0300
-+++ new/SU2_PY/FSI/io/FSI_config.py 2020-05-10 16:17:07.000000000 +0300
-@@ -58,23 +58,23 @@
- self.readConfig()
-
- def __str__(self):
-- tempString = str()
-- for key, value in self._ConfigContent.items():
-- tempString += "{} = {}\n".format(key,value)
-- return tempString
-+ tempString = str()
-+ for key, value in self._ConfigContent.items():
-+ tempString += "{} = {}\n".format(key,value)
-+ return tempString
-
- def __getitem__(self,key):
-- return self._ConfigContent[key]
-+ return self._ConfigContent[key]
-
- def __setitem__(self, key, value):
-- self._ConfigContent[key] = value
-+ self._ConfigContent[key] = value
-
- def readConfig(self):
- input_file = open(self.ConfigFileName)
- while 1:
-- line = input_file.readline()
-- if not line:
-- break
-+ line = input_file.readline()
-+ if not line:
-+ break
- # remove line returns
- line = line.strip('\r\n')
- # make sure it has useful data
-@@ -86,46 +86,46 @@
- this_value = line[1].strip()
-
- for case in switch(this_param):
-- #integer values
-- if case("NDIM") : pass
-- #if case("MESH_DEF_LIN_ITER") : pass
-- #if case("MESH_DEF_NONLIN_ITER") : pass
-- if case("RESTART_ITER") : pass
-- if case("NB_EXT_ITER") : pass
-- if case("NB_FSI_ITER") :
-- self._ConfigContent[this_param] = int(this_value)
-- break
-+ #integer values
-+ if case("NDIM") : pass
-+ #if case("MESH_DEF_LIN_ITER") : pass
-+ #if case("MESH_DEF_NONLIN_ITER") : pass
-+ if case("RESTART_ITER") : pass
-+ if case("NB_EXT_ITER") : pass
-+ if case("NB_FSI_ITER") :
-+ self._ConfigContent[this_param] = int(this_value)
-+ break
-
-- #float values
-+ #float values
- if case("RBF_RADIUS") : pass
-- if case("AITKEN_PARAM") : pass
-- if case("START_TIME") : pass
-- if case("UNST_TIMESTEP") : pass
-- if case("UNST_TIME") : pass
-- if case("FSI_TOLERANCE") :
-- self._ConfigContent[this_param] = float(this_value)
-- break
--
-- #string values
-- if case("CFD_CONFIG_FILE_NAME") : pass
-- if case("CSD_SOLVER") : pass
-- if case("CSD_CONFIG_FILE_NAME") : pass
-- if case("RESTART_SOL") : pass
-- if case("MATCHING_MESH") : pass
-+ if case("AITKEN_PARAM") : pass
-+ if case("START_TIME") : pass
-+ if case("UNST_TIMESTEP") : pass
-+ if case("UNST_TIME") : pass
-+ if case("FSI_TOLERANCE") :
-+ self._ConfigContent[this_param] = float(this_value)
-+ break
-+
-+ #string values
-+ if case("CFD_CONFIG_FILE_NAME") : pass
-+ if case("CSD_SOLVER") : pass
-+ if case("CSD_CONFIG_FILE_NAME") : pass
-+ if case("RESTART_SOL") : pass
-+ if case("MATCHING_MESH") : pass
- if case("MESH_INTERP_METHOD") : pass
-- if case("DISP_PRED") : pass
-- if case("AITKEN_RELAX") : pass
-- if case("TIME_MARCHING") : pass
-- if case("INTERNAL_FLOW") :
-- #if case("MESH_DEF_METHOD") : pass
-- self._ConfigContent[this_param] = this_value
-- break
--
-- if case():
-- print(this_param + " is an invalid option !")
-- break
-- #end for
--
-+ if case("DISP_PRED") : pass
-+ if case("AITKEN_RELAX") : pass
-+ if case("TIME_MARCHING") : pass
-+ if case("INTERNAL_FLOW") :
-+ #if case("MESH_DEF_METHOD") : pass
-+ self._ConfigContent[this_param] = this_value
-+ break
-+
-+ if case():
-+ print(this_param + " is an invalid option !")
-+ break
-+ #end for
-+
-
-
- #def dump()
diff --git a/sys-apps/procs/procs-0.10.10.ebuild b/sys-apps/procs/procs-0.10.10.ebuild
index ff984c15ab..13f67c665e 100644
--- a/sys-apps/procs/procs-0.10.10.ebuild
+++ b/sys-apps/procs/procs-0.10.10.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2017-2020 Gentoo Authors
+# Copyright 2017-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -189,5 +189,5 @@ SRC_URI="
LICENSE="Apache-2.0 BSD BSD-2 CC0-1.0 MIT ZLIB"
SLOT="0"
-KEYWORDS="~amd64"
+KEYWORDS="~amd64 ~arm64 ~x86"
RESTRICT="mirror"
diff --git a/sys-block/systemd-swap/systemd-swap-4.4.0.ebuild b/sys-block/systemd-swap/systemd-swap-4.4.0.ebuild
index e8951d7c87..6aa36b62d3 100644
--- a/sys-block/systemd-swap/systemd-swap-4.4.0.ebuild
+++ b/sys-block/systemd-swap/systemd-swap-4.4.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2020 Gentoo Authors
+# Copyright 2019-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -16,7 +16,7 @@ if [[ ${PV} == *9999 ]] ; then
EGIT_REPO_URI="https://github.com/Nefelim4ag/${PN}.git"
else
SRC_URI="https://github.com/Nefelim4ag/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~x86"
fi
LICENSE="GPL-3"
diff --git a/sys-block/systemd-swap/systemd-swap-9999.ebuild b/sys-block/systemd-swap/systemd-swap-9999.ebuild
index e8951d7c87..6aa36b62d3 100644
--- a/sys-block/systemd-swap/systemd-swap-9999.ebuild
+++ b/sys-block/systemd-swap/systemd-swap-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2020 Gentoo Authors
+# Copyright 2019-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -16,7 +16,7 @@ if [[ ${PV} == *9999 ]] ; then
EGIT_REPO_URI="https://github.com/Nefelim4ag/${PN}.git"
else
SRC_URI="https://github.com/Nefelim4ag/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~x86"
fi
LICENSE="GPL-3"