PyFinitDiff 1.3.1.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-1.3.1.post0/.github/dependabot.yml +11 -0
- pyfinitdiff-1.3.1.post0/.github/workflows/deploy_workflow.yml +54 -0
- pyfinitdiff-1.3.1.post0/.gitignore +29 -0
- pyfinitdiff-1.3.1.post0/.readthedocs.yml +35 -0
- pyfinitdiff-1.3.1.post0/LICENSE +21 -0
- pyfinitdiff-1.3.1.post0/PKG-INFO +146 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/__init__.py +8 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/_version.py +16 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/coefficients/__init__.py +130 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/coefficients/backward.py +86 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/coefficients/central.py +104 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/coefficients/forward.py +87 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/finite_difference_1D/__init__.py +6 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/finite_difference_1D/boundaries.py +190 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/finite_difference_1D/derivative.py +44 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/finite_difference_1D/diagonals.py +250 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/finite_difference_1D/finite_difference.py +189 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/finite_difference_1D/utils.py +54 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/finite_difference_2D/__init__.py +6 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/finite_difference_2D/boundaries.py +214 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/finite_difference_2D/dense.py +238 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/finite_difference_2D/derivative.py +53 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/finite_difference_2D/diagonals.py +315 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/finite_difference_2D/finite_difference.py +206 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/finite_difference_2D/utils.py +68 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/tools/__init__.py +0 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/tools/directories.py +41 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/triplet.py +449 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff/utils.py +106 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff.egg-info/PKG-INFO +146 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff.egg-info/SOURCES.txt +197 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff.egg-info/dependency_links.txt +1 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff.egg-info/requires.txt +23 -0
- pyfinitdiff-1.3.1.post0/PyFinitDiff.egg-info/top_level.txt +1 -0
- pyfinitdiff-1.3.1.post0/README.rst +84 -0
- pyfinitdiff-1.3.1.post0/benchmarks/benchmark_0.py +109 -0
- pyfinitdiff-1.3.1.post0/docs/Makefile +19 -0
- pyfinitdiff-1.3.1.post0/docs/examples/README.rst +6 -0
- pyfinitdiff-1.3.1.post0/docs/examples/__init__.py +0 -0
- pyfinitdiff-1.3.1.post0/docs/examples/eigenmodes_1d/README.rst +2 -0
- pyfinitdiff-1.3.1.post0/docs/examples/eigenmodes_1d/plot_mode_0.py +64 -0
- pyfinitdiff-1.3.1.post0/docs/examples/eigenmodes_1d/plot_mode_1.py +60 -0
- pyfinitdiff-1.3.1.post0/docs/examples/eigenmodes_1d/plot_mode_2.py +61 -0
- pyfinitdiff-1.3.1.post0/docs/examples/eigenmodes_1d/plot_mode_3.py +61 -0
- pyfinitdiff-1.3.1.post0/docs/examples/eigenmodes_2d/README.rst +2 -0
- pyfinitdiff-1.3.1.post0/docs/examples/eigenmodes_2d/plot_bottom_anti_symmetric.py +66 -0
- pyfinitdiff-1.3.1.post0/docs/examples/eigenmodes_2d/plot_bottom_symmetric.py +61 -0
- pyfinitdiff-1.3.1.post0/docs/examples/eigenmodes_2d/plot_left_anti_symmetric.py +66 -0
- pyfinitdiff-1.3.1.post0/docs/examples/eigenmodes_2d/plot_left_symmetric.py +63 -0
- pyfinitdiff-1.3.1.post0/docs/examples/eigenmodes_2d/plot_no_symmetry.py +63 -0
- pyfinitdiff-1.3.1.post0/docs/examples/eigenmodes_2d/plot_right_anti_symmetric.py +64 -0
- pyfinitdiff-1.3.1.post0/docs/examples/eigenmodes_2d/plot_right_symmetric.py +65 -0
- pyfinitdiff-1.3.1.post0/docs/examples/eigenmodes_2d/plot_top_anti_symmetric.py +65 -0
- pyfinitdiff-1.3.1.post0/docs/examples/eigenmodes_2d/plot_top_symmetric.py +66 -0
- pyfinitdiff-1.3.1.post0/docs/examples/extras/README.rst +2 -0
- pyfinitdiff-1.3.1.post0/docs/examples/extras/gradient.py +53 -0
- pyfinitdiff-1.3.1.post0/docs/examples/extras/plot_WM_field.py +98 -0
- pyfinitdiff-1.3.1.post0/docs/examples/triplets/README.rst +2 -0
- pyfinitdiff-1.3.1.post0/docs/examples/triplets/plot_triplets_0.py +32 -0
- pyfinitdiff-1.3.1.post0/docs/examples/triplets/plot_triplets_1.py +34 -0
- pyfinitdiff-1.3.1.post0/docs/examples/triplets/plot_triplets_2.py +34 -0
- pyfinitdiff-1.3.1.post0/docs/examples/triplets/plot_triplets_3.py +33 -0
- pyfinitdiff-1.3.1.post0/docs/images/logo.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/make.bat +35 -0
- pyfinitdiff-1.3.1.post0/docs/source/_static/default.css +19 -0
- pyfinitdiff-1.3.1.post0/docs/source/code.rst +33 -0
- pyfinitdiff-1.3.1.post0/docs/source/conf.py +166 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/images/sphx_glr_plot_mode_0_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/images/sphx_glr_plot_mode_1_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/images/sphx_glr_plot_mode_2_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/images/sphx_glr_plot_mode_3_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/images/thumb/sphx_glr_plot_mode_0_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/images/thumb/sphx_glr_plot_mode_1_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/images/thumb/sphx_glr_plot_mode_2_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/images/thumb/sphx_glr_plot_mode_3_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/index.rst +94 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_0.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_0.py +64 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_0.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_0.rst +128 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_1.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_1.py +60 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_1.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_1.rst +386 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_2.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_2.py +61 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_2.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_2.rst +387 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_3.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_3.py +61 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_3.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/plot_mode_3.rst +387 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_1d/sg_execution_times.rst +19 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_bottom_anti_symmetric_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_bottom_symmetric_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_left_anti_symmetric_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_left_symmetric_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_no_symmetry_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_right_anti_symmetric_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_right_symmetric_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_top_anti_symmetric_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/sphx_glr_plot_top_symmetric_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_bottom_anti_symmetric_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_bottom_symmetric_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_left_anti_symmetric_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_left_symmetric_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_no_symmetry_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_right_anti_symmetric_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_right_symmetric_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_top_anti_symmetric_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/images/thumb/sphx_glr_plot_top_symmetric_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/index.rst +184 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_bottom_anti_symmetric.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_bottom_anti_symmetric.py +66 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_bottom_anti_symmetric.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_bottom_anti_symmetric.rst +296 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_bottom_symmetric.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_bottom_symmetric.py +61 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_bottom_symmetric.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_bottom_symmetric.rst +291 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_left_anti_symmetric.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_left_anti_symmetric.py +66 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_left_anti_symmetric.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_left_anti_symmetric.rst +296 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_left_symmetric.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_left_symmetric.py +63 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_left_symmetric.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_left_symmetric.rst +293 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_no_symmetry.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_no_symmetry.py +63 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_no_symmetry.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_no_symmetry.rst +293 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_right_anti_symmetric.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_right_anti_symmetric.py +64 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_right_anti_symmetric.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_right_anti_symmetric.rst +294 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_right_symmetric.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_right_symmetric.py +65 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_right_symmetric.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_right_symmetric.rst +295 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_top_anti_symmetric.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_top_anti_symmetric.py +65 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_top_anti_symmetric.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_top_anti_symmetric.rst +295 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_top_symmetric.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_top_symmetric.py +66 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_top_symmetric.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/plot_top_symmetric.rst +264 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/eigenmodes_2d/sg_execution_times.rst +29 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/extras/gradient.ipynb +43 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/extras/gradient.py +53 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/extras/gradient.rst +105 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/extras/images/sphx_glr_plot_WM_field_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/extras/images/thumb/sphx_glr_gradient_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/extras/images/thumb/sphx_glr_plot_WM_field_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/extras/index.rst +58 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/extras/plot_WM_field.ipynb +43 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/extras/plot_WM_field.py +98 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/extras/plot_WM_field.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/extras/plot_WM_field.rst +351 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/extras/sg_execution_times.rst +15 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/index.rst +412 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/images/sphx_glr_plot_triplets_0_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/images/sphx_glr_plot_triplets_1_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/images/sphx_glr_plot_triplets_2_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/images/sphx_glr_plot_triplets_3_001.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/images/thumb/sphx_glr_plot_triplets_0_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/images/thumb/sphx_glr_plot_triplets_1_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/images/thumb/sphx_glr_plot_triplets_2_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/images/thumb/sphx_glr_plot_triplets_3_thumb.png +0 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/index.rst +94 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_0.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_0.py +32 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_0.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_0.rst +97 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_1.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_1.py +34 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_1.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_1.rst +99 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_2.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_2.py +34 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_2.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_2.rst +99 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_3.ipynb +50 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_3.py +33 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_3.py.md5 +1 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/plot_triplets_3.rst +98 -0
- pyfinitdiff-1.3.1.post0/docs/source/gallery/triplets/sg_execution_times.rst +19 -0
- pyfinitdiff-1.3.1.post0/docs/source/index.rst +16 -0
- pyfinitdiff-1.3.1.post0/docs/source/references.rst +8 -0
- pyfinitdiff-1.3.1.post0/docs/source/theory.rst +7 -0
- pyfinitdiff-1.3.1.post0/pyproject.toml +67 -0
- pyfinitdiff-1.3.1.post0/setup.cfg +4 -0
- pyfinitdiff-1.3.1.post0/tests/__init__.py +0 -0
- pyfinitdiff-1.3.1.post0/tests/test_1D_api.py +36 -0
- pyfinitdiff-1.3.1.post0/tests/test_1D_derivative.py +60 -0
- pyfinitdiff-1.3.1.post0/tests/test_2D_api.py +44 -0
- pyfinitdiff-1.3.1.post0/tests/test_2D_derivative.py +76 -0
- pyfinitdiff-1.3.1.post0/tests/test_2D_eigen.py +58 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Deploy
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "master" ]
|
|
6
|
+
tags:
|
|
7
|
+
- '*'
|
|
8
|
+
pull_request:
|
|
9
|
+
branches: [ "master" ]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build_pure_python:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: MartinPdeS/MPSActions/build_pure_python_package@master
|
|
20
|
+
with:
|
|
21
|
+
python-version: '3.11'
|
|
22
|
+
|
|
23
|
+
publish_coverage:
|
|
24
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
25
|
+
needs: [build_pure_python]
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- uses: MartinPdeS/MPSActions/publish_coverage@master
|
|
29
|
+
with:
|
|
30
|
+
package-name: PyFinitDiff
|
|
31
|
+
python-version: "3.11"
|
|
32
|
+
auth: ${{ secrets.GIST_TOKEN }}
|
|
33
|
+
gistID: 19aef38017fa4be1dc71b6f5d853a932
|
|
34
|
+
|
|
35
|
+
publish_documentation:
|
|
36
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
37
|
+
needs: [build_pure_python]
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
steps:
|
|
40
|
+
- uses: MartinPdeS/MPSActions/publish_documentation@master
|
|
41
|
+
with:
|
|
42
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
43
|
+
package-name: PyFinitDiff
|
|
44
|
+
python-version: "3.11" #no documentation for python 3.7 (pickle5 not present˘)
|
|
45
|
+
|
|
46
|
+
publish_wheel:
|
|
47
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
48
|
+
needs: [build_pure_python, publish_documentation, publish_coverage]
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
steps:
|
|
51
|
+
- uses: MartinPdeS/MPSActions/publish_pypi@master
|
|
52
|
+
with:
|
|
53
|
+
python-version: "3.11"
|
|
54
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
*.DS_store
|
|
2
|
+
*.ipynb_checkpoints*
|
|
3
|
+
*__pycache__*
|
|
4
|
+
*.so
|
|
5
|
+
*.a
|
|
6
|
+
*.pdf
|
|
7
|
+
*.pickle
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
.tox
|
|
11
|
+
.coverage.*
|
|
12
|
+
coverage.json
|
|
13
|
+
htmlcov
|
|
14
|
+
*.pytest_cache
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
dist
|
|
18
|
+
build
|
|
19
|
+
*.egg*
|
|
20
|
+
*.whl
|
|
21
|
+
.pdf
|
|
22
|
+
Perso/
|
|
23
|
+
docs/source/ExampleGallery
|
|
24
|
+
|
|
25
|
+
CMakeCache.txt
|
|
26
|
+
CMakeFiles
|
|
27
|
+
./Makefile
|
|
28
|
+
install_manifest.txt
|
|
29
|
+
cmake_install.cmake
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# .readthedocs.yml
|
|
2
|
+
# Read the Docs configuration file
|
|
3
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
4
|
+
|
|
5
|
+
# Required
|
|
6
|
+
version: 2
|
|
7
|
+
|
|
8
|
+
submodules:
|
|
9
|
+
include: all
|
|
10
|
+
recursive: true
|
|
11
|
+
|
|
12
|
+
build:
|
|
13
|
+
os: ubuntu-22.04
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
tools:
|
|
17
|
+
python: "3.11"
|
|
18
|
+
jobs:
|
|
19
|
+
pre_install:
|
|
20
|
+
- Xvfb :99 &
|
|
21
|
+
- export DISPLAY=:99
|
|
22
|
+
- cd docs && rm -rf source/gallery
|
|
23
|
+
- sleep 3
|
|
24
|
+
|
|
25
|
+
python:
|
|
26
|
+
install:
|
|
27
|
+
- method: pip
|
|
28
|
+
path: .
|
|
29
|
+
extra_requirements:
|
|
30
|
+
- documentation
|
|
31
|
+
|
|
32
|
+
sphinx:
|
|
33
|
+
builder: html
|
|
34
|
+
configuration: docs/source/conf.py
|
|
35
|
+
fail_on_warning: false
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Martin de Sivry
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: PyFinitDiff
|
|
3
|
+
Version: 1.3.1.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
|
+
Keywords: finit-difference,matrix
|
|
29
|
+
Classifier: Programming Language :: Python
|
|
30
|
+
Classifier: Programming Language :: Python :: 3
|
|
31
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
32
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
33
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
34
|
+
Classifier: Development Status :: 4 - Beta
|
|
35
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
36
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
37
|
+
Classifier: Intended Audience :: Science/Research
|
|
38
|
+
Requires-Python: >=3.10
|
|
39
|
+
Description-Content-Type: text/x-rst
|
|
40
|
+
License-File: LICENSE
|
|
41
|
+
Requires-Dist: pydantic>=2.6.3
|
|
42
|
+
Requires-Dist: numpy
|
|
43
|
+
Requires-Dist: scipy
|
|
44
|
+
Requires-Dist: MPSPlots>=1.4.5
|
|
45
|
+
Requires-Dist: tabulate
|
|
46
|
+
Provides-Extra: testing
|
|
47
|
+
Requires-Dist: PyFiberModes; extra == "testing"
|
|
48
|
+
Requires-Dist: pytest>=0.6; extra == "testing"
|
|
49
|
+
Requires-Dist: pytest-cov>=2.0; extra == "testing"
|
|
50
|
+
Requires-Dist: pytest-json-report==1.5.0; extra == "testing"
|
|
51
|
+
Requires-Dist: mypy>=0.910; extra == "testing"
|
|
52
|
+
Requires-Dist: flake8>=3.9; extra == "testing"
|
|
53
|
+
Requires-Dist: tox>=3.24; extra == "testing"
|
|
54
|
+
Requires-Dist: coverage==6.5.0; extra == "testing"
|
|
55
|
+
Provides-Extra: documentation
|
|
56
|
+
Requires-Dist: PyFiberModes; extra == "documentation"
|
|
57
|
+
Requires-Dist: numpydoc==1.6.0; extra == "documentation"
|
|
58
|
+
Requires-Dist: sphinx>=5.1.1; extra == "documentation"
|
|
59
|
+
Requires-Dist: sphinx-gallery==0.15.0; extra == "documentation"
|
|
60
|
+
Requires-Dist: sphinx-rtd-theme==2.0.0; extra == "documentation"
|
|
61
|
+
Requires-Dist: pydata-sphinx-theme==0.14.1; extra == "documentation"
|
|
62
|
+
|
|
63
|
+
PyFinitDiff
|
|
64
|
+
===========
|
|
65
|
+
|
|
66
|
+
|python|
|
|
67
|
+
|docs|
|
|
68
|
+
|unittest|
|
|
69
|
+
|PyPi|
|
|
70
|
+
|PyPi_download|
|
|
71
|
+
|
|
72
|
+
A Python package to compute finit-difference matrices with an intuitive API.
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
----
|
|
76
|
+
|
|
77
|
+
Documentation
|
|
78
|
+
**************
|
|
79
|
+
All the latest available documentation is available `here <https://pyfinitdiff.readthedocs.io/en/latest/>`_ or you can click the following badge:
|
|
80
|
+
|
|
81
|
+
|docs|
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
----
|
|
85
|
+
|
|
86
|
+
Installation
|
|
87
|
+
------------
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
Pip installation
|
|
91
|
+
****************
|
|
92
|
+
|
|
93
|
+
The package have been uploaded as wheel for a few OS (Linux, MacOS) and need Python 3.10+ version.
|
|
94
|
+
As such, with the adequate configuration one can simply do
|
|
95
|
+
|
|
96
|
+
.. code-block:: python
|
|
97
|
+
|
|
98
|
+
>>> pip3 install PyFinitDiff
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
----
|
|
102
|
+
|
|
103
|
+
Testing
|
|
104
|
+
*******
|
|
105
|
+
|
|
106
|
+
To test localy (with cloning the GitHub repository) you'll need to install the dependencies and run the coverage command as
|
|
107
|
+
|
|
108
|
+
.. code:: python
|
|
109
|
+
|
|
110
|
+
>>> git clone https://github.com/MartinPdeS/PyFinitDiff.git
|
|
111
|
+
>>> cd PyFinitDiff
|
|
112
|
+
>>> pip install -r requirements/requirements.txt
|
|
113
|
+
>>> coverage run --source=PyFinitDiff --module pytest --verbose tests
|
|
114
|
+
>>> coverage report --show-missing
|
|
115
|
+
|
|
116
|
+
----
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
Contact Information
|
|
120
|
+
*******************
|
|
121
|
+
|
|
122
|
+
As of 2021 the project is still under development if you want to collaborate it would be a pleasure. I encourage you to contact me.
|
|
123
|
+
|
|
124
|
+
PyFinitDiff was written by `Martin Poinsinet de Sivry-Houle <https://github.com/MartinPdS>`_ .
|
|
125
|
+
|
|
126
|
+
Email:`martin.poinsinet-de-sivry@polymtl.ca <mailto:martin.poinsinet-de-sivry@polymtl.ca?subject=PyFinitDiff>`_ .
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
.. |python| image:: https://img.shields.io/badge/Made%20with-Python-1f425f.svg
|
|
130
|
+
:target: https://www.python.org/
|
|
131
|
+
|
|
132
|
+
.. |docs| image:: https://readthedocs.org/projects/pyfinitdiff/badge/?version=latest
|
|
133
|
+
:target: https://pyfinitdiff.readthedocs.io/en/latest/
|
|
134
|
+
:alt: Documentation Status
|
|
135
|
+
|
|
136
|
+
.. |unittest| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/MartinPdeS/19aef38017fa4be1dc71b6f5d853a932/raw
|
|
137
|
+
|
|
138
|
+
.. |PyPi| image:: https://badge.fury.io/py/PyFinitDiff.svg
|
|
139
|
+
:target: https://pypi.org/project/PyFinitDiff/
|
|
140
|
+
|
|
141
|
+
.. |PyPi_download| image:: https://img.shields.io/pypi/dm/pyfinitdiff.svg
|
|
142
|
+
:target: https://pypistats.org/packages/pyfinitdiff
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# file generated by setuptools_scm
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
TYPE_CHECKING = False
|
|
4
|
+
if TYPE_CHECKING:
|
|
5
|
+
from typing import Tuple, Union
|
|
6
|
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
7
|
+
else:
|
|
8
|
+
VERSION_TUPLE = object
|
|
9
|
+
|
|
10
|
+
version: str
|
|
11
|
+
__version__: str
|
|
12
|
+
__version_tuple__: VERSION_TUPLE
|
|
13
|
+
version_tuple: VERSION_TUPLE
|
|
14
|
+
|
|
15
|
+
__version__ = version = '1.3.1.post0'
|
|
16
|
+
__version_tuple__ = version_tuple = (1, 3, 1)
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass
|
|
5
|
+
from tabulate import tabulate
|
|
6
|
+
import numpy
|
|
7
|
+
|
|
8
|
+
from .central import coefficients as central_coefficent
|
|
9
|
+
from .forward import coefficients as forward_coefficent
|
|
10
|
+
from .backward import coefficients as backward_coefficent
|
|
11
|
+
|
|
12
|
+
from . import central, forward, backward
|
|
13
|
+
|
|
14
|
+
__accuracy_list__ = [2, 4, 6]
|
|
15
|
+
__derivative_list__ = [1, 2]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Singleton(type):
|
|
19
|
+
_instances = {}
|
|
20
|
+
|
|
21
|
+
def __call__(cls, *args, **kwargs):
|
|
22
|
+
if cls not in cls._instances:
|
|
23
|
+
cls._instances[cls] = super().__call__(*args, **kwargs)
|
|
24
|
+
return cls._instances[cls]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@dataclass
|
|
28
|
+
class FiniteCoefficients():
|
|
29
|
+
derivative: int
|
|
30
|
+
""" The order of the derivative to consider """
|
|
31
|
+
accuracy: int
|
|
32
|
+
""" The accuracy of the finit difference """
|
|
33
|
+
coefficient_type: str = 'central'
|
|
34
|
+
""" Type of coefficient, has to be either 'central', 'forward' or 'backward' """
|
|
35
|
+
|
|
36
|
+
def __setattr__(self, attribute, value):
|
|
37
|
+
if attribute == "coefficient_type":
|
|
38
|
+
assert value in ['central', 'forward', 'backward']
|
|
39
|
+
super().__setattr__(attribute, value)
|
|
40
|
+
|
|
41
|
+
if attribute == "accuracy":
|
|
42
|
+
assert value in self.module.__accuracy_list__, f"Accuracy: {value} is not avaible for this configuration. Valid in put: {self.module.__accuracy_list__}"
|
|
43
|
+
super().__setattr__(attribute, value)
|
|
44
|
+
|
|
45
|
+
if attribute == "derivative":
|
|
46
|
+
assert value in self.module.__derivative_list__, f"Derivative: {value} is not avaible for this configuration. Valid in put: {self.module.__derivative_list__}"
|
|
47
|
+
super().__setattr__(attribute, value)
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def derivative_string(self) -> str:
|
|
51
|
+
return f'd{self.derivative}'
|
|
52
|
+
|
|
53
|
+
@property
|
|
54
|
+
def accuracy_string(self) -> str:
|
|
55
|
+
return f'a{self.accuracy}'
|
|
56
|
+
|
|
57
|
+
@property
|
|
58
|
+
def central(self) -> dict:
|
|
59
|
+
return central_coefficent[self.derivative_string][self.accuracy_string]
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def forward(self) -> dict:
|
|
63
|
+
return forward_coefficent[self.derivative_string][self.accuracy_string]
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def backward(self) -> dict:
|
|
67
|
+
return backward_coefficent[self.derivative_string][self.accuracy_string]
|
|
68
|
+
|
|
69
|
+
def get_coeffcient(self) -> numpy.ndarray:
|
|
70
|
+
"""
|
|
71
|
+
Gets the finit difference coeffcients.
|
|
72
|
+
|
|
73
|
+
:returns: The coeffcient.
|
|
74
|
+
:rtype: numpy.ndarray
|
|
75
|
+
"""
|
|
76
|
+
coefficients_dictionnary = self.module.coefficients
|
|
77
|
+
|
|
78
|
+
coefficients_array = coefficients_dictionnary[self.derivative_string][self.accuracy_string]
|
|
79
|
+
|
|
80
|
+
coefficients_array = numpy.array(coefficients_array)
|
|
81
|
+
|
|
82
|
+
reduced_coefficients = coefficients_array[coefficients_array[:, 1] != 0]
|
|
83
|
+
|
|
84
|
+
return reduced_coefficients
|
|
85
|
+
|
|
86
|
+
@property
|
|
87
|
+
def array(self) -> numpy.ndarray:
|
|
88
|
+
return self.get_coeffcient()
|
|
89
|
+
|
|
90
|
+
@property
|
|
91
|
+
def module(self) -> object:
|
|
92
|
+
"""
|
|
93
|
+
Returns the right module depending on which type of coefficient ones need.
|
|
94
|
+
The method also asserts that the right accuracy and derivative exists on that module.
|
|
95
|
+
|
|
96
|
+
:returns: The module.
|
|
97
|
+
:rtype: object
|
|
98
|
+
"""
|
|
99
|
+
match self.coefficient_type.lower():
|
|
100
|
+
case 'central':
|
|
101
|
+
return central
|
|
102
|
+
case 'forward':
|
|
103
|
+
return forward
|
|
104
|
+
case 'backward':
|
|
105
|
+
return backward
|
|
106
|
+
|
|
107
|
+
assert self.accuracy in self.module.__accuracy_list__, f'Error accuracy: {self.accuracy} has to be in the list {self.module.__accuracy_list__}'
|
|
108
|
+
assert self.derivative in self.module.__derivative_list__, f'Error derivative: {self.derivative} has to be in the list {self.module.__derivative_list__}'
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def index(self) -> numpy.ndarray:
|
|
112
|
+
return self.array[:, 0]
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def max_central_index(self) -> int:
|
|
116
|
+
return self.index.max()
|
|
117
|
+
|
|
118
|
+
@property
|
|
119
|
+
def values(self) -> numpy.ndarray:
|
|
120
|
+
return self.array[:, 1]
|
|
121
|
+
|
|
122
|
+
def __iter__(self) -> tuple[int, float]:
|
|
123
|
+
for index, values in zip(self.index, self.values):
|
|
124
|
+
yield index, values
|
|
125
|
+
|
|
126
|
+
def print(self):
|
|
127
|
+
table = tabulate(self.array, headers=['index', 'value'])
|
|
128
|
+
print(table)
|
|
129
|
+
|
|
130
|
+
# -
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
|
|
2
|
+
__accuracy_list__ = [2, 4, 6]
|
|
3
|
+
__derivative_list__ = [1, 2, 3]
|
|
4
|
+
|
|
5
|
+
coefficients = {
|
|
6
|
+
'd1': {
|
|
7
|
+
'a2': (
|
|
8
|
+
(+0, +3.0 / 2.0),
|
|
9
|
+
(-1, -2.0),
|
|
10
|
+
(-2, +1.0 / 2.0),
|
|
11
|
+
),
|
|
12
|
+
'a4': (
|
|
13
|
+
(+0, +25.0 / 12.0),
|
|
14
|
+
(-1, -4.0),
|
|
15
|
+
(-2, +3.0),
|
|
16
|
+
(-3, -4.0 / 3.0),
|
|
17
|
+
(-4, +1.0 / 4.0),
|
|
18
|
+
),
|
|
19
|
+
'a6': (
|
|
20
|
+
(+0, +49.0 / 20.0),
|
|
21
|
+
(-1, -6.0),
|
|
22
|
+
(-2, +15.0 / 2.0),
|
|
23
|
+
(-3, -20.0 / 3.0),
|
|
24
|
+
(-4, +15.0 / 4.0),
|
|
25
|
+
(-5, -6.0 / 5.0),
|
|
26
|
+
(-6, +1.0 / 6.0)
|
|
27
|
+
)
|
|
28
|
+
},
|
|
29
|
+
'd2': {
|
|
30
|
+
'a2': (
|
|
31
|
+
(+0, +2.0),
|
|
32
|
+
(-1, -5.0),
|
|
33
|
+
(-2, +4.0),
|
|
34
|
+
(-3, -1.0),
|
|
35
|
+
),
|
|
36
|
+
'a4': (
|
|
37
|
+
(+0, +15.0 / 4.0),
|
|
38
|
+
(-1, -77.0 / 6.0),
|
|
39
|
+
(-2, +107.0 / 6.0),
|
|
40
|
+
(-3, -13.0),
|
|
41
|
+
(-4, +61.0 / 12.0),
|
|
42
|
+
(-5, -5.0 / 6.0),
|
|
43
|
+
),
|
|
44
|
+
'a6': (
|
|
45
|
+
(+0, +469.0 / 90.0),
|
|
46
|
+
(-1, -223.0 / 10.0),
|
|
47
|
+
(-2, +879.0 / 20.0),
|
|
48
|
+
(-3, -949.0 / 18.0),
|
|
49
|
+
(-4, +41.0),
|
|
50
|
+
(-5, -201.0 / 10.0),
|
|
51
|
+
(-6, 1019.0 / 180.0),
|
|
52
|
+
(-7, -7.0 / 10.0)
|
|
53
|
+
)
|
|
54
|
+
},
|
|
55
|
+
'd3': {
|
|
56
|
+
'a2': (
|
|
57
|
+
(+0, +5.0 / 2.0),
|
|
58
|
+
(-1, -9.0),
|
|
59
|
+
(-2, +12.0),
|
|
60
|
+
(-3, -7.0),
|
|
61
|
+
(-4, +3.0 / 2.0),
|
|
62
|
+
),
|
|
63
|
+
'a4': (
|
|
64
|
+
(+0, +49.0 / 8.0),
|
|
65
|
+
(-1, -29.0),
|
|
66
|
+
(-2, +461.0 / 8.0),
|
|
67
|
+
(-3, -62.0),
|
|
68
|
+
(-4, +307.0 / 8.0),
|
|
69
|
+
(-5, -13.0),
|
|
70
|
+
(-6, +15.0 / 8.0),
|
|
71
|
+
),
|
|
72
|
+
'a6': (
|
|
73
|
+
(+0, +801.0 / 80.0),
|
|
74
|
+
(-1, -349.0 / 6.0),
|
|
75
|
+
(-2, +18353.0 / 120.0),
|
|
76
|
+
(-3, -2391 / 10),
|
|
77
|
+
(-4, +1457.0 / 6.0),
|
|
78
|
+
(-5, -4891.0 / 30.0),
|
|
79
|
+
(-6, +561.0 / 8.0),
|
|
80
|
+
(-7, -527.0 / 30.0),
|
|
81
|
+
(-8, +469.0 / 240.0)
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
# -
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
__accuracy_list__ = [2, 4, 6, 8]
|
|
5
|
+
__derivative_list__ = [1, 2, 3]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# class FiniteCoefficients()
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
coefficients = {
|
|
12
|
+
'd1': {
|
|
13
|
+
'a2': (
|
|
14
|
+
(-1, -1.0 / 2),
|
|
15
|
+
(+1, +1.0 / 2),
|
|
16
|
+
),
|
|
17
|
+
'a4': (
|
|
18
|
+
(-2, +1.0 / 12),
|
|
19
|
+
(-1, -2.0 / 3),
|
|
20
|
+
(+1, +2.0 / 3),
|
|
21
|
+
(+2, -1.0 / 12),
|
|
22
|
+
),
|
|
23
|
+
'a6': (
|
|
24
|
+
(-3, -1.0 / 60.0),
|
|
25
|
+
(-2, +3.0 / 20.0),
|
|
26
|
+
(-1, -3.0 / 4.0),
|
|
27
|
+
(+1, +3.0 / 4.0),
|
|
28
|
+
(+2, -3.0 / 20.0),
|
|
29
|
+
(+3, +1.0 / 60.0),
|
|
30
|
+
),
|
|
31
|
+
'a8': (
|
|
32
|
+
(-4, +1.0 / 280.0),
|
|
33
|
+
(-3, +4.0 / 105.0),
|
|
34
|
+
(-2, +1.0 / 5.0),
|
|
35
|
+
(-1, +4.0 / 5.0),
|
|
36
|
+
(+1, +4.0 / 5.0),
|
|
37
|
+
(+2, -1.0 / 5.0),
|
|
38
|
+
(+3, +4.0 / 105.0),
|
|
39
|
+
(+4, -1.0 / 280.0),
|
|
40
|
+
)
|
|
41
|
+
},
|
|
42
|
+
'd2': {
|
|
43
|
+
'a2': (
|
|
44
|
+
(-1, +1.0),
|
|
45
|
+
(+0, -2.0),
|
|
46
|
+
(+1, +1.0),
|
|
47
|
+
),
|
|
48
|
+
'a4': (
|
|
49
|
+
(-2, -1.0 / 12.0),
|
|
50
|
+
(-1, +4.0 / 3.0),
|
|
51
|
+
(+0, -5.0 / 2.0),
|
|
52
|
+
(+1, +4.0 / 3.0),
|
|
53
|
+
(+2, -1.0 / 12.0),
|
|
54
|
+
),
|
|
55
|
+
'a6': (
|
|
56
|
+
(-3, +1.0 / 90.0),
|
|
57
|
+
(-2, -3.0 / 20.0),
|
|
58
|
+
(-1, +3.0 / 2.0),
|
|
59
|
+
(+0, -49.0 / 18.0),
|
|
60
|
+
(+1, +3.0 / 2.0),
|
|
61
|
+
(+2, -3.0 / 20.0),
|
|
62
|
+
(+3, +1.0 / 90.0),
|
|
63
|
+
),
|
|
64
|
+
'a8': (
|
|
65
|
+
(-4, -1.0 / 560.0),
|
|
66
|
+
(-3, +8.0 / 315.0),
|
|
67
|
+
(-2, -1.0 / 5.0),
|
|
68
|
+
(-1, +8.0 / 5.0),
|
|
69
|
+
(+0, -205 / 72.0),
|
|
70
|
+
(+1, +8.0 / 5.0),
|
|
71
|
+
(+2, -1.0 / 5.0),
|
|
72
|
+
(+3, +8.0 / 315.0),
|
|
73
|
+
(+4, -1.0 / 560.0),
|
|
74
|
+
)
|
|
75
|
+
},
|
|
76
|
+
'd3': {
|
|
77
|
+
'a2': (
|
|
78
|
+
(-2, -1.0 / 2.0),
|
|
79
|
+
(-1, +1.0),
|
|
80
|
+
(+1, -1.0),
|
|
81
|
+
(+2, +1.0 / 2.0),
|
|
82
|
+
),
|
|
83
|
+
'a4': (
|
|
84
|
+
(-3, +1.0 / 8.0),
|
|
85
|
+
(-2, -1.0),
|
|
86
|
+
(-1, +13.0 / 8.0),
|
|
87
|
+
(+1, -13.0 / 8.0),
|
|
88
|
+
(+2, +1.0),
|
|
89
|
+
(+3, -1.0 / 8.0),
|
|
90
|
+
),
|
|
91
|
+
'a6': (
|
|
92
|
+
(-4, -7.0 / 240.0),
|
|
93
|
+
(-3, +3.0 / 10.0),
|
|
94
|
+
(-2, -169.0 / 120.0),
|
|
95
|
+
(-1, +61.0 / 30.0),
|
|
96
|
+
(+1, -61.0 / 30.0),
|
|
97
|
+
(+2, +169.0 / 120.0),
|
|
98
|
+
(+3, -3.0 / 10.0),
|
|
99
|
+
(+4, +7.0 / 240.0),
|
|
100
|
+
),
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
# -
|