pybhpt 0.9.4__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.

Potentially problematic release.


This version of pybhpt might be problematic. Click here for more details.

Files changed (73) hide show
  1. pybhpt-0.9.4/.gitmodules +3 -0
  2. pybhpt-0.9.4/CMakeLists.txt +99 -0
  3. pybhpt-0.9.4/LICENSE +674 -0
  4. pybhpt-0.9.4/PKG-INFO +135 -0
  5. pybhpt-0.9.4/README.md +105 -0
  6. pybhpt-0.9.4/build_gsl.sh +32 -0
  7. pybhpt-0.9.4/cpp/include/bessel.hpp +23 -0
  8. pybhpt-0.9.4/cpp/include/cf.hpp +118 -0
  9. pybhpt-0.9.4/cpp/include/fluxes.hpp +60 -0
  10. pybhpt-0.9.4/cpp/include/geo.hpp +272 -0
  11. pybhpt-0.9.4/cpp/include/gsn_asymp.hpp +21 -0
  12. pybhpt-0.9.4/cpp/include/hertz.hpp +132 -0
  13. pybhpt-0.9.4/cpp/include/hypergeo_f.hpp +208 -0
  14. pybhpt-0.9.4/cpp/include/hypergeo_u.hpp +134 -0
  15. pybhpt-0.9.4/cpp/include/kerr.hpp +13 -0
  16. pybhpt-0.9.4/cpp/include/metric.hpp +84 -0
  17. pybhpt-0.9.4/cpp/include/metriccoeffs.hpp +58 -0
  18. pybhpt-0.9.4/cpp/include/monodromy.hpp +63 -0
  19. pybhpt-0.9.4/cpp/include/mst.hpp +122 -0
  20. pybhpt-0.9.4/cpp/include/nusolver.hpp +219 -0
  21. pybhpt-0.9.4/cpp/include/radialsolver.hpp +425 -0
  22. pybhpt-0.9.4/cpp/include/redshift.hpp +31 -0
  23. pybhpt-0.9.4/cpp/include/regularization.hpp +46 -0
  24. pybhpt-0.9.4/cpp/include/resflux.hpp +27 -0
  25. pybhpt-0.9.4/cpp/include/sourceintegration.hpp +135 -0
  26. pybhpt-0.9.4/cpp/include/specialfunc.hpp +152 -0
  27. pybhpt-0.9.4/cpp/include/swsh.hpp +144 -0
  28. pybhpt-0.9.4/cpp/include/teukolsky.hpp +123 -0
  29. pybhpt-0.9.4/cpp/include/utils.hpp +46 -0
  30. pybhpt-0.9.4/cpp/src/bessel.cpp +250 -0
  31. pybhpt-0.9.4/cpp/src/cf.cpp +349 -0
  32. pybhpt-0.9.4/cpp/src/fluxes.cpp +1253 -0
  33. pybhpt-0.9.4/cpp/src/geo.cpp +2037 -0
  34. pybhpt-0.9.4/cpp/src/gsn_asymp.cpp +952 -0
  35. pybhpt-0.9.4/cpp/src/hertz.cpp +449 -0
  36. pybhpt-0.9.4/cpp/src/hypergeo_f.cpp +1449 -0
  37. pybhpt-0.9.4/cpp/src/hypergeo_u.cpp +1030 -0
  38. pybhpt-0.9.4/cpp/src/kerr.cpp +168 -0
  39. pybhpt-0.9.4/cpp/src/metric.cpp +594 -0
  40. pybhpt-0.9.4/cpp/src/metriccoeffs.cpp +3992 -0
  41. pybhpt-0.9.4/cpp/src/monodromy.cpp +368 -0
  42. pybhpt-0.9.4/cpp/src/mst.cpp +569 -0
  43. pybhpt-0.9.4/cpp/src/nusolver.cpp +2413 -0
  44. pybhpt-0.9.4/cpp/src/radialsolver.cpp +3726 -0
  45. pybhpt-0.9.4/cpp/src/redshift.cpp +623 -0
  46. pybhpt-0.9.4/cpp/src/regularization.cpp +336 -0
  47. pybhpt-0.9.4/cpp/src/resflux.cpp +754 -0
  48. pybhpt-0.9.4/cpp/src/sourceintegration.cpp +2551 -0
  49. pybhpt-0.9.4/cpp/src/specialfunc.cpp +499 -0
  50. pybhpt-0.9.4/cpp/src/swsh.cpp +801 -0
  51. pybhpt-0.9.4/cpp/src/teukolsky.cpp +369 -0
  52. pybhpt-0.9.4/cpp/src/utils.cpp +38 -0
  53. pybhpt-0.9.4/cython/flux_wrap.pyx +129 -0
  54. pybhpt-0.9.4/cython/geo_wrap.pyx +323 -0
  55. pybhpt-0.9.4/cython/radialsolver_wrap.pyx +221 -0
  56. pybhpt-0.9.4/cython/redshift_wrap.pyx +71 -0
  57. pybhpt-0.9.4/cython/teukolsky_wrap.pyx +654 -0
  58. pybhpt-0.9.4/environment-extended.yml +16 -0
  59. pybhpt-0.9.4/environment.yml +7 -0
  60. pybhpt-0.9.4/notebooks/flux-example.ipynb +7076 -0
  61. pybhpt-0.9.4/pybhpt/__init__.py +0 -0
  62. pybhpt-0.9.4/pybhpt/flux.py +124 -0
  63. pybhpt-0.9.4/pybhpt/geo.py +407 -0
  64. pybhpt-0.9.4/pybhpt/hertz.py +402 -0
  65. pybhpt-0.9.4/pybhpt/metric.py +327 -0
  66. pybhpt-0.9.4/pybhpt/radial.py +381 -0
  67. pybhpt-0.9.4/pybhpt/redshift.py +20 -0
  68. pybhpt-0.9.4/pybhpt/swsh.py +347 -0
  69. pybhpt-0.9.4/pybhpt/teuk.py +245 -0
  70. pybhpt-0.9.4/pyproject.toml +67 -0
  71. pybhpt-0.9.4/tests/test_geo.py +51 -0
  72. pybhpt-0.9.4/tests/test_radial.py +41 -0
  73. pybhpt-0.9.4/tests/test_teuk.py +81 -0
