diff --git a/dev-python/fake-useragent/fake-useragent-0.1.11.ebuild b/dev-python/fake-useragent/fake-useragent-0.1.11.ebuild index 46a9b5d79f..8c151ba119 100644 --- a/dev-python/fake-useragent/fake-useragent-0.1.11.ebuild +++ b/dev-python/fake-useragent/fake-useragent-0.1.11.ebuild @@ -21,7 +21,6 @@ KEYWORDS="~amd64" RDEPEND=" dev-python/appdirs[${PYTHON_USEDEP}] dev-python/decorator[${PYTHON_USEDEP}] - dev-python/funcsigs[${PYTHON_USEDEP}] dev-python/ipdb[${PYTHON_USEDEP}] dev-python/ipython[${PYTHON_USEDEP}] dev-python/ipython_genutils[${PYTHON_USEDEP}] diff --git a/dev-python/pytest-randomly/Manifest b/dev-python/pytest-randomly/Manifest index 03807ea58f..68c4d05f6d 100644 --- a/dev-python/pytest-randomly/Manifest +++ b/dev-python/pytest-randomly/Manifest @@ -1 +1,2 @@ DIST pytest-randomly-3.4.1.tar.gz 32468 BLAKE2B 6aaddfca7434a8b7060aa32d69f84ff5e03e5f43bcfdfacc56f792ba6e1a1f5f49dca641a0100ed4ddf0f6947017aa354ab4fcc2ad837bb5b072aab8142f07b6 SHA512 3f1006ce67478221fb57369f6b0dcbb41bdd38798059112cff2e113ab101a4d07e72e5f302ffdf6159cc8600999f691f0f665fda4c0fcf58bba3c4fe5a12c039 +DIST pytest-randomly-3.5.0.tar.gz 36605 BLAKE2B 1e993f7b0cec9fede1fd22c9be06ca34b884ea67183e13197e59359ebb5b8a6bc86715b117f379d72c11eec85fe31c3f4cb1dd7c2bae1412dabd630ddff81bbf SHA512 ed5cc11799e38caaa899ab25f75469baa2c57a5113c3e51129c4cee801b0eded57f6165113f8cb5a8c995057569c224b9039d601b361b9e95553dc8cb338b368 diff --git a/dev-python/pytest-randomly/pytest-randomly-3.5.0.ebuild b/dev-python/pytest-randomly/pytest-randomly-3.5.0.ebuild new file mode 100644 index 0000000000..36dac6bab7 --- /dev/null +++ b/dev-python/pytest-randomly/pytest-randomly-3.5.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +DISTUTILS_USE_SETUPTOOLS=bdepend +PYTHON_COMPAT=( python3_{7,8} ) + +inherit distutils-r1 + +DESCRIPTION="Pytest plugin to randomly order tests and control random.seed" +HOMEPAGE=" + https://pypi.python.org/pypi/pytest-randomly + https://github.com/pytest-dev/pytest-randomly +" +SRC_URI="https://github.com/pytest-dev/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/factory_boy[${PYTHON_USEDEP}] + dev-python/faker[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + + $(python_gen_cond_dep 'dev-python/importlib_metadata[${PYTHON_USEDEP}]' python3_7) + $(python_gen_cond_dep 'dev-python/pygments[${PYTHON_USEDEP}]' python3_9) +" +DEPEND=" + test? ( + dev-python/pytest-randomly[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +python_test() { + pytest -vv \ + --deselect tests/test_pytest_randomly.py::test_entrypoint_injection \ + --deselect tests/test_pytest_randomly.py::test_classes_reordered \ + --deselect tests/test_pytest_randomly.py::test_doctests_reordered \ + --deselect tests/test_pytest_randomly.py::test_class_test_methods_reordered \ + --deselect tests/test_pytest_randomly.py::test_files_reordered \ + --deselect tests/test_pytest_randomly.py::test_test_functions_reordered \ + --deselect tests/test_pytest_randomly.py::test_test_functions_reordered_when_randomness_in_module \ + --deselect tests/test_pytest_randomly.py::test_files_reordered_when_seed_not_reset \ + --deselect tests/test_pytest_randomly.py::test_doctests_in_txt_files_reordered \ + || die "Testsuite failed under ${EPYTHON}" +} diff --git a/dev-python/python-mpv-jsonipc/Manifest b/dev-python/python-mpv-jsonipc/Manifest index 59eed45859..b23bf88252 100644 --- a/dev-python/python-mpv-jsonipc/Manifest +++ b/dev-python/python-mpv-jsonipc/Manifest @@ -1 +1,2 @@ DIST python-mpv-jsonipc-1.1.11.tar.gz 7505 BLAKE2B bee145df85cc822c3797582b7ec66ed2d32eb01eb84f66a24c7504b4ebec164d18a047cbc6eb808e1e4fbdcb5d324ef6b340ec3f3d631b7e8eae23a6c686fb3f SHA512 6a4383349cc335adf750028223ed0e4dbaeaa90b11e59a5205778b58ac64992b60377ccf2626c512820178d50add2e1d98bb809a6e1e9759af69ae96f86350a1 +DIST python-mpv-jsonipc-1.1.12.tar.gz 7575 BLAKE2B 24be588022c38bff75b16a39b5fdde0603afff9f2311deba334a5ff6e7520803e1ad381b067ae14109d83c655758f46541012009364624ea6dffadc5ffe2c3ad SHA512 64aa97f6b04e6e5529beb54530716d8749178a5b4d7cd88537bcbba4d72805562d80a9159663338c15e8c9801c99a3746e9c95c592c1f75a3bfcaa2f6d0f28b3 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 new file mode 100644 index 0000000000..864c0eed5a --- /dev/null +++ b/dev-python/python-mpv-jsonipc/python-mpv-jsonipc-1.1.12.ebuild @@ -0,0 +1,16 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) + +inherit distutils-r1 + +DESCRIPTION="Python API to MPV using JSON IPC" +HOMEPAGE="https://github.com/iwalton3/python-mpv-jsonipc" +SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" diff --git a/dev-python/ufoLib2/Manifest b/dev-python/ufoLib2/Manifest index 85edda690a..c864e7b2b9 100644 --- a/dev-python/ufoLib2/Manifest +++ b/dev-python/ufoLib2/Manifest @@ -1,2 +1,3 @@ +DIST ufoLib2-0.10.0.zip 84972 BLAKE2B 7dde59ec9cfda6e2f8213ccdc24fd786b515935f2b7ef9495eb276f10b9ed472ca2fc58d8b63ddf4d48c8025250e0569d4060454aa23ada0834a76e9afa42c18 SHA512 aac5ccb27311812947d7bd678e82dc950b042dd1660622ac31f7c772436259924b5bf7b2dc1639b7f70e36302abbb11bc0cdb153d3ef061234c0fcbd22d63d58 DIST ufoLib2-0.7.1.zip 82128 BLAKE2B 833ec522edb52c54926d9578507b4afe0c3eda313f663fa1655f836369b23a2d11a1a947d9b8079aad711f0dac9754d902c90811cf42affe5ba6685edd4acc69 SHA512 e0ddd496ced3234d9c5ee77af4205a1e5df031017a4ba526749df180a21ef878c56b933eae37459c6a5b97364849a5209844485e873a7b91d46a613f0f13b79b DIST ufoLib2-0.8.0.zip 82448 BLAKE2B 496980d61a6d46dee3fc3ae6e69df92db78fa3ba0e2262032cfb45dc77f842ea04c7ea019764deb7565b9ded9dbe5263022376212d7c42782180d0b5d5c0dcc2 SHA512 8ce5af30b77dfbadc16beda2028f2d62468e3fb54998209f0940cb82dac0f0c1bf33813905aae5ea9cb2b05c7e29fdcd0a8ba8058b44ddc0d43f2863f71e4ebd diff --git a/dev-python/ufoLib2/ufoLib2-0.10.0.ebuild b/dev-python/ufoLib2/ufoLib2-0.10.0.ebuild new file mode 100644 index 0000000000..0fafba0990 --- /dev/null +++ b/dev-python/ufoLib2/ufoLib2-0.10.0.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{7,8} ) +DOCS_DEPEND=" + dev-python/sphinx_rtd_theme + dev-python/typing-extensions +" +DOCS_DIR="${S}/docs/source" +DOCS_BUILDER="sphinx" +inherit distutils-r1 docs + +DESCRIPTION="A UFO font library" +HOMEPAGE="https://github.com/fonttools/ufoLib2" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# fs not pulled in by fonttools +RDEPEND=" + >=dev-python/attrs-19.2.0[${PYTHON_USEDEP}] + >=dev-python/fonttools-4.0.0[${PYTHON_USEDEP}] + dev-python/fs[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] +" +DEPEND=" + ${RDEPEND} + dev-python/setuptools_scm[${PYTHON_USEDEP}] + test? ( + dev-python/typing-extensions[${PYTHON_USEDEP}] + ) +" +BDEPEND="app-arch/unzip" + +distutils_enable_tests pytest + +python_prepare_all() { + sed -e '/\/d' -i setup.cfg || die + distutils-r1_python_prepare_all +} diff --git a/dev-python/ufoNormalizer/Manifest b/dev-python/ufoNormalizer/Manifest index 2f10853c1a..d7e1f37940 100644 --- a/dev-python/ufoNormalizer/Manifest +++ b/dev-python/ufoNormalizer/Manifest @@ -1,2 +1 @@ -DIST ufoNormalizer-0.4.1.tar.gz 30350 BLAKE2B b5709deea451f28a4372cefca497dcde5875a6fd64afc5b21e8a115d02ed4ade714e6b5b3d2f445d4de70ba47a3a8dd9ed4e1e0c3e27f9ed6e7eb9f1994db134 SHA512 bf8cb37b171363e1eca85ba01f78f8c2ed4d7741aba3ca8b77c1590fc81cca194d521224f370cdadcda033772d2e5c540d04098558a148d44c747af20f4b636b DIST ufonormalizer-0.5.0.zip 37969 BLAKE2B 9012eccb3d7ad50a2e40a4c08d2e118d0dbf95620a269aaac921c2d055a207337d0c87f21485ac2c386f51a3e3ed8050d6bef2c276cb5e18ec83b14e2cf8d2b2 SHA512 79de1b94433038fa312c6faceec65255840d510a2cce7de0fe5b04986b750e5bac42c402c1ecb66a9ef4e1ba24495380c8c895d1f72522d2efff22932cea13bd diff --git a/dev-python/ufoNormalizer/ufoNormalizer-0.4.1.ebuild b/dev-python/ufoNormalizer/ufoNormalizer-0.4.1.ebuild deleted file mode 100644 index 6bf94c6a5f..0000000000 --- a/dev-python/ufoNormalizer/ufoNormalizer-0.4.1.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PYTHON_COMPAT=( python3_7 pypy3 ) -DISTUTILS_USE_SETUPTOOLS=rdepend - -inherit distutils-r1 - -DESCRIPTION="A tool that will normalize the XML and other data inside of a UFO." -HOMEPAGE="https://github.com/unified-font-object/ufoNormalizer" -SRC_URI="https://github.com/unified-font-object/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" - -SLOT="0" -LICENSE="BSD" -KEYWORDS="~amd64" - -DEPEND="" -RDEPEND="" -BDEPEND="app-arch/unzip" - -distutils_enable_tests setup.py diff --git a/dev-vcs/lazygit/Manifest b/dev-vcs/lazygit/Manifest index 6590b46f9e..aabf37b2b7 100644 --- a/dev-vcs/lazygit/Manifest +++ b/dev-vcs/lazygit/Manifest @@ -1,4 +1,3 @@ DIST lazygit-0.20.9.tar.gz 9196030 BLAKE2B 7fd64d06b3036926b00cc64f684d48a3791561e9b48f4bfbc2134e019caf4c96f8a37e2a1d33c79cab9a840b20f212f999f81d1e5a9763e2902332c298ede613 SHA512 d38fd390076a24b914309b6ecb506fc7b21e48c0bfab14aee5ff3bb7bcb591f47bf82051e5442ca4d4d2a0d864eb1554a64c594aefb130ec4f07861128d124dd DIST lazygit-0.22.9.tar.gz 9232631 BLAKE2B 50febf0727dc3fff0e61b158bc37df4128cdc9934a42b113612896a3712fb7cd0ce0a0860eec88cbbde289fd08fb492e851937be549a2036ad993bdeb3a101ae SHA512 9d4dc92762099c141e56bbb386217ea2028ba6a78d6bb5d54ef9c022e447a1b9fa2ce37d6e2813411fe6fa4f5192753beec8b136838aefe067019fd0820225e1 -DIST lazygit-0.23.6.tar.gz 2144643 BLAKE2B d8f8be826212517abfc0dd0feace532600a8455c49874e385257a73ec8e3ea794a13d960fbd122461c454313d5a210cd56be99d98cffb5b47c41d70bd67921d3 SHA512 a71bb951eb452252a97789113664b00212cce4bea223c898b20ce3b3dcdc761d3cafe036b5d2dce20c4da06af361ee21f2e701464ba99dcddc49f383219d2713 DIST lazygit-0.23.7.tar.gz 2144614 BLAKE2B d18aaa19212ec9e6ed7d3b406d3e1f6413f6c15bf6a8c7c99cb8a2b01b9388db3f1ad04c485782e0823415cec3c6b461cf942583ef0ac744cb18270c8fc943b1 SHA512 ffc827a08a3ba99afa339cee48b9e10267bc4aa27592d43ec1e4be80a7b4f9e628f286b50a1940a59a5cfa96121de6ce4247ec91642a8798dba8ca42232596b9 diff --git a/dev-vcs/lazygit/lazygit-0.23.6.ebuild b/dev-vcs/lazygit/lazygit-0.23.6.ebuild deleted file mode 100644 index df46884b8b..0000000000 --- a/dev-vcs/lazygit/lazygit-0.23.6.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -EGO_PN="github.com/jesseduffield/lazygit" - -inherit golang-build golang-vcs-snapshot - -DESCRIPTION="Lazygit, a simple terminal UI for git commands" -HOMEPAGE="https://github.com/jesseduffield/lazygit" -SRC_URI="https://github.com/jesseduffield/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64" -IUSE="doc" - -DEPEND=( sys-libs/glibc ) -RDEPEND=( - ${DEPEND} - dev-vcs/git -) - -DOCS=( src/${EGO_PN}/{CONTRIBUTING,README}.md ) - -src_compile() { - GOPATH="${S}" go build -v -o bin/lazygit src/${EGO_PN}/main.go || die -} - -src_install() { - dobin bin/lazygit - - use doc && dodoc -r "src/${EGO_PN}/docs/." - einstalldocs -} diff --git a/licenses/Warframe-EULA b/licenses/Warframe-EULA new file mode 100644 index 0000000000..28ddaa87f8 --- /dev/null +++ b/licenses/Warframe-EULA @@ -0,0 +1,107 @@ +END USER LICENSE AGREEMENT + +Updated: June 27, 2017 + +Warframe® (the “GAME”) is a free-to-play computer game developed and operated by Digital Extremes Ltd. In this agreement, “ DIGITAL EXTREMES” or “DE” means Digital Extremes Ltd., an Ontario, Canada Corporation; “YOU” and “ YOUR” mean the user of the computer on which the Game will be or has been installed. + +PLEASE READ THIS END USER LICENSE AGREEMENT (THIS “EULA” OR “LICENSE AGREEMENT") CAREFULLY BEFORE CLICKING “I AGREE”. BY DOWNLOADING THE GAME AND CLICKING THE "I AGREE" BUTTON OR USING THE GAME OR INSTALLING THE GAME CLIENT SOFTWARE (THE " SOFTWARE"), YOU AGREE THAT THIS LICENSE AGREEMENT IS ENFORCEABLE LIKE ANY WRITTEN CONTRACT SIGNED BY YOU. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS LICENSE AGREEMENT, CLICK ON THE “DO NOT AGREE” BUTTON WHICH INDICATES THAT YOU DO NOT AGREE TO ACCEPT THE TERMS OF THIS LICENSE AGREEMENT AND WILL NOT COMPLETE INSTALLATION OF THE SOFTWARE. BY ENTERING INTO THIS LICENSE AGREEMENT, YOU REPRESENT THAT YOU ARE AT LEAST 18 YEARS OF AGE (EVEN IF YOU’RE ENTERING INTO THIS AGREEMENT ON BEHALF OF AN AUTHORIZED USER WHO IS UNDER 18 YEARS OF AGE) AND HAVE THE LEGAL CAPACITY TO ENTER INTO A CONTRACT IN THE JURISDICTION WHERE YOU RESIDE. + +THE TERMS OF THIS AGREEMENT MAY BE AMENDED, SUPPLEMENTED OR MODIFIED AT ANY TIME BY DIGITAL EXTREMES IN ITS DISCRETION, WHEN DE UPDATES OR UPGRADES THE SOFTWARE PRODUCT EFFECTIVE UPON PRIOR NOTICE AS FOLLOWS: Digital Extremes will post the revised version of this Agreement here: www.warframe.com, and may provide such other notice as DE may elect in its sole discretion. If any future changes to this Agreement are unacceptable to you or cause you to no longer be in compliance with this Agreement, you may terminate this Agreement in accordance with Section 7 below. Your installation and use of any of Digital Extremes’ updates, upgrades or modifications to the Software or your continued use of the Software following notice of changes to this Agreement, shall conclusively demonstrate your acceptance of such changes. Digital Extremes may change, modify, suspend, or discontinue any aspect of the Software at any time. Digital Extremes may also impose limits on certain features or restrict your access to parts or all of the Software Product without notice or liability. You have no interest, monetary or otherwise, in any feature or content contained in the Software. + +1. LIMITED USE LICENSE + +If you agree to this License Agreement, you may install the Software onto your computer for purposes of playing the Game by registering for and accessing a User Account (“Service”). Subject to your agreement to and continuing compliance with this License Agreement, DE hereby grants, and you hereby accept, a limited, non-exclusive license to (a) install the Software on one or more computers owned by you or under your legitimate control, and (b) use the Software in conjunction with the Service for your non-commercial entertainment purposes only. All use of the Software is subject to this License Agreement and to the Terms of Use agreement (the “ Terms of Use”), both of which you must accept before you can use your User Account (hereinafter referred to as “Account”) to play the Game. + +2. LICENSE RESTRICTIONS AND LIMITATIONS + +The limited, personal use license granted to you in Section 1 is subject to the following restrictions and limitations as well as all other terms and conditions of this Agreement (collectively, the “License Limitations”). You agree that you will not, under any circumstances: + +a. sell, sublicense, assign, rent, lease, or otherwise transfer the Software, except as expressly permitted by this Agreement; + +b. reverse engineer, decompile, disassemble or otherwise derive source code or game data from the Software or reduce the Software to a human-readable form, except to the extent that such actions are expressly permitted by applicable law or publish or share same with anyone; + +c. copy, photocopy or reproduce the Software, in whole or in part; provided, however, that you may make one (1) copy of the Game Software and the Game manual for archival purposes only; + +d. modify, translate or create derivative works based on or utilizing the Software, Service or Software experience, or any portion thereof or publish or share same with anyone; + +e. remove or tamper with any copyright or other proprietary notices contained in or relating to the Software, Service or Game experience, or any portion thereof; + +f. use cheats, automation software (bots), hacks, mods or any other unauthorized third-party software, tools or content designed to modify the Software, the Service or the Game experience; + +g. exploit the Software, the Service, the Game experience or any portion thereof for any commercial purpose, including without limitation, (i) use at a cyber cafe, computer gaming center or any other location-based site without the express written consent of Digital Extremes; (ii) for gathering in-game currency, items or resources for sale outside the Software; or (iii) performing in-game services in exchange for payment outside the Software (e.g., power-leveling and similar activities); + +h. use any unauthorized third-party software that intercepts, “mines”, or otherwise collects information from, within or through the Software or Service, including without limitation, any software that reads areas of RAM used by the Software to store information about a character, in-game items or the Software environment; provided, however, that Digital Extremes may, in its sole discretion, allow the use of specified third party user interfaces; + +i. modify, or allow or cause to be modified, any files that are a part of the Software in any way not expressly authorized by Digital Extremes in writing in each instance; + +j. host, provide or develop matchmaking services for the Software or Service or intercept, emulate or redirect the communication protocols used by Digital Extremes in any way, for any purpose, including without limitation, unauthorized play over the Internet, network play, or as part of content aggregation networks; + +k. facilitate, create or maintain any unauthorized connection to the Software or Service, including without limitation, (i) any connection to any unauthorized server that emulates, or attempts to emulate, the Service; or (ii) any connection using programs or tools not expressly approved by Digital Extremes in writing in each instance; + +l. create any other software or content that incorporates the Software or Service or any portion thereof; + +m. sell, grant a security interest in or transfer reproductions of the Software to other parties in any way not expressly authorized herein, or rent, lease or license the Software to others; or + +n. disclose any unused or pending features you may find in the Software, which are confidential trade secrets of DE. + +3. COPYRIGHTS, TRADEMARKS AND PROPRIETARY RIGHTS + +a. Warframe® and certain related names and logos are registered or unregistered trademarks, service marks and/or trade names of Digital Extremes. These and all other trademarks, service marks and trade names used in or in connection with the Software (the “Marks”) are proprietary rights owned by Digital Extremes or its licensors. + +b. All rights and title in and to the Software, the Game, the Service, the Site, your Account and all content included therein (including, without limitation, Accounts, computer code, titles, objects, artifacts, characters, character names, locations, location names, stories, storylines, dialogue, catch phrases, artwork, graphics, structural or landscape designs, animations, sounds, musical compositions and recordings, audio-visual works, character likenesses, and methods of operation) are owned by Digital Extremes or its licensors. The Software may contain materials licensed by third parties, and the licensors of those materials may enforce their rights in the event of any violation of this Agreement. The Software and the Game and all content therein are protected by Canada and the United States and other international intellectual property laws. Digital Extremes and its licensors reserve all rights in connection with the Software and the Game, including, without limitation, the exclusive right to create derivative works there from, and you agree that you will not create any work of authorship based on the Game except as expressly permitted by Digital Extremes. You acknowledge and agree that you have no interest, monetary or otherwise, in any feature or content contained in the Game. You further acknowledge and agree that you shall have no ownership or other property interest in your Account, and you acknowledge and agree that all rights in and to the Account are and shall forever be owned by and inure to the benefit of Digital Extremes. + +4. CONSENT TO MONITOR + +When running the Software, Digital Extremes may monitor your use and play of the Software and collect data regarding your use and play of the software in accordance with Digital Extreme’s Privacy Policy found at www.warframe.com. In addition, the software may monitor your computer’s Random Access Memory (RAM) for unauthorized third-party programs running concurrently with the Software. An “Unauthorized Third-Party Program” as used herein shall be defined as any third-party software prohibited by Section 2. In the event that the Software detects an Unauthorized Third-Party Program, the Software may communicate information back to Digital Extremes, including without limitation, your Account name, details about the Unauthorized Third-Party Program detected and the time and date; and Digital Extremes may exercise any or all of its rights under this agreement, with or without prior notice to you, including without limitation, termination of this agreement and your right to continue use of the Software. + +5. PATCHES AND UPDATES + +Digital Extremes may deploy or provide patches, updates and modifications to the Game that must be installed for you to continue to play the Game. Digital Extremes may update the Game remotely including without limitation the Game Client Software residing on your machine, without your knowledge, and you hereby grant to Digital Extremes your consent to deploy and apply such patches, updates and modifications. + +6. DURATION OF ONLINE SERVICES + +The Software is an online game that must be played over the Internet through the Service as provided by Digital Extremes. You understand and agree that the Service is provided by Digital Extremes at its discretion and may be terminated or otherwise discontinued by DE at any time for any reason or no reason. + +7. TERMINATION + +This License Agreement is effective until terminated. You may terminate the License Agreement at any time by (i) permanently destroying all copies of the Game in your possession or control; (ii) removing the Software from your hard drive. Digital Extremes may terminate this Agreement at any time for any reason or no reason. Upon termination for any reason, all licenses granted herein shall immediately terminate and you must immediately and permanently destroy all copies of the Game in your possession and control and remove the Software from your hard drive. + +8. WARRANTY DISCLAIMER + +TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE GAME AND ALL INFORMATION, CONTENT AND SERVICES CONTAINED THEREON ARE PROVIDED ON AN “AS IS” BASIS WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. DIGITAL EXTREMES EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES OF TITLE OR NON-INFRINGEMENT OR IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OTHER THAN THOSE WARRANTIES WHICH ARE INCAPABLE OF EXCLUSION, RESTRICTION OR MODIFICATION UNDER THE LAWS APPLICABLE TO THIS AGREEMENT. OUR GOODS COME WITH GUARANTEES THAT CANNOT BE EXCLUDED UNDER THE AUSTRALIAN CONSUMER LAW. AUSTRALIAN CUSTOMERS ARE ENTITLED TO A REPLACEMENT OR REFUND FOR A MAJOR FAILURE AND FOR COMPENSATION FOR ANY OTHER REASONABLY FORESEEABLE LOSS OR DAMAGE. AUSTRALIAN CUSTOMERS ARE ALSO ENTITLED TO HAVE THE GOODS REPAIRED OR REPLACED IF THE GOODS FAIL TO BE OF ACCEPTABLE QUALITY AND THE FAILURE DOES NOT AMOUNT TO A MAJOR FAILURE. USE OF THE GAME IS AT YOUR SOLE RISK. + +NEITHER DIGITAL EXTREMES, DIGITAL EXTREMES' THIRD-PARTY PROVIDERS, NOR ANY PERSON OR ENTITY INVOLVED IN CREATING, PRODUCING OR DISTRIBUTING ANY CONTENT OR SERVICES CONTAINED IN THE GAME, NOR ANY OF THEIR RESPECTIVE DIRECTORS, OFFICERS, EMPLOYEES OR AGENTS, MAKE ANY WARRANTY WHATSOEVER, INCLUDING, WITHOUT LIMITATION, THAT THE GAME WILL BE UNINTERRUPTED OR ERROR FREE; NOR DO THEY MAKE ANY WARRANTY AS TO THE RESULTS THAT MAY BE OBTAINED FROM USE OF THE GAME OR AS TO THE ACCURACY, RELIABILITY, QUALITY OR CONTENT OF ANY INFORMATION, SERVICE OR MERCHANDISE PROVIDED ON OR THROUGH THE GAME, INCLUDING, WITHOUT LIMITATION, ALL DIGITAL EXTREMES COMMUNICATION FEATURES. + +9. LIMITATION OF LIABILITY + +TO THE EXTENT PERMITTED BY LAW, DIGITAL EXTREMES SHALL NOT BE LIABLE IN ANY WAY FOR ANY LOSS OR DAMAGE OF ANY KIND ARISING OUT OF THE GAME OR ANY USE OF THE GAME, INCLUDING, WITHOUT LIMITATION, LOSS OF DATA, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR LOSSES. FURTHER, DIGITAL EXTREMES SHALL NOT BE LIABLE IN ANY WAY FOR ANY LOSS OR DAMAGE TO PLAYER CHARACTERS, VIRTUAL GOODS OR CURRENCY, ACCOUNTS, STATISTICS OR USER RANKS, OR PROFILE INFORMATION STORED BY THE GAME AND/OR THE SERVICE. DIGITAL EXTREMES SHALL NOT BE RESPONSIBLE FOR ANY INTERRUPTIONS OF SERVICE, INCLUDING, WITHOUT LIMITATION, ISP DISRUPTIONS, SOFTWARE OR HARDWARE FAILURES, OR ANY OTHER EVENT WHICH MAY RESULT IN A LOSS OF DATA OR DISRUPTION OF SERVICE. IN NO EVENT WILL DIGITAL EXTREMES BE LIABLE TO YOU FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES. + +Because some states or jurisdictions do not allow the exclusion or the limitation of liability for consequential or incidental damages, in such states or jurisdictions, the liability of Digital Extremes shall be limited to the fullest extent permitted by applicable law. + +10. EQUITABLE REMEDIES + +You hereby agree that Digital Extremes would be irreparably damaged if the terms of this Agreement were not specifically enforced, and therefore you agree that Digital Extremes shall be entitled, without bond or other security or proof of damages, to appropriate equitable remedies in any court of competent jurisdiction with respect to any breach of this Agreement, which equitable remedies shall be in addition to such other remedies as Digital Extremes may otherwise have available under applicable law. In the event any litigation is brought by either party in connection with this Agreement, the prevailing party in such litigation shall be entitled to recover from the other party all the costs, attorneys’ fees and other expenses incurred by such prevailing party in the litigation. + +11. GOVERNING LAW; DISPUTE RESOLUTION + +a. Negotiations - To expedite resolution and control the cost of any dispute, controversy or claim related to this License Agreement (“Dispute”), you and Digital Extremes agree to first attempt to negotiate any Dispute (except those Disputes expressly provided below) informally for at least 30 days before initiating any arbitration or court proceeding. Such informal negotiations commence upon written notice from one person to the other. Digital Extremes will send its notice by email to you at the email address you have provided to create your Warframe account. You will send your notice to Digital Extremes Ltd. by submitting a Support Ticket through Customer Support at http://support.warframe.com or alternatively by mail to 250 York Street, Ste 100, London, Ontario, N6A 5P2, Canada. + +b. Binding Arbitration - If you and Digital Extremes are unable to resolve a Dispute through informal negotiations, either you or DE may elect to have the Dispute (except those Disputes expressly excluded below) finally and exclusively resolved by binding arbitration. Any election to arbitrate by one party shall be final and binding on the other. YOU UNDERSTAND THAT ABSENT THIS PROVISION, YOU WOULD HAVE THE RIGHT TO SUE IN COURT AND HAVE A JURY TRIAL. The arbitration shall be commenced and conducted under the jurisdiction of Canadian courts. The arbitration may be conducted in person, through the submission of documents, by phone or online. The arbitrator will make a decision in writing, but need not provide a statement of reasons unless requested by a party. The arbitrator must follow applicable law, and any award may be challenged if the arbitrator fails to do so. Except as otherwise provided in this License Agreement, you and DE may litigate in court to compel arbitration, stay proceeding pending arbitration, or to confirm, modify, vacate or enter judgment on the award entered by the arbitrator. + +c. Restrictions - You and Digital Extremes agree that any arbitration shall be limited to the Dispute between DE and you individually. To the full extent permitted by law, (1) no arbitration shall be joined with any other; (2) there is no right or authority for any Dispute to be arbitrated on a class-action basis or to utilize class action procedures; and (3) there is no right or authority for any Dispute to be brought in a purported representative capacity on behalf of the general public or any other persons. + +d. Exceptions to Negotiations and Arbitration - You and Digital Extremes agree that the following Disputes are not subject to the above provisions concerning informal negotiations and binding arbitration: (1) any Disputes seeking to enforce or protect, or concerning the validity of, any of your or DE’s intellectual property rights; (2) any Dispute related to, or arising from, allegations of theft, piracy, invasion of privacy or unauthorized use; and (3) any claim for injunctive relief. + +12. MISCELLANEOUS + +This License Agreement represents the complete agreement between you and Digital Extremes with respect to the subject matter hereof, and supersedes any prior or contemporaneous agreements between you and Digital Extremes; provided however, that this License Agreement shall coexist with, and shall not supersede, the Terms of Use or the Privacy Policy. To the extent that the provisions of this License Agreement conflict with the Terms of Use, the conflicting provisions in the Terms of Use shall govern. The Game is operated by Digital Extremes in Canada. Those who choose to access the Game from locations outside Canada do so on their own initiative and are responsible for compliance with applicable local laws. Digital Extremes’ failure to enforce any provision of this License Agreement shall in no way be construed to be a present or future waiver of such provision, nor in any way affect the right of any party to enforce each and every such provision thereafter. The express waiver by Digital Extremes of any provision, condition or requirement of this License Agreement shall not constitute a waiver of any future obligation to comply with such provision, condition or requirement. If any provision of this License Agreement is held to be invalid or unenforceable for any reason, such provision shall be reformed to the extent necessary to make it enforceable to the maximum extent permissible so as to affect the intent of the parties, and the remainder of this License Agreement shall continue in full force and effect. If, however, it is determined that such provision cannot be reformed, then that provision shall be deemed severable from these terms and shall not affect the validity and enforceability of any remaining provisions. The provisions of Sections 2, 3, 4 and 8 through 12 shall survive any termination of this License Agreement. If you have any questions concerning these terms and conditions, or if you would like to contact Digital Extremes for any other reason, please contact Digital Extremes through its website at http://www.digitalextremes.com/contact . + +For North & South American PlayStation™Network Users: + +Purchase and use of items are subject to the Network Terms of Service and User Agreement. This online service has been sublicensed to you by Sony Interactive Entertainment America. + +For European PlayStation™Network Users: + +Any content purchased in an in-game store will be purchased from Sony Interactive Entertainment Network Europe Limited (“SIENE”) and be subject to PlayStation™Network Terms of Service and User Agreement which is available on the PlayStation™Store. Please check usage rights for each purchase as these may differ from item to item. Unless otherwise shown, content available in any in-game store has the same age rating as the game. + +YOU HEREBY ACKNOWLEDGE THAT YOU HAVE READ AND UNDERSTAND THE FOREGOING END USER LICENSE AGREEMENT AND AGREE THAT BY CLICKING “I AGREE” AND/OR INSTALLING THE SOFTWARE AND PLAYING THE GAME, YOU ARE ACKNOWLEDGING YOUR AGREEMENT TO BE BOUND BY THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. \ No newline at end of file diff --git a/media-fonts/warframe-fonts/Manifest b/media-fonts/warframe-fonts/Manifest new file mode 100644 index 0000000000..579bd705ff --- /dev/null +++ b/media-fonts/warframe-fonts/Manifest @@ -0,0 +1,4 @@ +DIST Corpus.ttf 15884 BLAKE2B e37b3cf7038f6f4c1a2946fe5c531790c2e014964bebefd2d917f1263a1a53734415a88b0c80ad1ee1412a0b0a12bcf494d47b12699d5d82f700ff3a1431083a SHA512 1b65ec2c7e4edffa4bb46bc6f339cbd0189920aaff9b491bcadba1ee5b7096cb4ac73a680894f3e3bcd03c7769eeb0a1c38ac2c93ab882be5af58abef51531b4 +DIST CorpusBold.ttf 15804 BLAKE2B ca8fcf93fc07439b6b17099fafae626b7dde82b62730ace71bf532d8a26ba67d3b7851d3c199ef60ff9a534f4f29702244fa53511947f63d13c33d3286b680b0 SHA512 1f0fb5a5fffaf601b87149ffc22799613722a1b0d975f65b0e6721d1c68be356d231ca882cab570f772c811f0f943b10f41a13f49190e1b09fc4ab70f849c3fa +DIST Grineer.ttf 6004 BLAKE2B 76ef33aa4ee99250c643c4462df793584121578cac5ca286795329e28d0aaf49c038a2cec437fe6fbae0511cf61f1d084e37c98fad94c5cef8e8714bebb79dd4 SHA512 5fcfca89dee9894fece899e6bd3494195642e0bae8131dc3d308da21f107a8e48bb3dd9682298fe512be2d4cecebe2514faf17bd7bdf761912c157bd7dd6c014 +DIST Solaris.ttf 19772 BLAKE2B 89c3b2dad7588f0ce2eaaae5e11f4e5dd50ccb53d8b3a55debaa26bdf5a9fb5c8e9abc7dc4ea76b9fdd968a85f1b3b513a7152f68810a7f6d8d2f9ed60c4037c SHA512 50d14457e1213bdb41f42fa5ff092d4421dcadba48bdeb418c9e9718b77863b420aced9b89faee94d126351577195ec4210ab964861a48170143128189838295 diff --git a/media-fonts/warframe-fonts/metadata.xml b/media-fonts/warframe-fonts/metadata.xml new file mode 100644 index 0000000000..6c0bdfd682 --- /dev/null +++ b/media-fonts/warframe-fonts/metadata.xml @@ -0,0 +1,8 @@ + + + + + lssndrbarbieri@gmail.com + Alessandro Barbieri + + diff --git a/media-fonts/warframe-fonts/warframe-fonts-0_p20191111.ebuild b/media-fonts/warframe-fonts/warframe-fonts-0_p20191111.ebuild new file mode 100644 index 0000000000..80cb82f616 --- /dev/null +++ b/media-fonts/warframe-fonts/warframe-fonts-0_p20191111.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit font + +DESCRIPTION="Fonts from the Warframe game" +HOMEPAGE="https://www.warframe.com/news/warframe-fansite-kit" +SRC_URI=" + https://m.box.com/file/401032406918/download?shared_link=https%3A%2F%2Fdigitalextremesltd.app.box.com%2Fs%2Fvh2u41yhdlgp3girffucbynadoi33173 -> Corpus.ttf + https://m.box.com/file/401037009816/download?shared_link=https%3A%2F%2Fdigitalextremesltd.app.box.com%2Fs%2Fvh2u41yhdlgp3girffucbynadoi33173 -> CorpusBold.ttf + https://m.box.com/file/401042823306/download?shared_link=https%3A%2F%2Fdigitalextremesltd.app.box.com%2Fs%2Fvh2u41yhdlgp3girffucbynadoi33173 -> Grineer.ttf + https://m.box.com/file/302545392046/download?shared_link=https%3A%2F%2Fdigitalextremesltd.app.box.com%2Fs%2Fvh2u41yhdlgp3girffucbynadoi33173 -> Solaris.ttf +" +LICENSE="Warframe-EULA" +RESTRICT="mirror" +SLOT="0" +KEYWORDS="~amd64" +S="${DISTDIR}" +FONT_S="${S}" +FONT_SUFFIX="ttf" diff --git a/profiles/license_groups b/profiles/license_groups index 976b1bdc11..187502c26f 100644 --- a/profiles/license_groups +++ b/profiles/license_groups @@ -4,4 +4,4 @@ MISC-FREE Unicode_Fonts_for_Ancient_Scripts droidcam i3lock-color noweb FREE-SOFTWARE @FSF-APPROVED @OSI-APPROVED @MISC-FREE FREE @FREE-SOFTWARE DFSG @FREE lablgtk-examples meschach VOSTROM -EULA technic +EULA technic Warframe-EULA diff --git a/sci-physics/SU2/Manifest b/sci-physics/SU2/Manifest index 876649beb6..7b30d7cdac 100644 --- a/sci-physics/SU2/Manifest +++ b/sci-physics/SU2/Manifest @@ -4,3 +4,4 @@ DIST SU2-7.0.6.tar.gz 20531872 BLAKE2B 30e59bc6876223d87429b79f101a5705f989096a1 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.tar.gz 20554206 BLAKE2B ac291eeae696197f5875839defa98bde550c5250b5a5cff8049e0d1c8184c5ec6d225b77618d079a8fb3d5a7f4d0531a0b2931fd15e045299fa55c7dd03d9fd1 SHA512 26ed8c39d2dfcdb3fc4e1c986c64f683f44cd4123ce5f7a482c4557a82b04b4bd8ef1f04332ab36ad0f987cfb98053fb8b30ef81faf51c7c56aebc1a30467df9 diff --git a/sci-physics/SU2/SU2-7.0.8.ebuild b/sci-physics/SU2/SU2-7.0.8.ebuild new file mode 100644 index 0000000000..5356a05b69 --- /dev/null +++ b/sci-physics/SU2/SU2-7.0.8.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8,9} ) + +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/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 ) +" + +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 ${PN}-7.0.7-TestCases.tar.gz to /var/tmp/portage/sci-physics/${P}/work/${P}/TestCases" + tar -C "${P}"/TestCases --strip-components=1 -xzf "${DISTDIR}/${PN}-7.0.7-TestCases.tar.gz" || die + 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 + tar -C "${P}"/Tutorials --strip-components=1 -xzf "${DISTDIR}/${PN}-7.0.7-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/files/SU2-7.0.8-fix-env.patch b/sci-physics/SU2/files/SU2-7.0.8-fix-env.patch new file mode 100644 index 0000000000..baf7955d00 --- /dev/null +++ b/sci-physics/SU2/files/SU2-7.0.8-fix-env.patch @@ -0,0 +1,12 @@ +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.8-fix-python-optimize.patch b/sci-physics/SU2/files/SU2-7.0.8-fix-python-optimize.patch new file mode 100644 index 0000000000..64bff0a33f --- /dev/null +++ b/sci-physics/SU2/files/SU2-7.0.8-fix-python-optimize.patch @@ -0,0 +1,2212 @@ +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-fs/dwarfs/dwarfs-0.2.3-r2.ebuild b/sys-fs/dwarfs/dwarfs-0.2.3-r3.ebuild similarity index 92% rename from sys-fs/dwarfs/dwarfs-0.2.3-r2.ebuild rename to sys-fs/dwarfs/dwarfs-0.2.3-r3.ebuild index 050f388830..33378106cf 100644 --- a/sys-fs/dwarfs/dwarfs-0.2.3-r2.ebuild +++ b/sys-fs/dwarfs/dwarfs-0.2.3-r3.ebuild @@ -36,7 +36,8 @@ RDEPEND="dev-libs/boost[context,threads] sys-fs/fuse:3 sys-libs/binutils-libs sys-libs/zlib - sys-libs/libunwind" + sys-libs/libunwind + !dev-cpp/folly" BDEPEND="app-text/ronn dev-util/cmake sys-apps/sed @@ -47,6 +48,8 @@ CHECKREQS_DISK_BUILD="512M" DOCS=( "README.md" "CHANGES.md" "TODO" ) +CMAKE_IN_SOURCE_BUILD=true + src_unpack(){ default rm -d "${S}"/fbthrift/ @@ -69,6 +72,12 @@ src_prepare(){ cmake_src_prepare } +src_install(){ + default + dolib.so libmetadata_thrift.so libthrift_light.so + dolib.so folly/libfolly.so.0.58.0-dev folly/libfolly.so +} + pkg_postinst(){ elog "Test shows that dwarfs compiled with Clang is substantially faster than GCC ones" elog "See https://github.com/mhx/dwarfs/issues/14"