PyFishPack 0.1.0__cp39-cp39-win_amd64.whl

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.
Files changed (82) hide show
  1. PyFishPack/__init__.py +105 -0
  2. PyFishPack/__pycache__/__init__.cpython-39.pyc +0 -0
  3. PyFishPack/__pycache__/apps.cpython-39.pyc +0 -0
  4. PyFishPack/_dummy.c +23 -0
  5. PyFishPack/_dummy.cp39-win_amd64.pyd +0 -0
  6. PyFishPack/apps.py +3640 -0
  7. PyFishPack/fishpack.cp39-win_amd64.dll.a +0 -0
  8. PyFishPack/fishpack.cp39-win_amd64.pyd +0 -0
  9. PyFishPack/meson.build +213 -0
  10. PyFishPack/src/archive/f77/Makefile +19 -0
  11. PyFishPack/src/archive/f77/blktri.f +1404 -0
  12. PyFishPack/src/archive/f77/cblktri.f +1414 -0
  13. PyFishPack/src/archive/f77/cmgnbn.f +1592 -0
  14. PyFishPack/src/archive/f77/comf.f +186 -0
  15. PyFishPack/src/archive/f77/fftpack.f +2968 -0
  16. PyFishPack/src/archive/f77/genbun.f +1335 -0
  17. PyFishPack/src/archive/f77/gnbnaux.f +314 -0
  18. PyFishPack/src/archive/f77/hstcrt.f +443 -0
  19. PyFishPack/src/archive/f77/hstcsp.f +683 -0
  20. PyFishPack/src/archive/f77/hstcyl.f +485 -0
  21. PyFishPack/src/archive/f77/hstplr.f +538 -0
  22. PyFishPack/src/archive/f77/hstssp.f +634 -0
  23. PyFishPack/src/archive/f77/hw3crt.f +687 -0
  24. PyFishPack/src/archive/f77/hwscrt.f +512 -0
  25. PyFishPack/src/archive/f77/hwscsp.f +728 -0
  26. PyFishPack/src/archive/f77/hwscyl.f +538 -0
  27. PyFishPack/src/archive/f77/hwsplr.f +602 -0
  28. PyFishPack/src/archive/f77/hwsssp.f +780 -0
  29. PyFishPack/src/archive/f77/pois3d.f +550 -0
  30. PyFishPack/src/archive/f77/poistg.f +875 -0
  31. PyFishPack/src/archive/f77/sepaux.f +361 -0
  32. PyFishPack/src/archive/f77/sepeli.f +1029 -0
  33. PyFishPack/src/archive/f77/sepx4.f +958 -0
  34. PyFishPack/src/centered_axisymmetric_spherical_solver.f90 +1002 -0
  35. PyFishPack/src/centered_cartesian_helmholtz_solver_3d.f90 +819 -0
  36. PyFishPack/src/centered_cartesian_solver.f90 +583 -0
  37. PyFishPack/src/centered_cylindrical_solver.f90 +634 -0
  38. PyFishPack/src/centered_helmholtz_solvers.f90 +156 -0
  39. PyFishPack/src/centered_polar_solver.f90 +746 -0
  40. PyFishPack/src/centered_real_linear_systems_solver.f90 +280 -0
  41. PyFishPack/src/centered_spherical_solver.f90 +928 -0
  42. PyFishPack/src/complex_block_tridiagonal_linear_systems_solver.f90 +1947 -0
  43. PyFishPack/src/complex_linear_systems_solver.f90 +1787 -0
  44. PyFishPack/src/fftpack_c_api.f90 +86 -0
  45. PyFishPack/src/fishpack.f90 +191 -0
  46. PyFishPack/src/fishpack.pyf +504 -0
  47. PyFishPack/src/fishpack_c_api.f90 +365 -0
  48. PyFishPack/src/fishpack_original.pyf +2119 -0
  49. PyFishPack/src/fishpack_precision.f90 +53 -0
  50. PyFishPack/src/general_linear_systems_solver_3d.f90 +296 -0
  51. PyFishPack/src/iterative_solvers.f90 +969 -0
  52. PyFishPack/src/main.f90 +10 -0
  53. PyFishPack/src/pyfishpack_module.c +1302 -0
  54. PyFishPack/src/real_block_tridiagonal_linear_systems_solver.f90 +319 -0
  55. PyFishPack/src/sepeli.f90 +1454 -0
  56. PyFishPack/src/sepx4.f90 +1338 -0
  57. PyFishPack/src/staggered_axisymmetric_spherical_solver.f90 +908 -0
  58. PyFishPack/src/staggered_cartesian_solver.f90 +553 -0
  59. PyFishPack/src/staggered_cylindrical_solver.f90 +630 -0
  60. PyFishPack/src/staggered_helmholtz_solvers.f90 +172 -0
  61. PyFishPack/src/staggered_polar_solver.f90 +651 -0
  62. PyFishPack/src/staggered_real_linear_systems_solver.f90 +258 -0
  63. PyFishPack/src/staggered_spherical_solver.f90 +758 -0
  64. PyFishPack/src/three_dimensional_solvers.f90 +602 -0
  65. PyFishPack/src/type_CenteredCyclicReductionUtility.f90 +1714 -0
  66. PyFishPack/src/type_CyclicReductionUtility.f90 +472 -0
  67. PyFishPack/src/type_FishpackWorkspace.f90 +290 -0
  68. PyFishPack/src/type_GeneralizedCyclicReductionUtility.f90 +1980 -0
  69. PyFishPack/src/type_PeriodicFastFourierTransform.f90 +3789 -0
  70. PyFishPack/src/type_SepAux.f90 +586 -0
  71. PyFishPack/src/type_StaggeredCyclicReductionUtility.f90 +893 -0
  72. pyfishpack-0.1.0.dist-info/DELVEWHEEL +2 -0
  73. pyfishpack-0.1.0.dist-info/METADATA +81 -0
  74. pyfishpack-0.1.0.dist-info/RECORD +82 -0
  75. pyfishpack-0.1.0.dist-info/WHEEL +5 -0
  76. pyfishpack-0.1.0.dist-info/licenses/LICENSE +21 -0
  77. pyfishpack-0.1.0.dist-info/top_level.txt +1 -0
  78. pyfishpack.libs/.load-order-pyfishpack-0.1.0 +4 -0
  79. pyfishpack.libs/libgcc_s_seh-1-25d59ccffa1a9009644065b069829e07.dll +0 -0
  80. pyfishpack.libs/libgfortran-5-08f2195cfa0d823e13371c5c3186a82a.dll +0 -0
  81. pyfishpack.libs/libquadmath-0-c5abb9113f1ee64b87a889958e4b7418.dll +0 -0
  82. pyfishpack.libs/libwinpthread-1-83908d14abfafb8b3bfa38cf51ecee56.dll +0 -0