@@ -0,0 +1,3 @@
1
+ [submodule "extern/boost"]
2
+ path = extern/boost
3
+ url = https://github.com/boostorg/boost.git
@@ -0,0 +1,99 @@
1
+ cmake_minimum_required(VERSION 3.15)
2
+ project(pybhpt LANGUAGES CXX)
3
+
4
+ # Python & NumPy
5
+ find_package(Python COMPONENTS Interpreter Development.Module NumPy REQUIRED)
6
+
7
+ # Conda detection
8
+ if(DEFINED ENV{CONDA_PREFIX})
9
+ message(STATUS "Using Conda environment at $ENV{CONDA_PREFIX}")
10
+ list(APPEND CMAKE_PREFIX_PATH "$ENV{CONDA_PREFIX}")
11
+ list(APPEND CMAKE_LIBRARY_PATH "$ENV{CONDA_PREFIX}/lib")
12
+ list(APPEND CMAKE_INCLUDE_PATH "$ENV{CONDA_PREFIX}/include")
13
+ endif()
14
+
15
+ # ------------------------- GSL Detection -------------------------
16
+ find_package(GSL REQUIRED)
17
+
18
+ # ------------------------- Boost Headers Only -------------------------
19
+ set(BOOST_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extern/boost")
20
+
21
+ # ------------------------- Cython -------------------------
22
+ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/cython")
23
+
24
+ add_custom_command(
25
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cython/redshift_wrap.cpp"
26
+ COMMAND ${Python_EXECUTABLE} -m cython
27
+ "${CMAKE_CURRENT_SOURCE_DIR}/cython/redshift_wrap.pyx"
28
+ --output-file "${CMAKE_CURRENT_BINARY_DIR}/cython/redshift_wrap.cpp"
29
+ -3 -+ --module-name "cybhpt_full"
30
+ -I "${CMAKE_CURRENT_SOURCE_DIR}/cpp/include"
31
+ DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/cython/redshift_wrap.pyx"
32
+ COMMENT "Generating redshift_wrap.cpp from Cython"
33
+ VERBATIM
34
+ )
35
+
36
+ # ------------------------- Extension Module -------------------------
37
+ python_add_library(cybhpt_full MODULE
38
+ "${CMAKE_CURRENT_BINARY_DIR}/cython/redshift_wrap.cpp"
39
+ cpp/src/utils.cpp
40
+ cpp/src/specialfunc.cpp
41
+ cpp/src/kerr.cpp
42
+ cpp/src/geo.cpp
43
+ cpp/src/cf.cpp
44
+ cpp/src/swsh.cpp
45
+ cpp/src/monodromy.cpp
46
+ cpp/src/hypergeo_f.cpp
47
+ cpp/src/bessel.cpp
48
+ cpp/src/hypergeo_u.cpp
49
+ cpp/src/nusolver.cpp
50
+ cpp/src/mst.cpp
51
+ cpp/src/gsn_asymp.cpp
52
+ cpp/src/radialsolver.cpp
53
+ cpp/src/sourceintegration.cpp
54
+ cpp/src/teukolsky.cpp
55
+ cpp/src/hertz.cpp
56
+ cpp/src/metriccoeffs.cpp
57
+ cpp/src/fluxes.cpp
58
+ cpp/src/metric.cpp
59
+ cpp/src/redshift.cpp
60
+ WITH_SOABI
61
+ )
62
+
63
+ # ------------------------- Include Paths -------------------------
64
+ target_include_directories(cybhpt_full PRIVATE
65
+ ${Python_NumPy_INCLUDE_DIRS}
66
+ ${BOOST_INCLUDE_DIR}
67
+ ${GSL_INCLUDE_DIRS}
68
+ ${CMAKE_CURRENT_SOURCE_DIR}/cpp/include
69
+ )
70
+
71
+ # C++ flags
72
+ set_property(TARGET cybhpt_full PROPERTY CXX_STANDARD 14)
73
+ set(PYBHPT_MARCH native CACHE STRING "Value of the -march compiler option")
74
+ include(CheckCXXCompilerFlag)
75
+ set(MARCH_OPT "-march=${PYBHPT_MARCH}")
76
+ check_cxx_compiler_flag("${MARCH_OPT}" COMPILER_SUPPORTS_MARCH)
77
+ if(COMPILER_SUPPORTS_MARCH)
78
+ target_compile_options(cybhpt_full PRIVATE "${MARCH_OPT}")
79
+ endif()
80
+
81
+ # OpenMP
82
+ find_package(OpenMP)
83
+ if(OpenMP_CXX_FOUND)
84
+ target_link_libraries(cybhpt_full PRIVATE OpenMP::OpenMP_CXX)
85
+ else()
86
+ message(STATUS "OpenMP not found, proceeding without it")
87
+ target_compile_definitions(cybhpt_full PRIVATE PYBHPT_NO_OPENMP)
88
+ endif()
89
+
90
+ # GSL
91
+ target_link_libraries(cybhpt_full PRIVATE GSL::gsl GSL::gslcblas)
92
+ set_target_properties(cybhpt_full PROPERTIES
93
+ INSTALL_RPATH "$ORIGIN/../../opt/gsl-install/lib"
94
+ BUILD_WITH_INSTALL_RPATH TRUE
95
+ )
96
+
97
+
98
+ # Optional install
99
+ install(TARGETS cybhpt_full DESTINATION "./")