pybFoam 0.1.9__tar.gz → 0.1.11__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.9 → pybfoam-0.1.11}/.github/workflows/ci.yaml +29 -2
- {pybfoam-0.1.9 → pybfoam-0.1.11}/.gitignore +7 -1
- pybfoam-0.1.11/.pre-commit-config.yaml +36 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/CHANGELOG.md +8 -1
- {pybfoam-0.1.9 → pybfoam-0.1.11}/CMakeLists.txt +1 -1
- pybfoam-0.1.11/CMakePresets.json +143 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/PKG-INFO +38 -18
- {pybfoam-0.1.9 → pybfoam-0.1.11}/README.md +30 -12
- {pybfoam-0.1.9 → pybfoam-0.1.11}/benchmark/benchmark_expression_complex.py +70 -33
- {pybfoam-0.1.9 → pybfoam-0.1.11}/benchmark/benchmark_expression_vec_add.py +49 -19
- {pybfoam-0.1.9 → pybfoam-0.1.11}/benchmark/benchmark_expression_vec_add_4.py +51 -20
- {pybfoam-0.1.9 → pybfoam-0.1.11}/cmake/Dependencies.cmake +1 -25
- {pybfoam-0.1.9 → pybfoam-0.1.11}/cmake/FindOpenFOAM.cmake +32 -32
- pybfoam-0.1.11/conftest.py +10 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/docs/conf.py +1 -1
- pybfoam-0.1.11/examples/case/read_dict.py +16 -0
- pybfoam-0.1.11/examples/case/read_fields.py +19 -0
- pybfoam-0.1.11/examples/fields_and_numpy.py +28 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/pyproject.toml +40 -9
- pybfoam-0.1.11/scripts/clean_stubs.py +160 -0
- pybfoam-0.1.11/scripts/generate_stubs.sh +88 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/CMakeLists.txt +2 -1
- pybfoam-0.1.11/src/pybFoam/__init__.py +242 -0
- pybfoam-0.1.11/src/pybFoam/__init__.pyi +121 -0
- pybfoam-0.1.11/src/pybFoam/_version.py +1 -0
- pybfoam-0.1.11/src/pybFoam/_version.pyi +4 -0
- pybfoam-0.1.9/src/pybFoam/fvc.pyi → pybfoam-0.1.11/src/pybFoam/fvc/__init__.pyi +81 -55
- pybfoam-0.1.11/src/pybFoam/fvc/bind_fvc.cpp +197 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/fvc/bind_fvc.hpp +1 -1
- pybfoam-0.1.11/src/pybFoam/fvc/fvc.pyi +433 -0
- pybfoam-0.1.11/src/pybFoam/fvm/__init__.pyi +220 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/fvm/bind_fvm.cpp +10 -10
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/fvm/bind_fvm.hpp +1 -1
- pybfoam-0.1.11/src/pybFoam/fvm/fvm.pyi +292 -0
- pybfoam-0.1.11/src/pybFoam/io/__init__.py +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/io/model_base.py +25 -23
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/io/system.py +22 -5
- pybfoam-0.1.11/src/pybFoam/meshing/CMakeLists.txt +104 -0
- pybfoam-0.1.11/src/pybFoam/meshing/__init__.pyi +83 -0
- pybfoam-0.1.11/src/pybFoam/meshing/bind_blockmesh.cpp +226 -0
- pybfoam-0.1.11/src/pybFoam/meshing/bind_blockmesh.hpp +63 -0
- pybfoam-0.1.11/src/pybFoam/meshing/bind_checkmesh.cpp +652 -0
- pybfoam-0.1.11/src/pybFoam/meshing/bind_checkmesh.hpp +32 -0
- pybfoam-0.1.11/src/pybFoam/meshing/bind_snappy.cpp +510 -0
- pybfoam-0.1.11/src/pybFoam/meshing/bind_snappy.hpp +43 -0
- pybfoam-0.1.11/src/pybFoam/meshing/mesh_generation.C +49 -0
- pybfoam-0.1.11/src/pybFoam/meshing/mesh_utils.C +112 -0
- pybfoam-0.1.11/src/pybFoam/meshing/mesh_utils.H +85 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/CMakeLists.txt +6 -2
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_cfdTools.cpp +3 -3
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_cfdTools.hpp +1 -1
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_control.cpp +0 -2
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_control.hpp +1 -1
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_dict.cpp +103 -124
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_dict.hpp +2 -2
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_dimensioned.cpp +28 -19
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_dimensioned.hpp +1 -1
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_fields.cpp +153 -21
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_fields.hpp +4 -1
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_fvMatrix.cpp +3 -1
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_fvMatrix.hpp +1 -1
- pybfoam-0.1.11/src/pybFoam/pybFoam_core/bind_fvmesh.cpp +189 -0
- pybfoam-0.1.11/src/pybFoam/pybFoam_core/bind_fvmesh.hpp +51 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_geo_fields.cpp +31 -30
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_geo_fields.hpp +4 -4
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_io.cpp +1 -1
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_io.hpp +1 -1
- pybfoam-0.1.11/src/pybFoam/pybFoam_core/bind_polymesh.cpp +269 -0
- pybfoam-0.1.11/src/pybFoam/pybFoam_core/bind_polymesh.hpp +77 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_primitives.cpp +93 -14
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/bind_primitives.hpp +1 -1
- pybfoam-0.1.9/src/pybFoam/pybFoam_core/bind_mesh.cpp → pybfoam-0.1.11/src/pybFoam/pybFoam_core/bind_time.cpp +4 -76
- pybfoam-0.1.9/src/pybFoam/pybFoam_core/bind_mesh.hpp → pybfoam-0.1.11/src/pybFoam/pybFoam_core/bind_time.hpp +17 -19
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/pybFoam_core/pybFoam.cpp +6 -2
- pybfoam-0.1.11/src/pybFoam/pybFoam_core.pyi +2987 -0
- pybfoam-0.1.9/src/pybFoam/runTimeTables.pyi → pybfoam-0.1.11/src/pybFoam/runTimeTables/__init__.pyi +2 -1
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/runTimeTables/foam_runTimeTables.C +2 -2
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/runTimeTables/foam_runTimeTables.H +2 -2
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/runTimeTables/runTimeTables.C +1 -1
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/sampling/CMakeLists.txt +8 -8
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/sampling/__init__.py +22 -24
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/sampling/bind_sampling.cpp +49 -49
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/sampling/sampling.cpp +2 -2
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/sampling/set_configs.py +86 -71
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/sampling/surface_configs.py +56 -30
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/sampling/utils.py +19 -14
- pybfoam-0.1.11/src/pybFoam/sampling_bindings.pyi +191 -0
- pybfoam-0.1.11/src/pybFoam/thermo/__init__.pyi +38 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/thermo/bind_thermo.hpp +1 -1
- pybfoam-0.1.11/src/pybFoam/turbulence/__init__.pyi +144 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/turbulence/bind_turbulence.cpp +5 -5
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/cavity/icoFoam.py +31 -15
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/cavity/system/fvSolution +2 -2
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/elbow/icoFoam.py +31 -15
- pybfoam-0.1.11/tests/io/TestDict.json +69 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/io/test_controlDict.py +11 -11
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/io/test_fvSchemes.py +20 -13
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/io/test_fvSolution.py +6 -4
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/io/test_parse_ofdict.py +32 -29
- pybfoam-0.1.11/tests/meshing/__init__.py +0 -0
- pybfoam-0.1.11/tests/meshing/conftest.py +219 -0
- pybfoam-0.1.11/tests/meshing/cube/0/U +41 -0
- pybfoam-0.1.11/tests/meshing/cube/0/p +40 -0
- pybfoam-0.1.11/tests/meshing/cube/constant/transportProperties +20 -0
- pybfoam-0.1.11/tests/meshing/cube/log.checkmesh +109 -0
- pybfoam-0.1.11/tests/meshing/cube/system/PDRblockMeshDict +61 -0
- pybfoam-0.1.11/tests/meshing/cube/system/blockMeshDict +72 -0
- pybfoam-0.1.11/tests/meshing/cube/system/controlDict +48 -0
- pybfoam-0.1.11/tests/meshing/cube/system/decomposeParDict +27 -0
- pybfoam-0.1.11/tests/meshing/cube/system/fvSchemes +50 -0
- pybfoam-0.1.11/tests/meshing/cube/system/fvSolution +51 -0
- pybfoam-0.1.11/tests/meshing/motorBike/0.orig/U +51 -0
- pybfoam-0.1.11/tests/meshing/motorBike/0.orig/include/fixedInlet +15 -0
- pybfoam-0.1.11/tests/meshing/motorBike/0.orig/include/frontBackUpperPatches +19 -0
- pybfoam-0.1.11/tests/meshing/motorBike/0.orig/include/initialConditions +14 -0
- pybfoam-0.1.11/tests/meshing/motorBike/0.orig/k +53 -0
- pybfoam-0.1.11/tests/meshing/motorBike/0.orig/nut +63 -0
- pybfoam-0.1.11/tests/meshing/motorBike/0.orig/omega +52 -0
- pybfoam-0.1.11/tests/meshing/motorBike/0.orig/p +52 -0
- pybfoam-0.1.11/tests/meshing/motorBike/Allclean +8 -0
- pybfoam-0.1.11/tests/meshing/motorBike/Allrun +54 -0
- pybfoam-0.1.11/tests/meshing/motorBike/Allrun.pre +19 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/extendedFeatureEdgeMesh/motorBike.extendedFeatureEdgeMesh +0 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/extendedFeatureEdgeMesh/motorBike_concaveFeaturePts.obj +509 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/extendedFeatureEdgeMesh/motorBike_convexFeaturePts.obj +586 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/extendedFeatureEdgeMesh/motorBike_edgeDirections.obj +62601 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/extendedFeatureEdgeMesh/motorBike_edgeMesh.obj +41543 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/extendedFeatureEdgeMesh/motorBike_externalEdges.obj +21516 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/extendedFeatureEdgeMesh/motorBike_flatEdges.obj +285 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/extendedFeatureEdgeMesh/motorBike_internalEdges.obj +32742 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/extendedFeatureEdgeMesh/motorBike_mixedFeaturePts.obj +1197 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/extendedFeatureEdgeMesh/motorBike_mixedFeaturePtsStructure.obj +10560 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/extendedFeatureEdgeMesh/motorBike_multipleEdges.obj +7911 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/extendedFeatureEdgeMesh/motorBike_openEdges.obj +147 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/extendedFeatureEdgeMesh/motorBike_regionEdges.obj +26034 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/transportProperties +22 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/triSurface/motorBike.eMesh +0 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/triSurface/motorBike.obj.gz +0 -0
- pybfoam-0.1.11/tests/meshing/motorBike/constant/turbulenceProperties +29 -0
- pybfoam-0.1.11/tests/meshing/motorBike/std_log.txt +3618 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/blockMeshDict +86 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/controlDict +57 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/cuttingPlane +33 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/decomposeParDict-random +22 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/decomposeParDict.6 +27 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/ensightWrite +23 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/finite-area/faMeshDefinition +30 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/finite-area/faSchemes +32 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/finite-area/faSolution +19 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/forceCoeffs +54 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/fvSchemes +62 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/fvSolution +87 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/meshQualityDict +24 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/profiling +9 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/snappyHexMeshDict +326 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/streamLines +55 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/surfaceFeatureExtractDict +45 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/topoSetDict +31 -0
- pybfoam-0.1.11/tests/meshing/motorBike/system/wallBoundedStreamLines +95 -0
- pybfoam-0.1.11/tests/meshing/sphere_simple/Allclean +8 -0
- pybfoam-0.1.11/tests/meshing/sphere_simple/Allrun +12 -0
- pybfoam-0.1.11/tests/meshing/sphere_simple/Allrun.pre +12 -0
- pybfoam-0.1.11/tests/meshing/sphere_simple/sphere_simple.foam +0 -0
- pybfoam-0.1.11/tests/meshing/sphere_simple/system/blockMeshDict +57 -0
- pybfoam-0.1.11/tests/meshing/sphere_simple/system/controlDict +47 -0
- pybfoam-0.1.11/tests/meshing/sphere_simple/system/fvSchemes +48 -0
- pybfoam-0.1.11/tests/meshing/sphere_simple/system/fvSolution +33 -0
- pybfoam-0.1.11/tests/meshing/sphere_simple/system/meshQualityDict +37 -0
- pybfoam-0.1.11/tests/meshing/sphere_simple/system/snappyHexMeshDict +115 -0
- pybfoam-0.1.11/tests/meshing/test_blockmesh_cube.py +164 -0
- pybfoam-0.1.11/tests/meshing/test_checkmesh.py +330 -0
- pybfoam-0.1.11/tests/meshing/test_snappy_motorbike.py +144 -0
- pybfoam-0.1.11/tests/meshing/test_snappy_sphere.py +151 -0
- pybfoam-0.1.11/tests/pybind/0/U +54 -0
- pybfoam-0.1.11/tests/pybind/0/alpha.water +49 -0
- pybfoam-0.1.11/tests/pybind/0/p_rgh +52 -0
- pybfoam-0.1.11/tests/pybind/Allclean +10 -0
- pybfoam-0.1.11/tests/pybind/Allrun +14 -0
- pybfoam-0.1.11/tests/pybind/Allrun-parallel +16 -0
- pybfoam-0.1.11/tests/pybind/constant/dynamicMeshDict +21 -0
- pybfoam-0.1.11/tests/pybind/constant/g +22 -0
- pybfoam-0.1.11/tests/pybind/constant/transportProperties +38 -0
- pybfoam-0.1.11/tests/pybind/constant/turbulenceProperties +21 -0
- pybfoam-0.1.11/tests/pybind/system/TestDict +43 -0
- pybfoam-0.1.11/tests/pybind/system/blockMeshDict +114 -0
- pybfoam-0.1.11/tests/pybind/system/controlDict +81 -0
- pybfoam-0.1.11/tests/pybind/system/decomposeParDict +27 -0
- pybfoam-0.1.11/tests/pybind/system/fvSchemes +59 -0
- pybfoam-0.1.11/tests/pybind/system/fvSolution +80 -0
- pybfoam-0.1.11/tests/pybind/system/setFieldsDict +36 -0
- pybfoam-0.1.11/tests/pybind/test_dict.py +48 -0
- pybfoam-0.1.11/tests/pybind/test_dimensioned.py +254 -0
- pybfoam-0.1.11/tests/pybind/test_field_tmp_interop.py +196 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/pybind/test_fvc.py +26 -20
- pybfoam-0.1.11/tests/pybind/test_fvm.py +32 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/pybind/test_geoFields.py +63 -61
- pybfoam-0.1.11/tests/pybind/test_primitives.py +327 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/pybind/test_set_sampling.py +157 -191
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/pybind/test_surface_sampling.py +111 -126
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/pybind/test_uniform_fields.py +19 -14
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/test_sampling_models.py +16 -14
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/test_sampling_set_configs.py +40 -89
- pybfoam-0.1.9/CMakePresets.json +0 -143
- pybfoam-0.1.9/conftest.py +0 -9
- pybfoam-0.1.9/scripts/generate_stubs.py +0 -77
- pybfoam-0.1.9/scripts/pyInstall.sh +0 -76
- pybfoam-0.1.9/src/pybFoam/__init__.py +0 -26
- pybfoam-0.1.9/src/pybFoam/_version.py +0 -1
- pybfoam-0.1.9/src/pybFoam/fvc/bind_fvc.cpp +0 -154
- pybfoam-0.1.9/src/pybFoam/io/__init__.py +0 -1
- pybfoam-0.1.9/src/pybFoam/pybFoam_core.pyi +0 -777
- pybfoam-0.1.9/src/pybFoam/sampling.pyi +0 -258
- pybfoam-0.1.9/src/pybFoam/thermo.pyi +0 -23
- pybfoam-0.1.9/src/pybFoam/turbulence.pyi +0 -41
- pybfoam-0.1.9/tests/io/TestDict.json +0 -13
- pybfoam-0.1.9/tests/pybind/test_dict.py +0 -46
- pybfoam-0.1.9/tests/pybind/test_dimensioned.py +0 -416
- pybfoam-0.1.9/tests/pybind/test_fvm.py +0 -21
- pybfoam-0.1.9/tests/pybind/test_primitives.py +0 -183
- {pybfoam-0.1.9 → pybfoam-0.1.11}/.github/workflows/pages.yaml +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/.github/workflows/release.yaml +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/LICENSE +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/benchmark/bench_complex.png +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/benchmark/bench_vec_add.png +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/benchmark/bench_vec_add_4.png +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/docs/Makefile +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/docs/README.md +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/docs/api.rst +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/docs/changelog.rst +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/docs/contributing.rst +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/docs/index.rst +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/docs/installation.rst +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/docs/introduction.rst +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/docs/make.bat +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/docs/usage.rst +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/0.orig/U +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/0.orig/alpha.water +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/0.orig/p_rgh +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/Allclean +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/Allrun +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/Allrun-parallel +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/constant/dynamicMeshDict +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/constant/g +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/constant/transportProperties +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/constant/turbulenceProperties +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/system/TestDict +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/system/blockMeshDict +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/system/controlDict +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/system/decomposeParDict +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/system/fvSchemes +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/system/fvSolution +0 -0
- {pybfoam-0.1.9/tests/pybind → pybfoam-0.1.11/examples/case}/system/setFieldsDict +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/fvc/CMakeLists.txt +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/fvc/fvc.cpp +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/fvm/CMakeLists.txt +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/fvm/fvm.cpp +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/py.typed +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/runTimeTables/CMakeLists.txt +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/sampling/bind_sampling.hpp +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/thermo/CMakeLists.txt +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/thermo/bind_thermo.cpp +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/thermo/thermo.cpp +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/turbulence/CMakeLists.txt +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/turbulence/bind_turbulence.hpp +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/src/pybFoam/turbulence/turbulence.cpp +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/cavity/0.orig/U +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/cavity/0.orig/nu +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/cavity/0.orig/p +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/cavity/Allclean +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/cavity/Allrun +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/cavity/constant/transportProperties +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/cavity/log2 +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/cavity/system/PDRblockMeshDict +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/cavity/system/blockMeshDict +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/cavity/system/controlDict +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/cavity/system/decomposeParDict +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/cavity/system/fvSchemes +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/elbow/0.orig/U +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/elbow/0.orig/nu +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/elbow/0.orig/p +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/elbow/Allclean +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/elbow/Allrun +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/elbow/constant/transportProperties +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/elbow/system/controlDict +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/elbow/system/foamDataToFluentDict +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/elbow/system/fvSchemes +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/elbow/system/fvSolution +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/io/TestDict +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/io/TestDict.yaml +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/io/controlDict +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/io/fvSchemes +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/io/fvSolution +0 -0
- {pybfoam-0.1.9/tests/pybind/0 → pybfoam-0.1.11/tests/pybind/0.orig}/U +0 -0
- {pybfoam-0.1.9/tests/pybind/0 → pybfoam-0.1.11/tests/pybind/0.orig}/alpha.water +0 -0
- {pybfoam-0.1.9/tests/pybind/0 → pybfoam-0.1.11/tests/pybind/0.orig}/p_rgh +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/pybind/constant/polyMesh/boundary +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/pybind/constant/polyMesh/faces +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/pybind/constant/polyMesh/neighbour +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/pybind/constant/polyMesh/owner +0 -0
- {pybfoam-0.1.9 → pybfoam-0.1.11}/tests/pybind/constant/polyMesh/points +0 -0
|
@@ -12,7 +12,7 @@ jobs:
|
|
|
12
12
|
runs-on: ubuntu-24.04 # may use an older version to test
|
|
13
13
|
strategy:
|
|
14
14
|
matrix:
|
|
15
|
-
openfoam-version: [2406, 2412, 2506]
|
|
15
|
+
openfoam-version: [2312, 2406, 2412, 2506, 2512]
|
|
16
16
|
fail-fast: false
|
|
17
17
|
name: Test with OpenFOAM ${{ matrix.openfoam-version }}
|
|
18
18
|
steps:
|
|
@@ -28,9 +28,36 @@ jobs:
|
|
|
28
28
|
- name: Install build dependencies
|
|
29
29
|
run: |
|
|
30
30
|
python -m pip install --upgrade pip
|
|
31
|
+
|
|
31
32
|
- name: Build package
|
|
32
33
|
run: |
|
|
33
34
|
pip install .[dev]
|
|
35
|
+
|
|
34
36
|
- name: Run tests
|
|
35
37
|
run: |
|
|
36
|
-
pytest
|
|
38
|
+
pytest
|
|
39
|
+
|
|
40
|
+
pre-commit-checks:
|
|
41
|
+
name: Pre-commit checks
|
|
42
|
+
runs-on: ubuntu-24.04
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v5
|
|
45
|
+
|
|
46
|
+
- name: Set up OpenFOAM
|
|
47
|
+
uses: gerlero/setup-openfoam@v1
|
|
48
|
+
with:
|
|
49
|
+
openfoam-version: 2506
|
|
50
|
+
|
|
51
|
+
- name: Set up Python
|
|
52
|
+
uses: actions/setup-python@v5
|
|
53
|
+
with:
|
|
54
|
+
python-version: '3.11'
|
|
55
|
+
|
|
56
|
+
- name: Install dependencies
|
|
57
|
+
run: |
|
|
58
|
+
python -m pip install --upgrade pip
|
|
59
|
+
pip install .[dev]
|
|
60
|
+
|
|
61
|
+
- name: Run pre-commit on all files
|
|
62
|
+
run: |
|
|
63
|
+
pre-commit run --all-files --color always --verbose
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Pre-commit configuration for pybFoam
|
|
2
|
+
# See https://pre-commit.com for more information
|
|
3
|
+
|
|
4
|
+
repos:
|
|
5
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
6
|
+
rev: v6.0.0
|
|
7
|
+
hooks:
|
|
8
|
+
- id: check-yaml
|
|
9
|
+
- id: end-of-file-fixer
|
|
10
|
+
- id: trailing-whitespace
|
|
11
|
+
- id: pretty-format-json
|
|
12
|
+
args: [--autofix, --no-sort-keys]
|
|
13
|
+
|
|
14
|
+
# Local hooks using poe commands
|
|
15
|
+
- repo: local
|
|
16
|
+
hooks:
|
|
17
|
+
- id: format
|
|
18
|
+
name: Ruff Format
|
|
19
|
+
entry: poe format
|
|
20
|
+
language: system
|
|
21
|
+
types: [python]
|
|
22
|
+
pass_filenames: false
|
|
23
|
+
|
|
24
|
+
- id: lint
|
|
25
|
+
name: Ruff Lint
|
|
26
|
+
entry: poe lint
|
|
27
|
+
language: system
|
|
28
|
+
types: [python]
|
|
29
|
+
pass_filenames: false
|
|
30
|
+
|
|
31
|
+
- id: type-check
|
|
32
|
+
name: Mypy Type Check
|
|
33
|
+
entry: poe type_check
|
|
34
|
+
language: system
|
|
35
|
+
types: [python]
|
|
36
|
+
pass_filenames: false
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"configurePresets": [
|
|
4
|
+
{
|
|
5
|
+
"name": "default",
|
|
6
|
+
"displayName": "Default Config",
|
|
7
|
+
"description": "Default build configuration for pybFoam",
|
|
8
|
+
"generator": "Unix Makefiles",
|
|
9
|
+
"binaryDir": "${sourceDir}/build",
|
|
10
|
+
"cacheVariables": {
|
|
11
|
+
"CMAKE_BUILD_TYPE": "Release",
|
|
12
|
+
"CMAKE_CXX_COMPILER": "g++",
|
|
13
|
+
"CMAKE_C_COMPILER": "gcc",
|
|
14
|
+
"CPM_SOURCE_CACHE": "$env{HOME}/.cache/CPM",
|
|
15
|
+
"CPM_USE_LOCAL_PACKAGES": "ON"
|
|
16
|
+
},
|
|
17
|
+
"condition": {
|
|
18
|
+
"type": "notEquals",
|
|
19
|
+
"lhs": "$env{FOAM_SRC}",
|
|
20
|
+
"rhs": ""
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "debug",
|
|
25
|
+
"displayName": "Debug Config",
|
|
26
|
+
"description": "Debug build configuration for pybFoam",
|
|
27
|
+
"inherits": "default",
|
|
28
|
+
"cacheVariables": {
|
|
29
|
+
"CMAKE_BUILD_TYPE": "Debug",
|
|
30
|
+
"CMAKE_CXX_FLAGS": "-g -O0 -DDEBUG"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "release",
|
|
35
|
+
"displayName": "Release Config",
|
|
36
|
+
"description": "Release build configuration for pybFoam",
|
|
37
|
+
"inherits": "default",
|
|
38
|
+
"cacheVariables": {
|
|
39
|
+
"CMAKE_BUILD_TYPE": "Release",
|
|
40
|
+
"CMAKE_CXX_FLAGS": "-O3 -DNDEBUG"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "relwithdebinfo",
|
|
45
|
+
"displayName": "Release with Debug Info",
|
|
46
|
+
"description": "Release build with debug information for pybFoam",
|
|
47
|
+
"inherits": "default",
|
|
48
|
+
"cacheVariables": {
|
|
49
|
+
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
|
50
|
+
"CMAKE_CXX_FLAGS": "-O2 -g"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "ninja",
|
|
55
|
+
"displayName": "Ninja Build",
|
|
56
|
+
"description": "Fast build using Ninja generator",
|
|
57
|
+
"inherits": "default",
|
|
58
|
+
"generator": "Ninja",
|
|
59
|
+
"cacheVariables": {
|
|
60
|
+
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "clang",
|
|
65
|
+
"displayName": "Clang Build",
|
|
66
|
+
"description": "Build with Clang compiler",
|
|
67
|
+
"inherits": "default",
|
|
68
|
+
"cacheVariables": {
|
|
69
|
+
"CMAKE_CXX_COMPILER": "clang++",
|
|
70
|
+
"CMAKE_C_COMPILER": "clang"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "offline",
|
|
75
|
+
"displayName": "Offline Build",
|
|
76
|
+
"description": "Build without downloading dependencies",
|
|
77
|
+
"inherits": "default",
|
|
78
|
+
"cacheVariables": {
|
|
79
|
+
"CPM_USE_LOCAL_PACKAGES": "ON",
|
|
80
|
+
"CPM_LOCAL_PACKAGES_ONLY": "ON"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "no-cache",
|
|
85
|
+
"displayName": "No Cache Build",
|
|
86
|
+
"description": "Build without using CPM cache",
|
|
87
|
+
"inherits": "default",
|
|
88
|
+
"cacheVariables": {
|
|
89
|
+
"CPM_SOURCE_CACHE": ""
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"buildPresets": [
|
|
94
|
+
{
|
|
95
|
+
"name": "default",
|
|
96
|
+
"configurePreset": "default",
|
|
97
|
+
"displayName": "Default Build",
|
|
98
|
+
"description": "Build with default settings"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "debug",
|
|
102
|
+
"configurePreset": "debug",
|
|
103
|
+
"displayName": "Debug Build",
|
|
104
|
+
"description": "Build in debug mode"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "release",
|
|
108
|
+
"configurePreset": "release",
|
|
109
|
+
"displayName": "Release Build",
|
|
110
|
+
"description": "Build in release mode"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "ninja",
|
|
114
|
+
"configurePreset": "ninja",
|
|
115
|
+
"displayName": "Ninja Build",
|
|
116
|
+
"description": "Fast build using Ninja"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "parallel",
|
|
120
|
+
"configurePreset": "default",
|
|
121
|
+
"displayName": "Parallel Build",
|
|
122
|
+
"description": "Build with maximum parallelism",
|
|
123
|
+
"jobs": 0
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"testPresets": [
|
|
127
|
+
{
|
|
128
|
+
"name": "default",
|
|
129
|
+
"configurePreset": "default",
|
|
130
|
+
"displayName": "Default Test",
|
|
131
|
+
"description": "Run all tests"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "verbose",
|
|
135
|
+
"configurePreset": "default",
|
|
136
|
+
"displayName": "Verbose Test",
|
|
137
|
+
"description": "Run tests with verbose output",
|
|
138
|
+
"output": {
|
|
139
|
+
"verbosity": "verbose"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pybFoam
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.11
|
|
4
4
|
Summary: python bindings for OpenFOAM
|
|
5
5
|
Keywords: OpenFOAM,simulation,CFD
|
|
6
6
|
Author-Email: Henning Scheufler <henning.scheufler@web.de>
|
|
@@ -12,7 +12,6 @@ Classifier: Intended Audience :: Science/Research
|
|
|
12
12
|
Classifier: Natural Language :: English
|
|
13
13
|
Classifier: Programming Language :: C++
|
|
14
14
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -21,7 +20,7 @@ Classifier: Topic :: Scientific/Engineering
|
|
|
21
20
|
Project-URL: Homepage, https://github.com/HenningScheufler/pybFoam
|
|
22
21
|
Project-URL: Repository, https://github.com/HenningScheufler/pybFoam.git
|
|
23
22
|
Project-URL: Issues, https://github.com/HenningScheufler/pybFoam/issues
|
|
24
|
-
Requires-Python: >=3.
|
|
23
|
+
Requires-Python: >=3.9
|
|
25
24
|
Requires-Dist: numpy>=1.20
|
|
26
25
|
Requires-Dist: pybind11>=2.6.0
|
|
27
26
|
Requires-Dist: pydantic
|
|
@@ -30,12 +29,14 @@ Provides-Extra: dev
|
|
|
30
29
|
Requires-Dist: pytest>=6.0; extra == "dev"
|
|
31
30
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
32
31
|
Requires-Dist: pytest-xdist; extra == "dev"
|
|
33
|
-
Requires-Dist:
|
|
34
|
-
Requires-Dist: flake8; extra == "dev"
|
|
35
|
-
Requires-Dist: isort; extra == "dev"
|
|
32
|
+
Requires-Dist: ruff>=0.14.2; extra == "dev"
|
|
36
33
|
Requires-Dist: mypy; extra == "dev"
|
|
37
34
|
Requires-Dist: cmake>=3.18; extra == "dev"
|
|
38
35
|
Requires-Dist: pybind11-stubgen>=2.5; extra == "dev"
|
|
36
|
+
Requires-Dist: mypy; extra == "dev"
|
|
37
|
+
Requires-Dist: types-PyYAML; extra == "dev"
|
|
38
|
+
Requires-Dist: poethepoet>=0.37.0; extra == "dev"
|
|
39
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
39
40
|
Provides-Extra: docs
|
|
40
41
|
Requires-Dist: sphinx>=4.0; extra == "docs"
|
|
41
42
|
Requires-Dist: sphinx-sitemap; extra == "docs"
|
|
@@ -46,6 +47,7 @@ Requires-Dist: jax; extra == "benchmark"
|
|
|
46
47
|
Requires-Dist: seaborn; extra == "benchmark"
|
|
47
48
|
Requires-Dist: matplotlib; extra == "benchmark"
|
|
48
49
|
Requires-Dist: PyQt6; extra == "benchmark"
|
|
50
|
+
Requires-Dist: tabulate; extra == "benchmark"
|
|
49
51
|
Provides-Extra: all
|
|
50
52
|
Requires-Dist: pybFoam[benchmark,dev,docs]; extra == "all"
|
|
51
53
|
Description-Content-Type: text/markdown
|
|
@@ -71,10 +73,10 @@ Currently in the pre-alpha release state.
|
|
|
71
73
|
|
|
72
74
|
## Requirements
|
|
73
75
|
|
|
74
|
-
- **OpenFOAM**:
|
|
75
|
-
- **Python**: 3.
|
|
76
|
+
- **OpenFOAM**: v2312 or higher (sourced and installed)
|
|
77
|
+
- **Python**: 3.9 or higher
|
|
76
78
|
- **CMake**: 3.18 or higher
|
|
77
|
-
- **C++ Compiler**: C++17 compatible (
|
|
79
|
+
- **C++ Compiler**: C++17 compatible (TBD)
|
|
78
80
|
- **Build tools**: pybind11, scikit-build-core
|
|
79
81
|
- **Python packages**: numpy, pydantic
|
|
80
82
|
|
|
@@ -103,9 +105,27 @@ pip install .
|
|
|
103
105
|
|
|
104
106
|
For development:
|
|
105
107
|
```bash
|
|
106
|
-
pip install -e .
|
|
108
|
+
pip install -e .[all]
|
|
107
109
|
```
|
|
108
110
|
|
|
111
|
+
#### Generating Type Stubs (Development only)
|
|
112
|
+
|
|
113
|
+
Type stubs (.pyi files) are generated post-installation using a separate script:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Install the package first
|
|
117
|
+
uv pip install -e .[all]
|
|
118
|
+
|
|
119
|
+
# Generate and verify stubs
|
|
120
|
+
./scripts/generate_stubs.sh
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
This script:
|
|
124
|
+
1. Generates stubs using pybind11-stubgen
|
|
125
|
+
2. Cleans and formats the stubs
|
|
126
|
+
3. Copies them to the source directory
|
|
127
|
+
4. Verifies them with mypy
|
|
128
|
+
|
|
109
129
|
---
|
|
110
130
|
|
|
111
131
|
## Quick Start
|
|
@@ -116,20 +136,20 @@ pip install -e . --no-build-isolation
|
|
|
116
136
|
import pybFoam as pf
|
|
117
137
|
|
|
118
138
|
# Create OpenFOAM time and mesh
|
|
119
|
-
time = pf.
|
|
139
|
+
time = pf.Time(".", ".")
|
|
120
140
|
mesh = pf.fvMesh(time)
|
|
121
141
|
|
|
122
142
|
# Access fields
|
|
123
|
-
|
|
143
|
+
p_rgh = pf.volScalarField.read_field(mesh, "p_rgh")
|
|
124
144
|
U = pf.volVectorField.read_field(mesh, "U")
|
|
125
145
|
|
|
126
146
|
# Compute gradients using finite volume calculus
|
|
127
|
-
grad_p = pf.fvc.grad(
|
|
147
|
+
grad_p = pf.fvc.grad(p_rgh)
|
|
128
148
|
div_U = pf.fvc.div(U)
|
|
129
149
|
|
|
130
150
|
# Convert to NumPy arrays for analysis
|
|
131
151
|
import numpy as np
|
|
132
|
-
p_array = np.asarray(
|
|
152
|
+
p_array = np.asarray(p_rgh["internalField"])
|
|
133
153
|
print(f"Pressure range: {p_array.min():.3f} to {p_array.max():.3f}")
|
|
134
154
|
```
|
|
135
155
|
|
|
@@ -162,7 +182,7 @@ from pydantic import Field
|
|
|
162
182
|
|
|
163
183
|
class TransportProperties(IOModelBase):
|
|
164
184
|
nu: float = Field(..., description="Kinematic viscosity")
|
|
165
|
-
|
|
185
|
+
|
|
166
186
|
class Config:
|
|
167
187
|
foam_file_name = "transportProperties"
|
|
168
188
|
|
|
@@ -204,7 +224,7 @@ pytest tests/test_sampling_models.py # Pydantic config tests
|
|
|
204
224
|
|
|
205
225
|
---
|
|
206
226
|
|
|
207
|
-
## Documentation
|
|
227
|
+
## Documentation (outdated)
|
|
208
228
|
|
|
209
229
|
Full documentation is available at: [https://henningscheufler.github.io/pybFoam/](https://henningscheufler.github.io/pybFoam/index.html)
|
|
210
230
|
|
|
@@ -216,6 +236,8 @@ Full documentation is available at: [https://henningscheufler.github.io/pybFoam/
|
|
|
216
236
|
2. Install development dependencies:
|
|
217
237
|
```bash
|
|
218
238
|
pip install -e ".[dev]"
|
|
239
|
+
# or build with stubs
|
|
240
|
+
pip install -e .[all] -C cmake.define.ENABLE_PYBFOAM_STUBS=ON -v
|
|
219
241
|
```
|
|
220
242
|
3. Run tests before committing:
|
|
221
243
|
```bash
|
|
@@ -229,5 +251,3 @@ Full documentation is available at: [https://henningscheufler.github.io/pybFoam/
|
|
|
229
251
|
See [LICENSE](LICENSE) file for details.
|
|
230
252
|
|
|
231
253
|
---
|
|
232
|
-
|
|
233
|
-
|
|
@@ -19,10 +19,10 @@ Currently in the pre-alpha release state.
|
|
|
19
19
|
|
|
20
20
|
## Requirements
|
|
21
21
|
|
|
22
|
-
- **OpenFOAM**:
|
|
23
|
-
- **Python**: 3.
|
|
22
|
+
- **OpenFOAM**: v2312 or higher (sourced and installed)
|
|
23
|
+
- **Python**: 3.9 or higher
|
|
24
24
|
- **CMake**: 3.18 or higher
|
|
25
|
-
- **C++ Compiler**: C++17 compatible (
|
|
25
|
+
- **C++ Compiler**: C++17 compatible (TBD)
|
|
26
26
|
- **Build tools**: pybind11, scikit-build-core
|
|
27
27
|
- **Python packages**: numpy, pydantic
|
|
28
28
|
|
|
@@ -51,9 +51,27 @@ pip install .
|
|
|
51
51
|
|
|
52
52
|
For development:
|
|
53
53
|
```bash
|
|
54
|
-
pip install -e .
|
|
54
|
+
pip install -e .[all]
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
+
#### Generating Type Stubs (Development only)
|
|
58
|
+
|
|
59
|
+
Type stubs (.pyi files) are generated post-installation using a separate script:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Install the package first
|
|
63
|
+
uv pip install -e .[all]
|
|
64
|
+
|
|
65
|
+
# Generate and verify stubs
|
|
66
|
+
./scripts/generate_stubs.sh
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
This script:
|
|
70
|
+
1. Generates stubs using pybind11-stubgen
|
|
71
|
+
2. Cleans and formats the stubs
|
|
72
|
+
3. Copies them to the source directory
|
|
73
|
+
4. Verifies them with mypy
|
|
74
|
+
|
|
57
75
|
---
|
|
58
76
|
|
|
59
77
|
## Quick Start
|
|
@@ -64,20 +82,20 @@ pip install -e . --no-build-isolation
|
|
|
64
82
|
import pybFoam as pf
|
|
65
83
|
|
|
66
84
|
# Create OpenFOAM time and mesh
|
|
67
|
-
time = pf.
|
|
85
|
+
time = pf.Time(".", ".")
|
|
68
86
|
mesh = pf.fvMesh(time)
|
|
69
87
|
|
|
70
88
|
# Access fields
|
|
71
|
-
|
|
89
|
+
p_rgh = pf.volScalarField.read_field(mesh, "p_rgh")
|
|
72
90
|
U = pf.volVectorField.read_field(mesh, "U")
|
|
73
91
|
|
|
74
92
|
# Compute gradients using finite volume calculus
|
|
75
|
-
grad_p = pf.fvc.grad(
|
|
93
|
+
grad_p = pf.fvc.grad(p_rgh)
|
|
76
94
|
div_U = pf.fvc.div(U)
|
|
77
95
|
|
|
78
96
|
# Convert to NumPy arrays for analysis
|
|
79
97
|
import numpy as np
|
|
80
|
-
p_array = np.asarray(
|
|
98
|
+
p_array = np.asarray(p_rgh["internalField"])
|
|
81
99
|
print(f"Pressure range: {p_array.min():.3f} to {p_array.max():.3f}")
|
|
82
100
|
```
|
|
83
101
|
|
|
@@ -110,7 +128,7 @@ from pydantic import Field
|
|
|
110
128
|
|
|
111
129
|
class TransportProperties(IOModelBase):
|
|
112
130
|
nu: float = Field(..., description="Kinematic viscosity")
|
|
113
|
-
|
|
131
|
+
|
|
114
132
|
class Config:
|
|
115
133
|
foam_file_name = "transportProperties"
|
|
116
134
|
|
|
@@ -152,7 +170,7 @@ pytest tests/test_sampling_models.py # Pydantic config tests
|
|
|
152
170
|
|
|
153
171
|
---
|
|
154
172
|
|
|
155
|
-
## Documentation
|
|
173
|
+
## Documentation (outdated)
|
|
156
174
|
|
|
157
175
|
Full documentation is available at: [https://henningscheufler.github.io/pybFoam/](https://henningscheufler.github.io/pybFoam/index.html)
|
|
158
176
|
|
|
@@ -164,6 +182,8 @@ Full documentation is available at: [https://henningscheufler.github.io/pybFoam/
|
|
|
164
182
|
2. Install development dependencies:
|
|
165
183
|
```bash
|
|
166
184
|
pip install -e ".[dev]"
|
|
185
|
+
# or build with stubs
|
|
186
|
+
pip install -e .[all] -C cmake.define.ENABLE_PYBFOAM_STUBS=ON -v
|
|
167
187
|
```
|
|
168
188
|
3. Run tests before committing:
|
|
169
189
|
```bash
|
|
@@ -177,5 +197,3 @@ Full documentation is available at: [https://henningscheufler.github.io/pybFoam/
|
|
|
177
197
|
See [LICENSE](LICENSE) file for details.
|
|
178
198
|
|
|
179
199
|
---
|
|
180
|
-
|
|
181
|
-
|
|
@@ -8,28 +8,30 @@
|
|
|
8
8
|
# )
|
|
9
9
|
import os
|
|
10
10
|
|
|
11
|
+
|
|
11
12
|
def configure_threads(n=1):
|
|
12
13
|
multi_thread = True if n > 1 else False
|
|
13
14
|
os.environ["XLA_FLAGS"] = (
|
|
14
|
-
f"--xla_cpu_multi_thread_eigen={multi_thread} "
|
|
15
|
-
f"intra_op_parallelism_threads={n}"
|
|
15
|
+
f"--xla_cpu_multi_thread_eigen={multi_thread} intra_op_parallelism_threads={n}"
|
|
16
16
|
)
|
|
17
17
|
os.environ["NPROC"] = f"{n}"
|
|
18
18
|
os.environ["OMP_NUM_THREADS"] = str(n)
|
|
19
19
|
os.environ["MKL_NUM_THREADS"] = str(n)
|
|
20
20
|
os.environ["OPENBLAS_NUM_THREADS"] = str(n)
|
|
21
21
|
|
|
22
|
+
|
|
22
23
|
configure_threads(1)
|
|
23
24
|
|
|
24
|
-
from pybFoam import scalarField
|
|
25
|
-
import numpy as np
|
|
26
25
|
import timeit
|
|
27
|
-
|
|
28
|
-
import pandas as pd
|
|
29
|
-
import matplotlib.pyplot as plt
|
|
30
|
-
import seaborn as sns
|
|
26
|
+
|
|
31
27
|
import jax
|
|
32
28
|
import jax.numpy as jnp
|
|
29
|
+
import matplotlib.pyplot as plt
|
|
30
|
+
import numpy as np
|
|
31
|
+
import pandas as pd
|
|
32
|
+
import seaborn as sns
|
|
33
|
+
|
|
34
|
+
from pybFoam import scalarField
|
|
33
35
|
|
|
34
36
|
|
|
35
37
|
def pybfoam_expression(n_elements):
|
|
@@ -42,8 +44,10 @@ def pybfoam_expression(n_elements):
|
|
|
42
44
|
x = a * b + c
|
|
43
45
|
y = d - a * c
|
|
44
46
|
return (x * y + b) / (a + 1.0)
|
|
47
|
+
|
|
45
48
|
return run
|
|
46
49
|
|
|
50
|
+
|
|
47
51
|
def numpy_expression(n_elements):
|
|
48
52
|
a = np.full(n_elements, 1.1)
|
|
49
53
|
b = np.full(n_elements, 2.2)
|
|
@@ -57,6 +61,7 @@ def numpy_expression(n_elements):
|
|
|
57
61
|
|
|
58
62
|
return run
|
|
59
63
|
|
|
64
|
+
|
|
60
65
|
def jax_expression(n_elements):
|
|
61
66
|
a = jnp.full(n_elements, 1.1)
|
|
62
67
|
b = jnp.full(n_elements, 2.2)
|
|
@@ -71,6 +76,7 @@ def jax_expression(n_elements):
|
|
|
71
76
|
|
|
72
77
|
return run
|
|
73
78
|
|
|
79
|
+
|
|
74
80
|
vector_add_data = {
|
|
75
81
|
"n_elements": [],
|
|
76
82
|
"duration": [],
|
|
@@ -78,51 +84,83 @@ vector_add_data = {
|
|
|
78
84
|
# "jax": []
|
|
79
85
|
}
|
|
80
86
|
|
|
87
|
+
|
|
81
88
|
def add_data(n_elements, duration, method):
|
|
82
89
|
vector_add_data["n_elements"].append(n_elements)
|
|
83
90
|
vector_add_data["duration"].append(duration)
|
|
84
91
|
vector_add_data["method"].append(method)
|
|
85
92
|
|
|
86
|
-
for n_elements in [10, 100, 1000, 10_000, 100_000, 1_000_000, 10_000_000]:
|
|
87
93
|
|
|
94
|
+
for n_elements in [10, 100, 1000, 10_000, 100_000, 1_000_000, 10_000_000]:
|
|
88
95
|
bench = pybfoam_expression(n_elements)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
n_repeat = 100
|
|
97
|
+
duration = timeit.timeit(bench, number=n_repeat)
|
|
98
|
+
# t0 = time.perf_counter() # lower overhead than timeit
|
|
99
|
+
# bench()
|
|
100
|
+
# t1 = time.perf_counter()
|
|
101
|
+
# duration = t1 - t0
|
|
102
|
+
add_data(n_elements, duration / n_repeat, "pybFoam")
|
|
95
103
|
|
|
96
104
|
bench = numpy_expression(n_elements)
|
|
97
|
-
|
|
98
|
-
t0 = time.perf_counter() # lower overhead than timeit
|
|
99
|
-
bench()
|
|
100
|
-
t1 = time.perf_counter()
|
|
101
|
-
duration = t1 - t0
|
|
102
|
-
add_data(n_elements, duration, "NumPy")
|
|
105
|
+
duration = timeit.timeit(bench, number=n_repeat)
|
|
106
|
+
# t0 = time.perf_counter() # lower overhead than timeit
|
|
107
|
+
# bench()
|
|
108
|
+
# t1 = time.perf_counter()
|
|
109
|
+
# duration = t1 - t0
|
|
110
|
+
add_data(n_elements, duration / n_repeat, "NumPy")
|
|
103
111
|
|
|
104
112
|
bench = jax_expression(n_elements)
|
|
105
113
|
# First call to compile
|
|
106
114
|
bench()
|
|
107
|
-
|
|
108
|
-
t0 = time.perf_counter() # lower overhead than timeit
|
|
109
|
-
bench()
|
|
110
|
-
t1 = time.perf_counter()
|
|
111
|
-
duration = t1 - t0
|
|
112
|
-
add_data(n_elements, duration, "JAX")
|
|
115
|
+
duration = timeit.timeit(bench, number=n_repeat)
|
|
116
|
+
# t0 = time.perf_counter() # lower overhead than timeit
|
|
117
|
+
# bench()
|
|
118
|
+
# t1 = time.perf_counter()
|
|
119
|
+
# duration = t1 - t0
|
|
120
|
+
add_data(n_elements, duration / n_repeat, "JAX")
|
|
113
121
|
|
|
114
122
|
|
|
115
123
|
df_vector_add = pd.DataFrame(vector_add_data)
|
|
116
|
-
df_vector_add["time_per_element [ns]"] =
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
124
|
+
df_vector_add["time_per_element [ns]"] = (
|
|
125
|
+
df_vector_add["duration"] / df_vector_add["n_elements"] * 1e9
|
|
126
|
+
) # time per element in nanoseconds
|
|
127
|
+
print("Vector Addition Benchmark:", df_vector_add)
|
|
128
|
+
|
|
129
|
+
# Save results to CSV
|
|
130
|
+
df_vector_add.to_csv("results/benchmark_complex.csv", index=False)
|
|
131
|
+
print("\nResults saved to: results/benchmark_complex.csv")
|
|
132
|
+
|
|
133
|
+
# Create pivot table for markdown
|
|
134
|
+
pivot_df = df_vector_add.pivot(index="n_elements", columns="method", values="time_per_element [ns]")
|
|
135
|
+
pivot_df = pivot_df.round(2)
|
|
136
|
+
|
|
137
|
+
# Save markdown table
|
|
138
|
+
with open("results/benchmark_complex.md", "w") as f:
|
|
139
|
+
f.write("# Complex Expression Benchmark\n\n")
|
|
140
|
+
f.write("Expression: `(x * y + b) / (a + 1.0)`\n\n")
|
|
141
|
+
f.write("where:\n")
|
|
142
|
+
f.write("- `x = a * b + c`\n")
|
|
143
|
+
f.write("- `y = d - a * c`\n\n")
|
|
144
|
+
f.write("## Results (time per element in nanoseconds)\n\n")
|
|
145
|
+
f.write(pivot_df.to_markdown())
|
|
146
|
+
f.write("\n\n## Summary\n\n")
|
|
147
|
+
for n_elem in [1_000_000, 10_000_000]:
|
|
148
|
+
if n_elem in pivot_df.index:
|
|
149
|
+
f.write(f"\n### {n_elem:,} elements:\n\n")
|
|
150
|
+
for method in pivot_df.columns:
|
|
151
|
+
f.write(f"- **{method}**: {pivot_df.loc[n_elem, method]:.2f} ns per element\n")
|
|
152
|
+
|
|
153
|
+
print("Results table saved to: results/benchmark_complex.md")
|
|
154
|
+
|
|
155
|
+
sns.lineplot(
|
|
156
|
+
data=df_vector_add, x="n_elements", y="time_per_element [ns]", hue="method", marker="o"
|
|
157
|
+
)
|
|
120
158
|
plt.xscale("log")
|
|
121
159
|
plt.yscale("log")
|
|
122
160
|
plt.xlabel("Number of Elements")
|
|
123
161
|
plt.ylabel("Time per Element (nanoseconds)")
|
|
124
162
|
plt.title("Expression: (x * y + b) / (a + 1.0)")
|
|
125
|
-
plt.savefig("bench_complex.png")
|
|
163
|
+
plt.savefig("results/bench_complex.png")
|
|
126
164
|
n_elements = 10_000_000
|
|
127
165
|
timings = df_vector_add[df_vector_add["n_elements"] == n_elements]
|
|
128
166
|
print(f"Timings for {n_elements} elements:")
|
|
@@ -138,5 +176,4 @@ for _, row in timings.iterrows():
|
|
|
138
176
|
plt.show()
|
|
139
177
|
|
|
140
178
|
|
|
141
|
-
|
|
142
179
|
# %%
|