pybFoam 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pybfoam-0.1.0 → pybfoam-0.1.1}/.github/workflows/ci.yaml +1 -3
- pybfoam-0.1.1/.github/workflows/release.yaml +29 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/CMakeLists.txt +1 -1
- {pybfoam-0.1.0 → pybfoam-0.1.1}/PKG-INFO +1 -1
- {pybfoam-0.1.0 → pybfoam-0.1.1}/pyproject.toml +10 -9
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/CMakeLists.txt +1 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/__init__.py +1 -0
- pybfoam-0.1.1/src/pybFoam/_version.py +1 -0
- pybfoam-0.1.1/src/pybFoam/aggregation/CMakeLists.txt +43 -0
- pybfoam-0.1.1/src/pybFoam/aggregation/aggregation.cpp +31 -0
- pybfoam-0.1.1/src/pybFoam/aggregation/bind_aggregation.cpp +150 -0
- pybfoam-0.1.1/src/pybFoam/aggregation/bind_aggregation.hpp +51 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_fields.cpp +68 -0
- pybfoam-0.1.1/tests/pybind/test_aggregation.py +82 -0
- pybfoam-0.1.0/src/pybFoam/_version.py +0 -1
- {pybfoam-0.1.0 → pybfoam-0.1.1}/.gitignore +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/CHANGELOG.md +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/CMakePresets.json +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/LICENSE +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/README.md +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/cmake/Dependencies.cmake +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/cmake/FindOpenFOAM.cmake +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/conftest.py +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/404.md +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/LICENSE +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/LICENSE-BSD-NAVGOCO.txt +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_config.yml +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_data/alerts.yml +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_data/definitions.yml +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_data/glossary.yml +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_data/samplelist.yml +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_data/sidebars/doc_sidebar.yml +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_data/sidebars/home_sidebar.yml +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_data/strings.yml +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_data/terms.yml +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_data/topnav.yml +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/archive.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/callout.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/commento.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/custom/getting_started_series.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/custom/getting_started_series_next.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/custom/series_acme.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/custom/series_acme_next.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/custom/usermap.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/custom/usermapcomplex.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/feedback.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/footer.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/google_analytics.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/head.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/head_print.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/image.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/important.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/initialize_shuffle.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/inline_image.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/links.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/note.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/sidebar.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/taglogic.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/tip.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/toc.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/topnav.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/video.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_includes/warning.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_layouts/default.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_layouts/default_print.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_layouts/none.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_layouts/page.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_layouts/page_print.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/_layouts/post.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/createtag +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/css/bootstrap.min.css +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/css/boxshadowproperties.css +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/css/customstyles.css +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/css/font-awesome.min.css +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/css/fonts/FontAwesome.otf +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/css/fonts/fontawesome-webfont.eot +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/css/fonts/fontawesome-webfont.svg +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/css/fonts/fontawesome-webfont.ttf +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/css/fonts/fontawesome-webfont.woff +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/css/fonts/fontawesome-webfont.woff2 +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/css/modern-business.css +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/css/printstyles.css +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/css/syntax.css +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/css/theme-blue.css +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/css/theme-green.css +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/feed.xml +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/fonts/FontAwesome.otf +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/fonts/fontawesome-webfont.eot +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/fonts/fontawesome-webfont.svg +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/fonts/fontawesome-webfont.ttf +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/fonts/fontawesome-webfont.woff +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/fonts/glyphicons-halflings-regular.eot +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/fonts/glyphicons-halflings-regular.svg +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/fonts/glyphicons-halflings-regular.ttf +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/fonts/glyphicons-halflings-regular.woff +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/fonts/glyphicons-halflings-regular.woff2 +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/images/OFCaseStructure.png +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/images/dlr_logo.png +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/index.md +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/js/customscripts.js +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/js/jekyll-search.js +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/js/jquery.ba-throttle-debounce.min.js +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/js/jquery.navgoco.min.js +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/js/jquery.shuffle.min.js +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/js/toc.js +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/pages/doc/doc_OpenFOAM.md +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/pages/doc/doc_externalComm.md +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/pages/doc/doc_input.md +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/pages/doc/doc_installation.md +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/pages/doc/doc_introduction.md +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/pages/doc/doc_output.md +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/pages/doc/doc_python_wrapper.md +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/pages/doc/doc_release_notes_01.md +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/pdf/mydoc.pdf +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/pdf-doc.sh +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/pdfconfigs/config_doc_pdf.yml +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/pdfconfigs/prince-list.txt +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/pdfconfigs/titlepage.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/pdfconfigs/tocpage.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/search.json +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/sitemap.xml +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/tooltips.html +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/tooltips.json +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/update.sh +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/docs/var/build.sh +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/scripts/generate_stubs.py +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/scripts/pyInstall.sh +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/fvc/CMakeLists.txt +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/fvc/bind_fvc.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/fvc/bind_fvc.hpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/fvc/fvc.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/fvc.pyi +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/fvm/CMakeLists.txt +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/fvm/bind_fvm.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/fvm/bind_fvm.hpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/fvm/fvm.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/io/__init__.py +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/io/model_base.py +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/io/system.py +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/py.typed +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/CMakeLists.txt +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_cfdTools.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_cfdTools.hpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_control.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_control.hpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_dict.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_dict.hpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_dimensioned.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_dimensioned.hpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_fields.hpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_fvMatrix.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_fvMatrix.hpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_geo_fields.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_geo_fields.hpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_io.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_io.hpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_mesh.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_mesh.hpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_primitives.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/bind_primitives.hpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core/pybFoam.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/pybFoam_core.pyi +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/runTimeTables/CMakeLists.txt +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/runTimeTables/foam_runTimeTables.C +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/runTimeTables/foam_runTimeTables.H +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/runTimeTables/runTimeTables.C +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/runTimeTables.pyi +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/thermo/CMakeLists.txt +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/thermo/bind_thermo.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/thermo/bind_thermo.hpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/thermo/thermo.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/thermo.pyi +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/turbulence/CMakeLists.txt +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/turbulence/bind_turbulence.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/turbulence/bind_turbulence.hpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/turbulence/turbulence.cpp +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/src/pybFoam/turbulence.pyi +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/cavity/0.orig/U +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/cavity/0.orig/nu +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/cavity/0.orig/p +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/cavity/Allclean +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/cavity/Allrun +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/cavity/constant/transportProperties +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/cavity/icoFoam.py +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/cavity/log2 +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/cavity/system/PDRblockMeshDict +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/cavity/system/blockMeshDict +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/cavity/system/controlDict +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/cavity/system/decomposeParDict +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/cavity/system/fvSchemes +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/cavity/system/fvSolution +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/elbow/0.orig/U +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/elbow/0.orig/nu +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/elbow/0.orig/p +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/elbow/Allclean +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/elbow/Allrun +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/elbow/constant/transportProperties +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/elbow/icoFoam.py +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/elbow/system/controlDict +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/elbow/system/foamDataToFluentDict +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/elbow/system/fvSchemes +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/elbow/system/fvSolution +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/io/TestDict +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/io/TestDict.json +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/io/TestDict.yaml +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/io/controlDict +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/io/fvSchemes +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/io/fvSolution +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/io/test_controlDict.py +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/io/test_fvSchemes.py +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/io/test_fvSolution.py +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/io/test_parse_ofdict.py +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/0/U +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/0/alpha.water +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/0/p_rgh +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/0.orig/U +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/0.orig/alpha.water +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/0.orig/p_rgh +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/Allclean +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/Allrun +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/Allrun-parallel +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/constant/dynamicMeshDict +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/constant/g +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/constant/polyMesh/boundary +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/constant/polyMesh/faces +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/constant/polyMesh/neighbour +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/constant/polyMesh/owner +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/constant/polyMesh/points +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/constant/transportProperties +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/constant/turbulenceProperties +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/system/TestDict +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/system/blockMeshDict +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/system/controlDict +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/system/decomposeParDict +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/system/fvSchemes +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/system/fvSolution +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/system/setFieldsDict +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/test_dict.py +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/test_fvc.py +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/test_fvm.py +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/test_geoFields.py +0 -0
- {pybfoam-0.1.0 → pybfoam-0.1.1}/tests/pybind/test_primitives.py +0 -0
|
@@ -28,11 +28,9 @@ jobs:
|
|
|
28
28
|
- name: Install build dependencies
|
|
29
29
|
run: |
|
|
30
30
|
python -m pip install --upgrade pip
|
|
31
|
-
pip install scikit-build-core[pyproject] pybind11 cmake numpy pydantic pyyaml
|
|
32
|
-
pip install .[dev]
|
|
33
31
|
- name: Build package
|
|
34
32
|
run: |
|
|
35
|
-
pip install .
|
|
33
|
+
pip install .[dev]
|
|
36
34
|
- name: Run tests
|
|
37
35
|
run: |
|
|
38
36
|
pytest
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-24.04
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v5
|
|
13
|
+
- name: Set up Python
|
|
14
|
+
uses: actions/setup-python@v5
|
|
15
|
+
with:
|
|
16
|
+
python-version: '3.11'
|
|
17
|
+
- name: Install build and twine
|
|
18
|
+
run: |
|
|
19
|
+
python -m pip install --upgrade pip
|
|
20
|
+
pip install build twine
|
|
21
|
+
- name: Build sdist
|
|
22
|
+
run: |
|
|
23
|
+
python -m build --sdist
|
|
24
|
+
- name: Publish to PyPI
|
|
25
|
+
env:
|
|
26
|
+
TWINE_USERNAME: __token__
|
|
27
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_PYBFOAM_API_TOKEN }}
|
|
28
|
+
run: |
|
|
29
|
+
twine upload dist/*
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = [
|
|
3
|
-
"scikit-build-core[pyproject]>=0.4.3",
|
|
4
|
-
"pybind11>=2.6.0",
|
|
5
|
-
"cmake>=3.18",
|
|
6
|
-
]
|
|
7
|
-
build-backend = "scikit_build_core.build"
|
|
8
|
-
|
|
9
1
|
[project]
|
|
10
2
|
name = "pybFoam"
|
|
11
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.1"
|
|
12
4
|
authors = [
|
|
13
5
|
{name = "Henning Scheufler", email = "henning.scheufler@dlr.de"},
|
|
14
6
|
]
|
|
@@ -68,6 +60,15 @@ Issues = "https://github.com/DLR-RY/pybFoam/issues"
|
|
|
68
60
|
include-package-data = true
|
|
69
61
|
zip-safe = false
|
|
70
62
|
|
|
63
|
+
[build-system]
|
|
64
|
+
requires = [
|
|
65
|
+
"scikit-build-core[pyproject]>=0.4.3",
|
|
66
|
+
"pybind11>=2.6.0",
|
|
67
|
+
"cmake>=3.18",
|
|
68
|
+
]
|
|
69
|
+
build-backend = "scikit_build_core.build"
|
|
70
|
+
|
|
71
|
+
|
|
71
72
|
[tool.scikit-build]
|
|
72
73
|
cmake.version = ">=3.18"
|
|
73
74
|
cmake.build-type = "Release"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.1"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# thermo module CMakeLists.txt
|
|
2
|
+
|
|
3
|
+
set(THERMO_SOURCES
|
|
4
|
+
bind_aggregation.cpp
|
|
5
|
+
aggregation.cpp
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
set(THERMO_HEADERS
|
|
9
|
+
bind_aggregation.hpp
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
# Create the pybind11 module
|
|
13
|
+
pybind11_add_module(aggregation ${THERMO_SOURCES})
|
|
14
|
+
|
|
15
|
+
# Set target properties
|
|
16
|
+
set_target_properties(aggregation PROPERTIES
|
|
17
|
+
CXX_VISIBILITY_PRESET "hidden"
|
|
18
|
+
VISIBILITY_INLINES_HIDDEN ON
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
# Link OpenFOAM libraries
|
|
22
|
+
target_link_libraries(aggregation PRIVATE
|
|
23
|
+
OpenFOAM::finiteVolume
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
# Add include directories specific to this module
|
|
27
|
+
target_include_directories(aggregation PRIVATE
|
|
28
|
+
${CMAKE_CURRENT_SOURCE_DIR}
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
# Install the module
|
|
32
|
+
if(DEFINED SKBUILD)
|
|
33
|
+
# scikit-build-core manages the installation
|
|
34
|
+
install(TARGETS aggregation
|
|
35
|
+
LIBRARY DESTINATION pybFoam
|
|
36
|
+
COMPONENT python
|
|
37
|
+
)
|
|
38
|
+
else()
|
|
39
|
+
# Standalone build - install to Python site-packages
|
|
40
|
+
install(TARGETS aggregation
|
|
41
|
+
LIBRARY DESTINATION "${Python_SITELIB}/pybFoam"
|
|
42
|
+
)
|
|
43
|
+
endif()
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------*\
|
|
2
|
+
Copyright (c) 2021, German Aerospace Center (DLR)
|
|
3
|
+
-------------------------------------------------------------------------------
|
|
4
|
+
License
|
|
5
|
+
This file is part of the pybFoam source code library, which is an
|
|
6
|
+
unofficial extension to OpenFOAM.
|
|
7
|
+
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
8
|
+
under the terms of the GNU General Public License as published by
|
|
9
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
(at your option) any later version.
|
|
11
|
+
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
12
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13
|
+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14
|
+
for more details.
|
|
15
|
+
You should have received a copy of the GNU General Public License
|
|
16
|
+
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
\*---------------------------------------------------------------------------*/
|
|
19
|
+
|
|
20
|
+
#include <pybind11/pybind11.h>
|
|
21
|
+
|
|
22
|
+
#include "bind_aggregation.hpp"
|
|
23
|
+
|
|
24
|
+
namespace py = pybind11;
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
PYBIND11_MODULE(aggregation, aggregation) {
|
|
28
|
+
aggregation.doc() = "openfoam aggregation package"; // optional module docstring
|
|
29
|
+
|
|
30
|
+
Foam::bindAggregation(aggregation);
|
|
31
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------*\
|
|
2
|
+
Copyright (c) 20212, Henning Scheufler
|
|
3
|
+
-------------------------------------------------------------------------------
|
|
4
|
+
License
|
|
5
|
+
This file is part of the pybFoam source code library, which is an
|
|
6
|
+
unofficial extension to OpenFOAM.
|
|
7
|
+
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
8
|
+
under the terms of the GNU General Public License as published by
|
|
9
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
(at your option) any later version.
|
|
11
|
+
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
12
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13
|
+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14
|
+
for more details.
|
|
15
|
+
You should have received a copy of the GNU General Public License
|
|
16
|
+
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
\*---------------------------------------------------------------------------*/
|
|
19
|
+
|
|
20
|
+
#include "bind_aggregation.hpp"
|
|
21
|
+
|
|
22
|
+
namespace py = pybind11;
|
|
23
|
+
|
|
24
|
+
template <class Type>
|
|
25
|
+
struct aggregationResult
|
|
26
|
+
{
|
|
27
|
+
Foam::Field<Type> values;
|
|
28
|
+
std::optional<Foam::labelList> group = std::nullopt;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
template <typename T>
|
|
32
|
+
aggregationResult<T> aggSum(
|
|
33
|
+
const Foam::Field<T> &values,
|
|
34
|
+
std::optional<Foam::boolList> mask = std::nullopt,
|
|
35
|
+
std::optional<Foam::labelList> group = std::nullopt)
|
|
36
|
+
{
|
|
37
|
+
aggregationResult<T> result;
|
|
38
|
+
auto nGroups = group ? max(*group) + 1 : 1;
|
|
39
|
+
result.values = Foam::Field<T>(nGroups, Foam::Zero);
|
|
40
|
+
|
|
41
|
+
const Foam::label nElements = values.size();
|
|
42
|
+
|
|
43
|
+
for (Foam::label i = 0; i < nElements; ++i)
|
|
44
|
+
{
|
|
45
|
+
Foam::label groupIndex = group ? (*group)[i] : 0;
|
|
46
|
+
Foam::scalar scale = mask ? (*mask)[i] : 1.0;
|
|
47
|
+
result.values[groupIndex] += values[i] * scale;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
Foam::reduce(result.values, Foam::sumOp<Foam::Field<T>>());
|
|
51
|
+
|
|
52
|
+
return result;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
template <typename T>
|
|
56
|
+
aggregationResult<T> aggMax(
|
|
57
|
+
const Foam::Field<T> &values,
|
|
58
|
+
std::optional<Foam::boolList> mask = std::nullopt,
|
|
59
|
+
std::optional<Foam::labelList> group = std::nullopt)
|
|
60
|
+
{
|
|
61
|
+
aggregationResult<T> result;
|
|
62
|
+
auto nGroups = group ? max(*group) + 1 : 1;
|
|
63
|
+
if constexpr (std::is_same<T, Foam::scalar>::value)
|
|
64
|
+
{
|
|
65
|
+
result.values = Foam::Field<T>(nGroups, -Foam::GREAT);
|
|
66
|
+
}
|
|
67
|
+
else
|
|
68
|
+
{
|
|
69
|
+
result.values = Foam::Field<T>(nGroups, T::one * -Foam::GREAT);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const Foam::label nElements = values.size();
|
|
73
|
+
|
|
74
|
+
for (Foam::label i = 0; i < nElements; ++i)
|
|
75
|
+
{
|
|
76
|
+
Foam::label groupIndex = group ? (*group)[i] : 0;
|
|
77
|
+
if (mask)
|
|
78
|
+
{
|
|
79
|
+
if (!(*mask)[i]) // if mask is false, skip
|
|
80
|
+
{
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
result.values[groupIndex] = Foam::max(result.values[groupIndex], values[i]);
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
Foam::reduce(result.values, Foam::maxOp<Foam::Field<T>>());
|
|
89
|
+
|
|
90
|
+
return result;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
template <typename T>
|
|
94
|
+
aggregationResult<T> aggMin(
|
|
95
|
+
const Foam::Field<T> &values,
|
|
96
|
+
std::optional<Foam::boolList> mask = std::nullopt,
|
|
97
|
+
std::optional<Foam::labelList> group = std::nullopt)
|
|
98
|
+
{
|
|
99
|
+
aggregationResult<T> result;
|
|
100
|
+
auto nGroups = group ? max(*group) + 1 : 1;
|
|
101
|
+
|
|
102
|
+
if constexpr (std::is_same<T, Foam::scalar>::value)
|
|
103
|
+
{
|
|
104
|
+
result.values = Foam::Field<T>(nGroups, Foam::GREAT);
|
|
105
|
+
}
|
|
106
|
+
else
|
|
107
|
+
{
|
|
108
|
+
result.values = Foam::Field<T>(nGroups, T::one * Foam::GREAT);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const Foam::label nElements = values.size();
|
|
112
|
+
|
|
113
|
+
for (Foam::label i = 0; i < nElements; ++i)
|
|
114
|
+
{
|
|
115
|
+
Foam::label groupIndex = group ? (*group)[i] : 0;
|
|
116
|
+
if (mask)
|
|
117
|
+
{
|
|
118
|
+
if (!(*mask)[i]) // if mask is false, skip
|
|
119
|
+
{
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
result.values[groupIndex] = Foam::min(result.values[groupIndex], values[i]);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
Foam::reduce(result.values, Foam::minOp<Foam::Field<T>>());
|
|
127
|
+
|
|
128
|
+
return result;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
void Foam::bindAggregation(py::module &m)
|
|
132
|
+
{
|
|
133
|
+
|
|
134
|
+
py::class_<aggregationResult<scalar>>(m, "scalarAggregationResult")
|
|
135
|
+
.def_readonly("values", &aggregationResult<scalar>::values)
|
|
136
|
+
.def_readonly("group", &aggregationResult<scalar>::group);
|
|
137
|
+
|
|
138
|
+
py::class_<aggregationResult<vector>>(m, "vectorAggregationResult")
|
|
139
|
+
.def_readonly("values", &aggregationResult<vector>::values)
|
|
140
|
+
.def_readonly("group", &aggregationResult<vector>::group);
|
|
141
|
+
|
|
142
|
+
m.def("sum", &aggSum<scalar>);
|
|
143
|
+
m.def("sum", &aggSum<vector>);
|
|
144
|
+
|
|
145
|
+
m.def("max", &aggMax<scalar>);
|
|
146
|
+
m.def("max", &aggMax<vector>);
|
|
147
|
+
|
|
148
|
+
m.def("min", &aggMin<scalar>);
|
|
149
|
+
m.def("min", &aggMin<vector>);
|
|
150
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------*\
|
|
2
|
+
Copyright (c) 2022, Henning Scheufler
|
|
3
|
+
-------------------------------------------------------------------------------
|
|
4
|
+
License
|
|
5
|
+
This file is part of the pybFoam source code library, which is an
|
|
6
|
+
unofficial extension to OpenFOAM.
|
|
7
|
+
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
8
|
+
under the terms of the GNU General Public License as published by
|
|
9
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
(at your option) any later version.
|
|
11
|
+
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
12
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13
|
+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14
|
+
for more details.
|
|
15
|
+
You should have received a copy of the GNU General Public License
|
|
16
|
+
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
Class
|
|
19
|
+
Foam::pyInterp
|
|
20
|
+
|
|
21
|
+
Description
|
|
22
|
+
|
|
23
|
+
Author
|
|
24
|
+
Henning Scheufler, all rights reserved.
|
|
25
|
+
|
|
26
|
+
SourceFiles
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
\*---------------------------------------------------------------------------*/
|
|
30
|
+
|
|
31
|
+
#ifndef bind_thermo
|
|
32
|
+
#define bind_thermo
|
|
33
|
+
|
|
34
|
+
// System includes
|
|
35
|
+
#include <pybind11/pybind11.h>
|
|
36
|
+
#include "Field.H"
|
|
37
|
+
#include "scalar.H"
|
|
38
|
+
#include <pybind11/stl.h>
|
|
39
|
+
#include <pybind11/numpy.h>
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
namespace py = pybind11;
|
|
43
|
+
|
|
44
|
+
namespace Foam
|
|
45
|
+
{
|
|
46
|
+
|
|
47
|
+
void bindAggregation(py::module& m);
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
#endif
|
|
@@ -161,6 +161,72 @@ void Foam::bindFields(py::module& m)
|
|
|
161
161
|
})
|
|
162
162
|
;
|
|
163
163
|
|
|
164
|
+
py::class_<List<bool>>(m, "boolList")
|
|
165
|
+
.def(py::init<List<bool> > ())
|
|
166
|
+
.def(py::init([](std::vector<bool> vec) {
|
|
167
|
+
List<bool> f(vec.size());
|
|
168
|
+
forAll(f,i)
|
|
169
|
+
{
|
|
170
|
+
f[i] = vec[i];
|
|
171
|
+
}
|
|
172
|
+
return f;
|
|
173
|
+
}))
|
|
174
|
+
.def("__len__", [](const List<bool>& self) {
|
|
175
|
+
return self.size();
|
|
176
|
+
})
|
|
177
|
+
.def("__getitem__", [](const List<bool>& self, const label idx) {
|
|
178
|
+
if (idx >= self.size())
|
|
179
|
+
{
|
|
180
|
+
throw py::index_error();
|
|
181
|
+
}
|
|
182
|
+
return self[idx];
|
|
183
|
+
})
|
|
184
|
+
.def("__setitem__", [](List<bool>& self, const label idx,const bool& s) {
|
|
185
|
+
self[idx] = s;
|
|
186
|
+
})
|
|
187
|
+
.def("list",[](List<bool>& self){
|
|
188
|
+
std::vector<bool> l_out(self.size());
|
|
189
|
+
forAll(self,i)
|
|
190
|
+
{
|
|
191
|
+
l_out[i] = self[i];
|
|
192
|
+
}
|
|
193
|
+
return l_out;
|
|
194
|
+
})
|
|
195
|
+
;
|
|
196
|
+
|
|
197
|
+
py::class_<List<label>>(m, "labelList")
|
|
198
|
+
.def(py::init<List<label> > ())
|
|
199
|
+
.def(py::init([](std::vector<label> vec) {
|
|
200
|
+
List<label> f(vec.size());
|
|
201
|
+
forAll(f,i)
|
|
202
|
+
{
|
|
203
|
+
f[i] = vec[i];
|
|
204
|
+
}
|
|
205
|
+
return f;
|
|
206
|
+
}))
|
|
207
|
+
.def("__len__", [](const List<label>& self) {
|
|
208
|
+
return self.size();
|
|
209
|
+
})
|
|
210
|
+
.def("__getitem__", [](const List<label>& self, const label idx) {
|
|
211
|
+
if (idx >= self.size())
|
|
212
|
+
{
|
|
213
|
+
throw py::index_error();
|
|
214
|
+
}
|
|
215
|
+
return self[idx];
|
|
216
|
+
})
|
|
217
|
+
.def("__setitem__", [](List<label>& self, const label idx,const label& s) {
|
|
218
|
+
self[idx] = s;
|
|
219
|
+
})
|
|
220
|
+
.def("list",[](List<label>& self){
|
|
221
|
+
std::vector<label> l_out(self.size());
|
|
222
|
+
forAll(self,i)
|
|
223
|
+
{
|
|
224
|
+
l_out[i] = self[i];
|
|
225
|
+
}
|
|
226
|
+
return l_out;
|
|
227
|
+
})
|
|
228
|
+
;
|
|
229
|
+
|
|
164
230
|
py::class_<List<word>>(m, "wordList")
|
|
165
231
|
.def(py::init<List<word> > ())
|
|
166
232
|
.def(py::init([](std::vector<std::string> vec) {
|
|
@@ -235,6 +301,8 @@ void Foam::bindFields(py::module& m)
|
|
|
235
301
|
|
|
236
302
|
|
|
237
303
|
|
|
304
|
+
|
|
305
|
+
|
|
238
306
|
m.def("sum",declare_sum<scalar>);
|
|
239
307
|
m.def("sum",declare_sum<vector>);
|
|
240
308
|
m.def("sum",declare_sum<tensor>);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
from pybFoam import vector, boolList, labelList, mag, scalarField, vectorField, tensorField
|
|
3
|
+
from pybFoam import aggregation
|
|
4
|
+
import numpy as np
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def test_mag():
|
|
8
|
+
s = -10
|
|
9
|
+
assert mag(s) == 10
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def test_sum():
|
|
13
|
+
field = scalarField([1, 2, 3])
|
|
14
|
+
assert aggregation.sum(field, boolList([True, True, True]), None).values[0] == 6
|
|
15
|
+
assert aggregation.sum(field, None, None).values[0] == 6
|
|
16
|
+
assert aggregation.sum(field, boolList([True, False, True]), None).values[0] == 4
|
|
17
|
+
|
|
18
|
+
field = vectorField([vector(1, 2, 3), vector(4, 5, 6)])
|
|
19
|
+
assert aggregation.sum(field, None, None).values[0] == vector(5, 7, 9)
|
|
20
|
+
assert aggregation.sum(field, boolList([True, True]), None).values[0] == vector(
|
|
21
|
+
5, 7, 9
|
|
22
|
+
)
|
|
23
|
+
assert aggregation.sum(field, boolList([True, False]), None).values[0] == vector(
|
|
24
|
+
1, 2, 3
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
# # with groupby
|
|
28
|
+
field = scalarField([1, 2, 3])
|
|
29
|
+
assert aggregation.sum(field, None, labelList([0, 1, 1])).values[0] == 1
|
|
30
|
+
assert aggregation.sum(field, None, labelList([0, 1, 1])).values[1] == 5
|
|
31
|
+
|
|
32
|
+
assert aggregation.sum(field, boolList([True, False, True]), labelList([0, 1, 1])).values[0] == 1
|
|
33
|
+
assert aggregation.sum(field, boolList([True, False, True]), labelList([0, 1, 1])).values[1] == 3
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def test_min():
|
|
37
|
+
|
|
38
|
+
field = scalarField([1, 2, 3])
|
|
39
|
+
assert aggregation.min(field, None, None).values[0] == 1
|
|
40
|
+
assert aggregation.min(field, boolList([True, True, True]), None).values[0] == 1
|
|
41
|
+
assert aggregation.min(field, boolList([True, False, True]), None).values[0] == 1
|
|
42
|
+
|
|
43
|
+
field = vectorField([vector(1, 2, 3), vector(4, 5, 6)])
|
|
44
|
+
assert aggregation.min(field, None, None).values[0] == vector(1, 2, 3)
|
|
45
|
+
assert aggregation.min(field, boolList([True, True]), None).values[0] == vector(
|
|
46
|
+
1, 2, 3
|
|
47
|
+
)
|
|
48
|
+
assert aggregation.min(field, boolList([True, False]), None).values[0] == vector(
|
|
49
|
+
1, 2, 3
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
# # with groupby
|
|
53
|
+
field = scalarField([1, 2, 3])
|
|
54
|
+
assert aggregation.min(field, None, labelList([0, 1, 1])).values[0] == 1
|
|
55
|
+
assert aggregation.min(field, None, labelList([0, 1, 1])).values[1] == 2
|
|
56
|
+
|
|
57
|
+
assert aggregation.min(field, boolList([True, False, True]), labelList([0, 1, 1])).values[0] == 1
|
|
58
|
+
assert aggregation.min(field, boolList([True, False, True]), labelList([0, 1, 1])).values[1] == 3
|
|
59
|
+
|
|
60
|
+
def test_max():
|
|
61
|
+
|
|
62
|
+
field = scalarField([1, 2, 3])
|
|
63
|
+
assert aggregation.max(field, None, None).values[0] == 3
|
|
64
|
+
assert aggregation.max(field, boolList([True, True, True]), None).values[0] == 3
|
|
65
|
+
assert aggregation.max(field, boolList([True, False, True]), None).values[0] == 3
|
|
66
|
+
|
|
67
|
+
field = vectorField([vector(1, 2, 3), vector(4, 5, 6)])
|
|
68
|
+
assert aggregation.max(field, None, None).values[0] == vector(4, 5, 6)
|
|
69
|
+
assert aggregation.max(field, boolList([True, True]), None).values[0] == vector(
|
|
70
|
+
4, 5, 6
|
|
71
|
+
)
|
|
72
|
+
assert aggregation.max(field, boolList([True, False]), None).values[0] == vector(
|
|
73
|
+
1, 2, 3
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# # with groupby
|
|
77
|
+
field = scalarField([1, 2, 3])
|
|
78
|
+
assert aggregation.max(field, None, labelList([0, 1, 1])).values[0] == 1
|
|
79
|
+
assert aggregation.max(field, None, labelList([0, 1, 1])).values[1] == 3
|
|
80
|
+
|
|
81
|
+
assert aggregation.max(field, boolList([True, False, True]), labelList([0, 1, 1])).values[0] == 1
|
|
82
|
+
assert aggregation.max(field, boolList([True, False, True]), labelList([0, 1, 1])).values[1] == 3
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|