PyFishPack/__init__.py ADDED
@@ -0,0 +1,105 @@
1
+ """
2
+ PyFishPack - Python wrapper for FISHPACK Fortran library
3
+
4
+ FISHPACK is a collection of Fortran routines for solving separable
5
+ elliptic partial differential equations.
6
+ """
7
+
8
+
9
+ # start delvewheel patch
10
+ def _delvewheel_patch_1_13_0():
11
+ import ctypes
12
+ import os
13
+ import platform
14
+ import sys
15
+ libs_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'pyfishpack.libs'))
16
+ is_conda_cpython = platform.python_implementation() == 'CPython' and (hasattr(ctypes.pythonapi, 'Anaconda_GetVersion') or 'packaged by conda-forge' in sys.version)
17
+ if sys.version_info[:2] >= (3, 8) and not is_conda_cpython or sys.version_info[:2] >= (3, 10):
18
+ if os.path.isdir(libs_dir):
19
+ os.add_dll_directory(libs_dir)
20
+ else:
21
+ load_order_filepath = os.path.join(libs_dir, '.load-order-pyfishpack-0.1.0')
22
+ if os.path.isfile(load_order_filepath):
23
+ import ctypes.wintypes
24
+ with open(os.path.join(libs_dir, '.load-order-pyfishpack-0.1.0')) as file:
25
+ load_order = file.read().split()
26
+ kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)
27
+ kernel32.LoadLibraryExW.restype = ctypes.wintypes.HMODULE
28
+ kernel32.LoadLibraryExW.argtypes = ctypes.wintypes.LPCWSTR, ctypes.wintypes.HANDLE, ctypes.wintypes.DWORD
29
+ for lib in load_order:
30
+ lib_path = os.path.join(os.path.join(libs_dir, lib))
31
+ if os.path.isfile(lib_path) and not kernel32.LoadLibraryExW(lib_path, None, 8):
32
+ raise OSError('Error loading {}; {}'.format(lib, ctypes.FormatError(ctypes.get_last_error())))
33
+
34
+
35
+ _delvewheel_patch_1_13_0()
36
+ del _delvewheel_patch_1_13_0
37
+ # end delvewheel patch
38
+
39
+ __version__ = "0.1.0"
40
+
41
+ try:
42
+ # Import the compiled fishpack extension
43
+ from . import fishpack
44
+ from .apps import (
45
+ invert_3DOcean,
46
+ invert_BrethertonHaidvogel,
47
+ invert_Eliassen,
48
+ invert_Fofonoff,
49
+ invert_GillMatsuno,
50
+ invert_GillMatsuno_test,
51
+ invert_MultiGrid,
52
+ invert_PV2D,
53
+ invert_Poisson,
54
+ invert_RefState,
55
+ invert_RefStateSWM,
56
+ invert_Stommel,
57
+ invert_StommelArons,
58
+ invert_StommelMunk,
59
+ invert_Stommel_test,
60
+ invert_geostrophic,
61
+ invert_omega,
62
+ spectral_transform,
63
+ )
64
+
65
+ # Make commonly used functions available at package level
66
+ # These will be available as PyFishPack.genbun, etc.
67
+ from .fishpack import *
68
+
69
+ __all__ = [name for name in dir(fishpack) if not name.startswith('_')]
70
+ __all__.extend([
71
+ "invert_3DOcean",
72
+ "invert_BrethertonHaidvogel",
73
+ "invert_Eliassen",
74
+ "invert_Fofonoff",
75
+ "invert_GillMatsuno",
76
+ "invert_GillMatsuno_test",
77
+ "invert_MultiGrid",
78
+ "invert_PV2D",
79
+ "invert_Poisson",
80
+ "invert_RefState",
81
+ "invert_RefStateSWM",
82
+ "invert_Stommel",
83
+ "invert_StommelArons",
84
+ "invert_StommelMunk",
85
+ "invert_Stommel_test",
86
+ "invert_geostrophic",
87
+ "invert_omega",
88
+ "spectral_transform",
89
+ ])
90
+
91
+ except ImportError as e:
92
+ import warnings
93
+ print(f"Warning: Could not import fishpack extension: {e}")
94
+ print("Make sure the extension is compiled correctly.")
95
+ warnings.warn(f"Could not import fishpack extension: {e}. "
96
+ f"Make sure the extension is compiled correctly.",
97
+ ImportWarning)
98
+
99
+ # Fallback - define empty __all__
100
+ __all__ = []
101
+
102
+ # Package metadata
103
+ __author__ = "Qianye Su"
104
+ __email__ = "suqianye2000@gmail.com"
105
+ __url__ = "https://github.com/QianyeSu/PyFishPack"
PyFishPack/_dummy.c ADDED
@@ -0,0 +1,23 @@
1
+ /* Dummy C extension for Windows compatibility */
2
+ #include <Python.h>
3
+
4
+ static PyObject* dummy_function(PyObject* self, PyObject* args) {
5
+ return Py_None;
6
+ }
7
+
8
+ static PyMethodDef DummyMethods[] = {
9
+ {"dummy", dummy_function, METH_VARARGS, "Dummy function"},
10
+ {NULL, NULL, 0, NULL}
11
+ };
12
+
13
+ static struct PyModuleDef dummymodule = {
14
+ PyModuleDef_HEAD_INIT,
15
+ "_dummy",
16
+ NULL,
17
+ -1,
18
+ DummyMethods
19
+ };
20
+
21
+ PyMODINIT_FUNC PyInit__dummy(void) {
22
+ return PyModule_Create(&dummymodule);
23
+ }
Binary file