PyFinitDiff 2.0.0.post0__tar.gz → 2.0.3.post0__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.
- pyfinitdiff-2.0.3.post0/.coverage +0 -0
- pyfinitdiff-2.0.3.post0/.github/workflows/deploy_coverage.yml +54 -0
- pyfinitdiff-2.0.3.post0/.github/workflows/deploy_documentation.yml +57 -0
- pyfinitdiff-2.0.3.post0/.github/workflows/deploy_workflow.yml +30 -0
- pyfinitdiff-2.0.3.post0/PKG-INFO +175 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/_version.py +2 -2
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/finite_difference_1D/boundaries.py +1 -1
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/finite_difference_1D/diagonals.py +0 -1
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/finite_difference_1D/finite_difference.py +1 -1
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/finite_difference_2D/boundaries.py +1 -1
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/finite_difference_2D/derivative.py +0 -2
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/finite_difference_2D/diagonals.py +1 -1
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/finite_difference_2D/finite_difference.py +1 -1
- pyfinitdiff-2.0.3.post0/PyFinitDiff/triplet.py +221 -0
- pyfinitdiff-2.0.3.post0/PyFinitDiff.egg-info/PKG-INFO +175 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff.egg-info/SOURCES.txt +6 -4
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff.egg-info/requires.txt +4 -4
- pyfinitdiff-2.0.3.post0/README.rst +112 -0
- {pyfinitdiff-2.0.0.post0/docs/source/gallery → pyfinitdiff-2.0.3.post0/docs/examples}/triplets/plot_triplets_0.py +1 -3
- {pyfinitdiff-2.0.0.post0/docs/source/gallery → pyfinitdiff-2.0.3.post0/docs/examples}/triplets/plot_triplets_1.py +1 -3
- {pyfinitdiff-2.0.0.post0/docs/source/gallery → pyfinitdiff-2.0.3.post0/docs/examples}/triplets/plot_triplets_2.py +1 -3
- {pyfinitdiff-2.0.0.post0/docs/source/gallery → pyfinitdiff-2.0.3.post0/docs/examples}/triplets/plot_triplets_3.py +1 -3
- pyfinitdiff-2.0.3.post0/docs/images/triplet_example_0.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/pyproject.toml +24 -6
- pyfinitdiff-2.0.3.post0/tests/test_1D_api.py +47 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/tests/test_1D_derivative.py +3 -0
- pyfinitdiff-2.0.3.post0/tests/test_2D_api.py +83 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/tests/test_2D_derivative.py +3 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/tests/test_2D_eigen.py +2 -1
- pyfinitdiff-2.0.3.post0/tests/test_triplet.py +35 -0
- pyfinitdiff-2.0.0.post0/.github/workflows/deploy_workflow.yml +0 -54
- pyfinitdiff-2.0.0.post0/PKG-INFO +0 -147
- pyfinitdiff-2.0.0.post0/PyFinitDiff/finite_difference_2D/dense.py +0 -238
- pyfinitdiff-2.0.0.post0/PyFinitDiff/triplet.py +0 -449
- pyfinitdiff-2.0.0.post0/PyFinitDiff.egg-info/PKG-INFO +0 -147
- pyfinitdiff-2.0.0.post0/README.rst +0 -84
- pyfinitdiff-2.0.0.post0/benchmarks/benchmark_0.py +0 -109
- pyfinitdiff-2.0.0.post0/tests/__init__.py +0 -0
- pyfinitdiff-2.0.0.post0/tests/test_1D_api.py +0 -36
- pyfinitdiff-2.0.0.post0/tests/test_2D_api.py +0 -44
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/.github/dependabot.yml +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/.gitignore +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/.readthedocs.yml +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/LICENSE +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/__init__.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/coefficients/__init__.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/coefficients/backward.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/coefficients/central.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/coefficients/forward.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/finite_difference_1D/__init__.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/finite_difference_1D/derivative.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/finite_difference_1D/utils.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/finite_difference_2D/__init__.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/finite_difference_2D/utils.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/tools/__init__.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/tools/directories.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/utils.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff.egg-info/dependency_links.txt +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff.egg-info/top_level.txt +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/Makefile +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/README.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/eigenmodes_1d/README.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/eigenmodes_1d/plot_mode_0.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/eigenmodes_1d/plot_mode_1.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/eigenmodes_1d/plot_mode_2.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/eigenmodes_1d/plot_mode_3.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/eigenmodes_2d/README.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/eigenmodes_2d/plot_bottom_anti_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/eigenmodes_2d/plot_bottom_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/eigenmodes_2d/plot_left_anti_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/eigenmodes_2d/plot_left_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/eigenmodes_2d/plot_no_symmetry.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/eigenmodes_2d/plot_right_anti_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/eigenmodes_2d/plot_right_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/eigenmodes_2d/plot_top_anti_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/eigenmodes_2d/plot_top_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/extras/README.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/extras/gradient.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/extras/plot_WM_field.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/examples/triplets/README.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/images/logo.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/make.bat +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/_static/default.css +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/code.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/conf.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/images/sphx_glr_plot_mode_0_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/images/sphx_glr_plot_mode_1_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/images/sphx_glr_plot_mode_2_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/images/sphx_glr_plot_mode_3_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/images/thumb/sphx_glr_plot_mode_0_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/images/thumb/sphx_glr_plot_mode_1_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/images/thumb/sphx_glr_plot_mode_2_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/images/thumb/sphx_glr_plot_mode_3_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/index.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_0.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_0.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_0.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_0.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_1.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_1.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_1.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_1.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_2.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_2.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_2.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_2.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_3.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_3.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_3.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/plot_mode_3.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_1d/sg_execution_times.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_bottom_anti_symmetric_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_bottom_symmetric_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_left_anti_symmetric_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_left_symmetric_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_no_symmetry_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_right_anti_symmetric_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_right_symmetric_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_top_anti_symmetric_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_top_symmetric_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_bottom_anti_symmetric_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_bottom_symmetric_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_left_anti_symmetric_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_left_symmetric_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_no_symmetry_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_right_anti_symmetric_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_right_symmetric_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_top_anti_symmetric_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_top_symmetric_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/index.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_bottom_anti_symmetric.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_bottom_anti_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_bottom_anti_symmetric.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_bottom_anti_symmetric.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_bottom_symmetric.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_bottom_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_bottom_symmetric.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_bottom_symmetric.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_left_anti_symmetric.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_left_anti_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_left_anti_symmetric.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_left_anti_symmetric.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_left_symmetric.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_left_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_left_symmetric.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_left_symmetric.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_no_symmetry.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_no_symmetry.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_no_symmetry.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_no_symmetry.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_right_anti_symmetric.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_right_anti_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_right_anti_symmetric.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_right_anti_symmetric.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_right_symmetric.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_right_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_right_symmetric.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_right_symmetric.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_top_anti_symmetric.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_top_anti_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_top_anti_symmetric.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_top_anti_symmetric.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_top_symmetric.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_top_symmetric.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_top_symmetric.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/plot_top_symmetric.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/eigenmodes_2d/sg_execution_times.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/extras/gradient.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/extras/gradient.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/extras/gradient.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/extras/images/sphx_glr_plot_WM_field_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/extras/images/thumb/sphx_glr_gradient_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/extras/images/thumb/sphx_glr_plot_WM_field_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/extras/index.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/extras/plot_WM_field.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/extras/plot_WM_field.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/extras/plot_WM_field.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/extras/plot_WM_field.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/extras/sg_execution_times.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/index.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/images/sphx_glr_plot_triplets_0_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/images/sphx_glr_plot_triplets_1_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/images/sphx_glr_plot_triplets_2_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/images/sphx_glr_plot_triplets_3_001.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/images/thumb/sphx_glr_plot_triplets_0_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/images/thumb/sphx_glr_plot_triplets_1_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/images/thumb/sphx_glr_plot_triplets_2_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/images/thumb/sphx_glr_plot_triplets_3_thumb.png +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/index.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/plot_triplets_0.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0/docs/examples → pyfinitdiff-2.0.3.post0/docs/source/gallery}/triplets/plot_triplets_0.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/plot_triplets_0.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/plot_triplets_0.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/plot_triplets_1.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0/docs/examples → pyfinitdiff-2.0.3.post0/docs/source/gallery}/triplets/plot_triplets_1.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/plot_triplets_1.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/plot_triplets_1.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/plot_triplets_2.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0/docs/examples → pyfinitdiff-2.0.3.post0/docs/source/gallery}/triplets/plot_triplets_2.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/plot_triplets_2.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/plot_triplets_2.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/plot_triplets_3.ipynb +0 -0
- {pyfinitdiff-2.0.0.post0/docs/examples → pyfinitdiff-2.0.3.post0/docs/source/gallery}/triplets/plot_triplets_3.py +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/plot_triplets_3.py.md5 +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/plot_triplets_3.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/gallery/triplets/sg_execution_times.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/index.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/references.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/docs/source/theory.rst +0 -0
- {pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/setup.cfg +0 -0
- {pyfinitdiff-2.0.0.post0/docs/examples → pyfinitdiff-2.0.3.post0/tests}/__init__.py +0 -0
|
Binary file
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# .github/workflows/deploy_coverage.yml
|
|
2
|
+
name: Coverage
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [ "master" ]
|
|
7
|
+
tags:
|
|
8
|
+
- '*'
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ "master" ]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
coverage:
|
|
15
|
+
name: Run test and generate coverage data
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
permissions:
|
|
18
|
+
pull-requests: write
|
|
19
|
+
contents: write
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: "Set-up: Python 3.10"
|
|
23
|
+
uses: actions/setup-python@v4
|
|
24
|
+
id: cp310
|
|
25
|
+
with:
|
|
26
|
+
python-version: "3.10"
|
|
27
|
+
|
|
28
|
+
- name: "Install: Dependencies for headless server"
|
|
29
|
+
shell: bash
|
|
30
|
+
run: |
|
|
31
|
+
sudo apt-get update
|
|
32
|
+
sudo apt-get install libgl1-mesa-glx xvfb
|
|
33
|
+
|
|
34
|
+
- name: "Checkout requirements and files for testing"
|
|
35
|
+
uses: actions/checkout@v4
|
|
36
|
+
with:
|
|
37
|
+
fetch-depth: 0
|
|
38
|
+
submodules: true
|
|
39
|
+
|
|
40
|
+
- name: Install everything, run the tests, produce the .coverage file
|
|
41
|
+
run: |
|
|
42
|
+
python -m pip install wheel build
|
|
43
|
+
python -m build --wheel
|
|
44
|
+
python -m pip install .[testing]
|
|
45
|
+
pytest
|
|
46
|
+
|
|
47
|
+
- name: Coverage comment
|
|
48
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
49
|
+
uses: py-cov-action/python-coverage-comment-action@v3
|
|
50
|
+
with:
|
|
51
|
+
GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }}
|
|
52
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
53
|
+
MINIMUM_GREEN: 90
|
|
54
|
+
MINIMUM_ORANGE: 50
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# .github/workflows/deploy_documentation.yml
|
|
2
|
+
name: Documentation
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [ "master" ]
|
|
7
|
+
tags:
|
|
8
|
+
- '*'
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ "master" ]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
documentation:
|
|
14
|
+
name: Run the documentation building tools
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
pull-requests: write
|
|
18
|
+
contents: write
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- name: "Set-up: Python 3.10"
|
|
22
|
+
uses: actions/setup-python@v4
|
|
23
|
+
id: cp310
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.10"
|
|
26
|
+
|
|
27
|
+
- name: "Install: Dependencies for headless server"
|
|
28
|
+
shell: bash
|
|
29
|
+
run: |
|
|
30
|
+
sudo apt-get update
|
|
31
|
+
sudo apt-get install libgl1-mesa-glx xvfb
|
|
32
|
+
|
|
33
|
+
- name: "Checkout requirements and files for testing"
|
|
34
|
+
uses: actions/checkout@v4
|
|
35
|
+
with:
|
|
36
|
+
fetch-depth: 0
|
|
37
|
+
submodules: true
|
|
38
|
+
|
|
39
|
+
- name: Install everything, run the tests, produce the .coverage file
|
|
40
|
+
run: |
|
|
41
|
+
python -m pip install wheel build
|
|
42
|
+
python -m build --wheel
|
|
43
|
+
python -m pip install .[documentation]
|
|
44
|
+
|
|
45
|
+
- name: "Build: documentation"
|
|
46
|
+
shell: bash
|
|
47
|
+
run: |
|
|
48
|
+
make -C docs html
|
|
49
|
+
|
|
50
|
+
- name: "Upload: GitHub Pages"
|
|
51
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
52
|
+
uses: crazy-max/ghaction-github-pages@v3
|
|
53
|
+
with:
|
|
54
|
+
target_branch: gh-pages
|
|
55
|
+
build_dir: docs/build/html
|
|
56
|
+
env:
|
|
57
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Deploy Wheel
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "master" ]
|
|
6
|
+
tags:
|
|
7
|
+
- '*'
|
|
8
|
+
pull_request:
|
|
9
|
+
branches: [ "master" ]
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build_pure_python:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: MartinPdeS/MPSActions/build_pure_python_package@master
|
|
19
|
+
with:
|
|
20
|
+
python-version: '3.10'
|
|
21
|
+
|
|
22
|
+
publish_wheel:
|
|
23
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
24
|
+
needs: [build_pure_python]
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- uses: MartinPdeS/MPSActions/publish_pypi@master
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.10"
|
|
30
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: PyFinitDiff
|
|
3
|
+
Version: 2.0.3.post0
|
|
4
|
+
Summary: A package finit-difference matrix generation.
|
|
5
|
+
Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2020 Martin de Sivry
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/MartinPdeS/PyFinitDiff
|
|
29
|
+
Project-URL: Documentation, https://pyfinitdiff.readthedocs.io/en/latest/
|
|
30
|
+
Project-URL: Repository, https://github.com/MartinPdeS/PyFinitDiff.git
|
|
31
|
+
Keywords: finit-difference,matrix
|
|
32
|
+
Classifier: Programming Language :: Python
|
|
33
|
+
Classifier: Programming Language :: Python :: 3
|
|
34
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
35
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
36
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
37
|
+
Classifier: Development Status :: 4 - Beta
|
|
38
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
39
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
40
|
+
Classifier: Intended Audience :: Science/Research
|
|
41
|
+
Requires-Python: >=3.10
|
|
42
|
+
Description-Content-Type: text/x-rst
|
|
43
|
+
License-File: LICENSE
|
|
44
|
+
Requires-Dist: pydantic>=2.6.3
|
|
45
|
+
Requires-Dist: numpy
|
|
46
|
+
Requires-Dist: scipy
|
|
47
|
+
Requires-Dist: MPSPlots
|
|
48
|
+
Requires-Dist: tabulate
|
|
49
|
+
Provides-Extra: testing
|
|
50
|
+
Requires-Dist: pytest>=0.6; extra == "testing"
|
|
51
|
+
Requires-Dist: pytest-cov>=2.0; extra == "testing"
|
|
52
|
+
Requires-Dist: pytest-json-report==1.5.0; extra == "testing"
|
|
53
|
+
Requires-Dist: mypy>=0.910; extra == "testing"
|
|
54
|
+
Requires-Dist: flake8>=3.9; extra == "testing"
|
|
55
|
+
Requires-Dist: tox>=3.24; extra == "testing"
|
|
56
|
+
Requires-Dist: coverage==7.6.1; extra == "testing"
|
|
57
|
+
Provides-Extra: documentation
|
|
58
|
+
Requires-Dist: numpydoc==1.8.0; extra == "documentation"
|
|
59
|
+
Requires-Dist: sphinx>=5.1.1; extra == "documentation"
|
|
60
|
+
Requires-Dist: sphinx-gallery==0.17.1; extra == "documentation"
|
|
61
|
+
Requires-Dist: sphinx-rtd-theme==2.0.0; extra == "documentation"
|
|
62
|
+
Requires-Dist: pydata-sphinx-theme==0.15.4; extra == "documentation"
|
|
63
|
+
|
|
64
|
+
PyFinitDiff
|
|
65
|
+
===========
|
|
66
|
+
|
|
67
|
+
|python| |docs| |coverage| |PyPi| |PyPi_download|
|
|
68
|
+
|
|
69
|
+
PyFinitDiff
|
|
70
|
+
===========
|
|
71
|
+
|
|
72
|
+
PyFinitDiff is a robust Python package designed to compute finite-difference matrices with an intuitive API. This package provides an efficient and user-friendly interface for generating finite-difference approximations, making it ideal for numerical analysis and scientific computing.
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
Features
|
|
76
|
+
********
|
|
77
|
+
- **Intuitive API**: PyFinitDiff offers an easy-to-use interface that allows users to generate finite-difference matrices with minimal effort.
|
|
78
|
+
- **Versatile Applications**: Suitable for a wide range of numerical methods including solving partial differential equations (PDEs), performing numerical differentiation, and more.
|
|
79
|
+
- **Comprehensive Documentation**: Detailed documentation and examples to help users get started quickly.
|
|
80
|
+
|
|
81
|
+
Installation
|
|
82
|
+
------------
|
|
83
|
+
|
|
84
|
+
PyFinitDiff requires Python 3.10+ and is available on PyPi for various operating systems including Linux and macOS.
|
|
85
|
+
|
|
86
|
+
Install PyFinitDiff via pip:
|
|
87
|
+
|
|
88
|
+
.. code-block:: bash
|
|
89
|
+
|
|
90
|
+
pip install PyFinitDiff
|
|
91
|
+
|
|
92
|
+
Documentation
|
|
93
|
+
*************
|
|
94
|
+
Comprehensive and up-to-date documentation is available online. You can access it `here <https://pyfinitdiff.readthedocs.io/en/latest/>`_ or by clicking the badge below:
|
|
95
|
+
|
|
96
|
+
|docs|
|
|
97
|
+
|
|
98
|
+
Usage Example
|
|
99
|
+
*************
|
|
100
|
+
|
|
101
|
+
Below is a simple example to illustrate how to use PyFinitDiff:
|
|
102
|
+
|
|
103
|
+
.. code-block:: python
|
|
104
|
+
|
|
105
|
+
from PyFinitDiff.finite_difference_1D import FiniteDifference
|
|
106
|
+
from PyFinitDiff.finite_difference_1D import Boundaries
|
|
107
|
+
|
|
108
|
+
boundaries = Boundaries(left='none', right='none')
|
|
109
|
+
|
|
110
|
+
n_x = 100
|
|
111
|
+
fd = FiniteDifference(
|
|
112
|
+
n_x=n_x,
|
|
113
|
+
dx=1,
|
|
114
|
+
derivative=2,
|
|
115
|
+
accuracy=2,
|
|
116
|
+
boundaries=boundaries
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
fd.triplet.plot()
|
|
120
|
+
|
|
121
|
+
dense_matrix = fd.triplet.to_scipy_sparse()
|
|
122
|
+
|
|
123
|
+
sparse_matrix = fd.triplet.to_scipy_sparse()
|
|
124
|
+
|
|
125
|
+
This would produce the following figure:
|
|
126
|
+
|
|
127
|
+
|example_triplet_0|
|
|
128
|
+
|
|
129
|
+
This example demonstrates the creation of a second-order finite-difference matrix with a specified grid spacing and size.
|
|
130
|
+
|
|
131
|
+
Testing
|
|
132
|
+
*******
|
|
133
|
+
|
|
134
|
+
To test PyFinitDiff locally, clone the GitHub repository and run the tests with coverage:
|
|
135
|
+
|
|
136
|
+
.. code-block:: bash
|
|
137
|
+
|
|
138
|
+
git clone https://github.com/MartinPdeS/PyFinitDiff.git
|
|
139
|
+
cd PyFinitDiff
|
|
140
|
+
pip install PyFinitDiff[testing]
|
|
141
|
+
pytest
|
|
142
|
+
|
|
143
|
+
Contributing
|
|
144
|
+
************
|
|
145
|
+
|
|
146
|
+
As PyFinitDiff is under continuous development, contributions are welcome! If you would like to collaborate or suggest improvements, feel free to fork the repository and submit a pull request. For major changes, please open an issue first to discuss your ideas.
|
|
147
|
+
|
|
148
|
+
Contact Information
|
|
149
|
+
********************
|
|
150
|
+
As of 2024, the project is still under development. If you want to collaborate, it would be a pleasure! I encourage you to contact me.
|
|
151
|
+
|
|
152
|
+
PyMieSim was written by `Martin Poinsinet de Sivry-Houle <https://github.com/MartinPdS>`_ .
|
|
153
|
+
|
|
154
|
+
Email:`martin.poinsinet.de.sivry@gmail.ca <mailto:martin.poinsinet.de.sivry@gmail.ca?subject=PyFinitDiff>`_ .
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
.. |python| image:: https://img.shields.io/pypi/pyversions/pyfinitdiff.svg
|
|
158
|
+
:target: https://www.python.org/
|
|
159
|
+
|
|
160
|
+
.. |example_triplet_0| image:: https://github.com/MartinPdeS/PyFinitDiff/blob/master/docs/images/triplet_example_0.png
|
|
161
|
+
:target: https://www.python.org/
|
|
162
|
+
|
|
163
|
+
.. |docs| image:: https://readthedocs.org/projects/pyfinitdiff/badge/?version=latest
|
|
164
|
+
:target: https://pyfinitdiff.readthedocs.io/en/latest/
|
|
165
|
+
:alt: Documentation Status
|
|
166
|
+
|
|
167
|
+
.. |coverage| image:: https://raw.githubusercontent.com/MartinPdeS/PyFinitDiff/python-coverage-comment-action-data/badge.svg
|
|
168
|
+
:alt: Unittest coverage
|
|
169
|
+
:target: https://htmlpreview.github.io/?https://github.com/MartinPdeS/PyFinitDiff/blob/python-coverage-comment-action-data/htmlcov/index.html
|
|
170
|
+
|
|
171
|
+
.. |PyPi| image:: https://badge.fury.io/py/PyFinitDiff.svg
|
|
172
|
+
:target: https://pypi.org/project/PyFinitDiff/
|
|
173
|
+
|
|
174
|
+
.. |PyPi_download| image:: https://img.shields.io/pypi/dm/pyfinitdiff.svg
|
|
175
|
+
:target: https://pypistats.org/packages/pyfinitdiff
|
|
@@ -12,5 +12,5 @@ __version__: str
|
|
|
12
12
|
__version_tuple__: VERSION_TUPLE
|
|
13
13
|
version_tuple: VERSION_TUPLE
|
|
14
14
|
|
|
15
|
-
__version__ = version = '2.0.
|
|
16
|
-
__version_tuple__ = version_tuple = (2, 0,
|
|
15
|
+
__version__ = version = '2.0.3.post0'
|
|
16
|
+
__version_tuple__ = version_tuple = (2, 0, 3)
|
{pyfinitdiff-2.0.0.post0 → pyfinitdiff-2.0.3.post0}/PyFinitDiff/finite_difference_2D/derivative.py
RENAMED
|
@@ -9,7 +9,6 @@ def get_array_derivative(
|
|
|
9
9
|
array: np.ndarray,
|
|
10
10
|
derivative: int,
|
|
11
11
|
accuracy: int = 4,
|
|
12
|
-
coefficient_type: str = 'central',
|
|
13
12
|
dx: float = 1,
|
|
14
13
|
dy: float = 1,
|
|
15
14
|
x_derivative: bool = True,
|
|
@@ -22,7 +21,6 @@ def get_array_derivative(
|
|
|
22
21
|
array (np.ndarray): The array for which to compute the nth derivative.
|
|
23
22
|
derivative (int): The order of the derivative.
|
|
24
23
|
accuracy (int, optional): The accuracy for the derivative. Defaults to 4.
|
|
25
|
-
coefficient_type (str, optional): The coefficient type. Defaults to 'central'.
|
|
26
24
|
dx (float, optional): The delta value in the x direction. Defaults to 1.
|
|
27
25
|
dy (float, optional): The delta value in the y direction. Defaults to 1.
|
|
28
26
|
x_derivative (bool, optional): Whether to compute the x derivative. Defaults to True.
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
from typing import NoReturn, Tuple, Union
|
|
5
|
+
import numpy
|
|
6
|
+
from scipy.sparse import coo_matrix
|
|
7
|
+
from dataclasses import dataclass
|
|
8
|
+
import matplotlib.pyplot as plt
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@dataclass
|
|
12
|
+
class Triplet:
|
|
13
|
+
shape: Tuple[int, int]
|
|
14
|
+
array: numpy.ndarray
|
|
15
|
+
add_extra_column: bool = False
|
|
16
|
+
|
|
17
|
+
def __post_init__(self):
|
|
18
|
+
"""
|
|
19
|
+
Post-initialization to ensure the correct shape of the input array and to handle optional
|
|
20
|
+
addition of an extra column to the array.
|
|
21
|
+
"""
|
|
22
|
+
self.array = numpy.atleast_2d(self.array)
|
|
23
|
+
self.shape = numpy.asarray(self.shape)
|
|
24
|
+
|
|
25
|
+
if self.add_extra_column:
|
|
26
|
+
self.array = numpy.c_[self.array, numpy.ones(self.array.shape[0])]
|
|
27
|
+
|
|
28
|
+
if self.array.shape[1] != 3:
|
|
29
|
+
raise ValueError("Array must have exactly 3 columns.")
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def index(self) -> numpy.ndarray:
|
|
33
|
+
"""Return the first two columns of the array, representing the indices."""
|
|
34
|
+
return self.array[:, :2].astype(int)
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def rows(self) -> numpy.ndarray:
|
|
38
|
+
"""Return the row indices (first column)."""
|
|
39
|
+
return self.array[:, 0].astype(int)
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def columns(self) -> numpy.ndarray:
|
|
43
|
+
"""Return the column indices (second column)."""
|
|
44
|
+
return self.array[:, 1].astype(int)
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def values(self) -> numpy.ndarray:
|
|
48
|
+
"""Return the values (third column)."""
|
|
49
|
+
return self.array[:, 2]
|
|
50
|
+
|
|
51
|
+
@values.setter
|
|
52
|
+
def values(self, value: Union[float, numpy.ndarray]) -> None:
|
|
53
|
+
"""Set the values in the array."""
|
|
54
|
+
self.array[:, 2] = value
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def size(self) -> int:
|
|
58
|
+
"""Return the number of entries in the triplet."""
|
|
59
|
+
return self.array.shape[0]
|
|
60
|
+
|
|
61
|
+
def remove_below_i(self, i_value: int) -> 'Triplet':
|
|
62
|
+
"""Remove all entries with row indices below i_value."""
|
|
63
|
+
self.array = self.array[self.rows > i_value]
|
|
64
|
+
return self
|
|
65
|
+
|
|
66
|
+
def remove_above_i(self, i_value: int) -> 'Triplet':
|
|
67
|
+
"""Remove all entries with row indices above i_value."""
|
|
68
|
+
self.array = self.array[self.rows < i_value]
|
|
69
|
+
return self
|
|
70
|
+
|
|
71
|
+
def remove_below_j(self, j_value: int) -> 'Triplet':
|
|
72
|
+
"""Remove all entries with column indices below j_value."""
|
|
73
|
+
self.array = self.array[self.columns > j_value]
|
|
74
|
+
return self
|
|
75
|
+
|
|
76
|
+
def remove_above_j(self, j_value: int) -> 'Triplet':
|
|
77
|
+
"""Remove all entries with column indices above j_value."""
|
|
78
|
+
self.array = self.array[self.columns < j_value]
|
|
79
|
+
return self
|
|
80
|
+
|
|
81
|
+
def delete(self, index: numpy.ndarray) -> None:
|
|
82
|
+
"""Delete entries at the given indices."""
|
|
83
|
+
self.array = numpy.delete(self.array, index.astype(int), axis=0)
|
|
84
|
+
|
|
85
|
+
def append(self, other: 'Triplet') -> None:
|
|
86
|
+
"""Append another triplet to this one."""
|
|
87
|
+
self.array = numpy.r_[self.array, other.array]
|
|
88
|
+
|
|
89
|
+
def append_array(self, array: numpy.ndarray) -> None:
|
|
90
|
+
"""Append a NumPy array to this triplet."""
|
|
91
|
+
self.array = numpy.r_[self.array, array]
|
|
92
|
+
|
|
93
|
+
def __add__(self, other: 'Triplet') -> 'Triplet':
|
|
94
|
+
"""Concatenate two triplets and merge any duplicate indices."""
|
|
95
|
+
combined_array = numpy.r_[self.array, other.array]
|
|
96
|
+
return Triplet(array=combined_array, shape=self.shape).remove_duplicate()
|
|
97
|
+
|
|
98
|
+
def __mul__(self, factor: float) -> 'Triplet':
|
|
99
|
+
"""Multiply all values in the triplet by a factor."""
|
|
100
|
+
return Triplet(array=self.array * [1, 1, factor], shape=self.shape)
|
|
101
|
+
|
|
102
|
+
__rmul__ = __mul__
|
|
103
|
+
|
|
104
|
+
def remove_duplicate(self) -> 'Triplet':
|
|
105
|
+
"""Remove duplicate entries by summing their values."""
|
|
106
|
+
new_array = self.array
|
|
107
|
+
index_to_delete = []
|
|
108
|
+
duplicate = self.get_duplicate_index()
|
|
109
|
+
|
|
110
|
+
if duplicate.size == 0:
|
|
111
|
+
return Triplet(array=self.array, shape=self.shape)
|
|
112
|
+
|
|
113
|
+
for duplicate in duplicate:
|
|
114
|
+
index_to_keep = duplicate[0]
|
|
115
|
+
for index_to_merge in duplicate[1:]:
|
|
116
|
+
index_to_delete.append(index_to_merge)
|
|
117
|
+
new_array[index_to_keep, 2] += new_array[index_to_merge, 2]
|
|
118
|
+
|
|
119
|
+
triplet_array = numpy.delete(new_array, index_to_delete, axis=0)
|
|
120
|
+
|
|
121
|
+
return Triplet(array=triplet_array, shape=self.shape)
|
|
122
|
+
|
|
123
|
+
def coincide_i(self, mask: 'Triplet') -> None:
|
|
124
|
+
"""Remove entries whose row indices do not coincide with those in the mask."""
|
|
125
|
+
mask_i_unique = numpy.unique(mask.rows[mask.values != 0])
|
|
126
|
+
self.array = numpy.vstack([self.array[self.rows == i] for i in mask_i_unique])
|
|
127
|
+
|
|
128
|
+
def __sub__(self, other: 'Triplet') -> 'Triplet':
|
|
129
|
+
"""Subtract another triplet by removing matching row indices."""
|
|
130
|
+
non_matching_indices = ~numpy.isin(self.rows, other.rows)
|
|
131
|
+
return Triplet(array=self.array[non_matching_indices], shape=self.shape)
|
|
132
|
+
|
|
133
|
+
def __iter__(self):
|
|
134
|
+
"""Iterator to yield the indices and values as tuples."""
|
|
135
|
+
return iter((int(i), int(j), value) for i, j, value in self.array)
|
|
136
|
+
|
|
137
|
+
def enumerate(self, start: int = 0, stop: int = None):
|
|
138
|
+
"""Enumerate over the entries, yielding an index and the entry values."""
|
|
139
|
+
for idx, (i, j, value) in enumerate(self.array[start:stop], start=start):
|
|
140
|
+
yield idx, (int(i), int(j), value)
|
|
141
|
+
|
|
142
|
+
def merge_duplicate(self) -> None:
|
|
143
|
+
"""Merge duplicate entries by summing their values."""
|
|
144
|
+
duplicates = self.get_duplicate_index()
|
|
145
|
+
if duplicates.size == 0:
|
|
146
|
+
return
|
|
147
|
+
for duplicate in duplicates:
|
|
148
|
+
first_idx = duplicate[0]
|
|
149
|
+
self.array[first_idx, 2] = self.array[duplicate, 2].sum()
|
|
150
|
+
self.delete(duplicate[1:])
|
|
151
|
+
|
|
152
|
+
def get_duplicate_index(self) -> numpy.ndarray:
|
|
153
|
+
"""Get indices of duplicate entries."""
|
|
154
|
+
unique_indices, inverse_indices, counts = numpy.unique(self.index, axis=0, return_inverse=True, return_counts=True)
|
|
155
|
+
duplicate_indices = numpy.where(counts > 1)[0]
|
|
156
|
+
return numpy.array([numpy.where(inverse_indices == idx)[0] for idx in duplicate_indices], dtype=object)
|
|
157
|
+
|
|
158
|
+
@property
|
|
159
|
+
def max_i(self) -> int:
|
|
160
|
+
"""Return the maximum row index."""
|
|
161
|
+
return self.rows.max()
|
|
162
|
+
|
|
163
|
+
@property
|
|
164
|
+
def max_j(self) -> int:
|
|
165
|
+
"""Return the maximum column index."""
|
|
166
|
+
return self.columns.max()
|
|
167
|
+
|
|
168
|
+
@property
|
|
169
|
+
def min_i(self) -> int:
|
|
170
|
+
"""Return the minimum row index."""
|
|
171
|
+
return self.rows.min()
|
|
172
|
+
|
|
173
|
+
@property
|
|
174
|
+
def min_j(self) -> int:
|
|
175
|
+
"""Return the minimum column index."""
|
|
176
|
+
return self.columns.min()
|
|
177
|
+
|
|
178
|
+
@property
|
|
179
|
+
def diagonal(self) -> numpy.ndarray:
|
|
180
|
+
"""Return the diagonal elements of the triplet."""
|
|
181
|
+
return self.array[self.rows == self.columns]
|
|
182
|
+
|
|
183
|
+
def shift_diagonal(self, value: float) -> 'Triplet':
|
|
184
|
+
"""Shift the diagonal elements by a specified value."""
|
|
185
|
+
diagonal_triplet = DiagonalTriplet(numpy.ones(min(self.max_i, self.max_j)) * value, shape=self.shape)
|
|
186
|
+
return self + diagonal_triplet
|
|
187
|
+
|
|
188
|
+
def update_elements(self, other_triplet: 'Triplet', i_range: slice) -> 'Triplet':
|
|
189
|
+
"""Update elements within a specified range."""
|
|
190
|
+
self.array[i_range, :] = other_triplet.array[i_range, :]
|
|
191
|
+
return self
|
|
192
|
+
|
|
193
|
+
def to_dense(self) -> numpy.ndarray:
|
|
194
|
+
"""Convert the triplet to a dense matrix representation."""
|
|
195
|
+
return self.to_scipy_sparse().toarray()
|
|
196
|
+
|
|
197
|
+
def plot(self) -> NoReturn:
|
|
198
|
+
"""Plot the dense matrix representation of the triplet."""
|
|
199
|
+
plt.figure()
|
|
200
|
+
plt.title('Finite-difference coefficients structure')
|
|
201
|
+
plt.xlabel('Columns')
|
|
202
|
+
plt.ylabel('Rows')
|
|
203
|
+
|
|
204
|
+
dense_matrix = numpy.flip(self.to_dense(), axis=0)
|
|
205
|
+
plt.pcolormesh(dense_matrix, cmap='Blues')
|
|
206
|
+
plt.gca().set_aspect('equal')
|
|
207
|
+
plt.grid(True)
|
|
208
|
+
plt.colorbar()
|
|
209
|
+
plt.show()
|
|
210
|
+
|
|
211
|
+
def to_scipy_sparse(self) -> coo_matrix:
|
|
212
|
+
"""Convert the triplet to a SciPy sparse matrix."""
|
|
213
|
+
return coo_matrix((self.values, (self.rows, self.columns)), shape=(numpy.prod(self.shape),) * 2)
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
class DiagonalTriplet(Triplet):
|
|
217
|
+
def __init__(self, mesh: numpy.ndarray, shape: Tuple[int, int]):
|
|
218
|
+
size = mesh.size
|
|
219
|
+
triplet_array = numpy.column_stack((numpy.arange(size), numpy.arange(size), mesh.ravel()))
|
|
220
|
+
super().__init__(array=triplet_array, shape=shape)
|
|
221
|
+
|