fullwave25 1.0.7__py3-none-any.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.

Potentially problematic release.


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

Files changed (225) hide show
  1. fullwave/__init__.py +28 -0
  2. fullwave/constants/__init__.py +5 -0
  3. fullwave/constants/material_properties.py +112 -0
  4. fullwave/grid.py +222 -0
  5. fullwave/medium.py +1042 -0
  6. fullwave/medium_builder/__init__.py +12 -0
  7. fullwave/medium_builder/domain.py +151 -0
  8. fullwave/medium_builder/medium_builder.py +198 -0
  9. fullwave/medium_builder/presets/__init__.py +8 -0
  10. fullwave/medium_builder/presets/data/.keep +0 -0
  11. fullwave/medium_builder/presets/data/abdominal_wall/i2365f_etfw1.mat +0 -0
  12. fullwave/medium_builder/presets/domain_abdominal_wall.py +293 -0
  13. fullwave/medium_builder/presets/domain_background.py +140 -0
  14. fullwave/medium_builder/presets/domain_scatterer.py +179 -0
  15. fullwave/medium_builder/presets/domain_simple.py +92 -0
  16. fullwave/medium_builder/presets/domain_water_gel.py +1 -0
  17. fullwave/sensor.py +161 -0
  18. fullwave/solver/__init__.py +1 -0
  19. fullwave/solver/bins/database/relaxation_params_database_num_relax=2_20251027_1437.mat +0 -0
  20. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenu +0 -0
  21. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_100_cuda129 +0 -0
  22. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_101_cuda129 +0 -0
  23. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_120_cuda129 +0 -0
  24. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_61_cuda118 +0 -0
  25. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_61_cuda124 +0 -0
  26. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_61_cuda126 +0 -0
  27. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_61_cuda129 +0 -0
  28. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_70_cuda118 +0 -0
  29. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_70_cuda124 +0 -0
  30. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_70_cuda126 +0 -0
  31. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_70_cuda129 +0 -0
  32. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_75_cuda118 +0 -0
  33. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_75_cuda124 +0 -0
  34. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_75_cuda126 +0 -0
  35. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_75_cuda129 +0 -0
  36. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_80_cuda118 +0 -0
  37. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_80_cuda124 +0 -0
  38. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_80_cuda126 +0 -0
  39. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_80_cuda129 +0 -0
  40. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_86_cuda118 +0 -0
  41. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_86_cuda124 +0 -0
  42. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_86_cuda126 +0 -0
  43. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_86_cuda129 +0 -0
  44. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_89_cuda118 +0 -0
  45. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_89_cuda126 +0 -0
  46. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_89_cuda129 +0 -0
  47. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_90_cuda118 +0 -0
  48. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_90_cuda124 +0 -0
  49. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_90_cuda126 +0 -0
  50. fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_90_cuda129 +0 -0
  51. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_100_cuda129 +0 -0
  52. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_101_cuda129 +0 -0
  53. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_120_cuda129 +0 -0
  54. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_61_cuda118 +0 -0
  55. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_61_cuda124 +0 -0
  56. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_61_cuda126 +0 -0
  57. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_61_cuda129 +0 -0
  58. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_70_cuda118 +0 -0
  59. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_70_cuda124 +0 -0
  60. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_70_cuda126 +0 -0
  61. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_70_cuda129 +0 -0
  62. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_75_cuda118 +0 -0
  63. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_75_cuda124 +0 -0
  64. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_75_cuda126 +0 -0
  65. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_75_cuda129 +0 -0
  66. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_80_cuda118 +0 -0
  67. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_80_cuda124 +0 -0
  68. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_80_cuda126 +0 -0
  69. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_80_cuda129 +0 -0
  70. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_86_cuda118 +0 -0
  71. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_86_cuda124 +0 -0
  72. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_86_cuda126 +0 -0
  73. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_86_cuda129 +0 -0
  74. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_89_cuda118 +0 -0
  75. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_89_cuda124 +0 -0
  76. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_89_cuda126 +0 -0
  77. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_89_cuda129 +0 -0
  78. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_90_cuda118 +0 -0
  79. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_90_cuda124 +0 -0
  80. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_90_cuda126 +0 -0
  81. fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_90_cuda129 +0 -0
  82. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_100_cuda129 +0 -0
  83. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_101_cuda129 +0 -0
  84. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_120_cuda129 +0 -0
  85. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_61_cuda118 +0 -0
  86. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_61_cuda124 +0 -0
  87. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_61_cuda126 +0 -0
  88. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_61_cuda129 +0 -0
  89. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_70_cuda118 +0 -0
  90. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_70_cuda124 +0 -0
  91. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_70_cuda126 +0 -0
  92. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_70_cuda129 +0 -0
  93. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_75_cuda118 +0 -0
  94. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_75_cuda124 +0 -0
  95. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_75_cuda126 +0 -0
  96. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_75_cuda129 +0 -0
  97. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_80_cuda118 +0 -0
  98. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_80_cuda124 +0 -0
  99. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_80_cuda126 +0 -0
  100. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_80_cuda129 +0 -0
  101. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_86_cuda118 +0 -0
  102. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_86_cuda124 +0 -0
  103. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_86_cuda126 +0 -0
  104. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_86_cuda129 +0 -0
  105. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_89_cuda118 +0 -0
  106. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_89_cuda124 +0 -0
  107. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_89_cuda126 +0 -0
  108. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_89_cuda129 +0 -0
  109. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_90_cuda118 +0 -0
  110. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_90_cuda124 +0 -0
  111. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_90_cuda126 +0 -0
  112. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_90_cuda129 +0 -0
  113. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_100_cuda129 +0 -0
  114. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_101_cuda129 +0 -0
  115. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_120_cuda129 +0 -0
  116. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_61_cuda118 +0 -0
  117. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_61_cuda124 +0 -0
  118. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_61_cuda126 +0 -0
  119. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_61_cuda129 +0 -0
  120. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_70_cuda118 +0 -0
  121. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_70_cuda124 +0 -0
  122. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_70_cuda126 +0 -0
  123. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_70_cuda129 +0 -0
  124. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_75_cuda118 +0 -0
  125. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_75_cuda124 +0 -0
  126. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_75_cuda126 +0 -0
  127. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_75_cuda129 +0 -0
  128. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_80_cuda118 +0 -0
  129. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_80_cuda124 +0 -0
  130. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_80_cuda126 +0 -0
  131. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_80_cuda129 +0 -0
  132. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_86_cuda118 +0 -0
  133. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_86_cuda124 +0 -0
  134. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_86_cuda126 +0 -0
  135. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_86_cuda129 +0 -0
  136. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_89_cuda118 +0 -0
  137. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_89_cuda124 +0 -0
  138. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_89_cuda126 +0 -0
  139. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_89_cuda129 +0 -0
  140. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_90_cuda118 +0 -0
  141. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_90_cuda124 +0 -0
  142. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_90_cuda126 +0 -0
  143. fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_90_cuda129 +0 -0
  144. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_100_cuda129 +0 -0
  145. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_101_cuda129 +0 -0
  146. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_120_cuda129 +0 -0
  147. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_61_cuda118 +0 -0
  148. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_61_cuda124 +0 -0
  149. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_61_cuda126 +0 -0
  150. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_61_cuda129 +0 -0
  151. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_70_cuda118 +0 -0
  152. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_70_cuda124 +0 -0
  153. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_70_cuda126 +0 -0
  154. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_70_cuda129 +0 -0
  155. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_75_cuda118 +0 -0
  156. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_75_cuda124 +0 -0
  157. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_75_cuda126 +0 -0
  158. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_75_cuda129 +0 -0
  159. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_80_cuda118 +0 -0
  160. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_80_cuda124 +0 -0
  161. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_80_cuda126 +0 -0
  162. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_80_cuda129 +0 -0
  163. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_86_cuda118 +0 -0
  164. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_86_cuda124 +0 -0
  165. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_86_cuda126 +0 -0
  166. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_86_cuda129 +0 -0
  167. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_89_cuda118 +0 -0
  168. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_89_cuda124 +0 -0
  169. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_89_cuda126 +0 -0
  170. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_89_cuda129 +0 -0
  171. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_90_cuda118 +0 -0
  172. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_90_cuda124 +0 -0
  173. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_90_cuda126 +0 -0
  174. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_90_cuda129 +0 -0
  175. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_100_cuda129 +0 -0
  176. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_101_cuda129 +0 -0
  177. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_120_cuda129 +0 -0
  178. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_61_cuda118 +0 -0
  179. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_61_cuda124 +0 -0
  180. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_61_cuda126 +0 -0
  181. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_61_cuda129 +0 -0
  182. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_70_cuda118 +0 -0
  183. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_70_cuda124 +0 -0
  184. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_70_cuda126 +0 -0
  185. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_70_cuda129 +0 -0
  186. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_75_cuda118 +0 -0
  187. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_75_cuda124 +0 -0
  188. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_75_cuda126 +0 -0
  189. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_75_cuda129 +0 -0
  190. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_80_cuda118 +0 -0
  191. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_80_cuda124 +0 -0
  192. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_80_cuda126 +0 -0
  193. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_80_cuda129 +0 -0
  194. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_86_cuda118 +0 -0
  195. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_86_cuda124 +0 -0
  196. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_86_cuda126 +0 -0
  197. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_86_cuda129 +0 -0
  198. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_89_cuda118 +0 -0
  199. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_89_cuda124 +0 -0
  200. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_89_cuda126 +0 -0
  201. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_89_cuda129 +0 -0
  202. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_90_cuda118 +0 -0
  203. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_90_cuda124 +0 -0
  204. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_90_cuda126 +0 -0
  205. fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_90_cuda129 +0 -0
  206. fullwave/solver/cuda_utils.py +392 -0
  207. fullwave/solver/input_file_writer.py +853 -0
  208. fullwave/solver/launcher.py +134 -0
  209. fullwave/solver/pml_builder.py +1923 -0
  210. fullwave/solver/solver.py +750 -0
  211. fullwave/solver/utils.py +83 -0
  212. fullwave/source.py +173 -0
  213. fullwave/transducer.py +1003 -0
  214. fullwave/utils/__init__.py +12 -0
  215. fullwave/utils/check_functions.py +48 -0
  216. fullwave/utils/coordinates.py +155 -0
  217. fullwave/utils/memory_tempfile.py +439 -0
  218. fullwave/utils/numerical.py +111 -0
  219. fullwave/utils/plot_utils.py +1122 -0
  220. fullwave/utils/pulse.py +72 -0
  221. fullwave/utils/relaxation_parameters.py +212 -0
  222. fullwave/utils/signal_process.py +197 -0
  223. fullwave25-1.0.7.dist-info/METADATA +292 -0
  224. fullwave25-1.0.7.dist-info/RECORD +225 -0
  225. fullwave25-1.0.7.dist-info/WHEEL +4 -0
@@ -0,0 +1,392 @@
1
+ """CUDA utilities for device information and API management.
2
+
3
+ This module provides:
4
+ - CUDA device specification retrieval
5
+ - CUDA API call wrappers with error handling
6
+ - Device architecture and compute capability mappings
7
+ - Memory and performance information extraction
8
+
9
+ based on: https://gist.github.com/f0k/63a664160d016a491b2cbea15913d549?permalink_comment_id=5043495#gistcomment-5043495
10
+ """
11
+
12
+ import ctypes
13
+ import json
14
+ import logging
15
+ from collections.abc import Callable
16
+ from functools import wraps
17
+ from typing import Any
18
+ from warnings import warn
19
+
20
+ logger = logging.getLogger("__main__." + __name__)
21
+
22
+ # Constants from cuda.h
23
+ CUDA_SUCCESS = 0
24
+ CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT = 16
25
+ CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR = 39
26
+ CU_DEVICE_ATTRIBUTE_CLOCK_RATE = 13
27
+ CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE = 36
28
+
29
+ # Conversions from semantic version numbers
30
+ # Borrowed from original gist
31
+ # https://gist.github.com/f0k/63a664160d016a491b2cbea15913d549
32
+ # and updated from the "GPUs supported" section of this Wikipedia article
33
+ # https://en.wikipedia.org/wiki/CUDA
34
+ SEMVER_TO_CORES = {
35
+ (1, 0): 8, # Tesla
36
+ (1, 1): 8,
37
+ (1, 2): 8,
38
+ (1, 3): 8,
39
+ (2, 0): 32, # Fermi
40
+ (2, 1): 48,
41
+ (3, 0): 192, # Kepler
42
+ (3, 2): 192,
43
+ (3, 5): 192,
44
+ (3, 7): 192,
45
+ (5, 0): 128, # Maxwell
46
+ (5, 2): 128,
47
+ (5, 3): 128,
48
+ (6, 0): 64, # Pascal
49
+ (6, 1): 128,
50
+ (6, 2): 128,
51
+ (7, 0): 64, # Volta
52
+ (7, 2): 64,
53
+ (7, 5): 64, # Turing
54
+ (8, 0): 64, # Ampere
55
+ (8, 6): 64,
56
+ (8, 7): 64,
57
+ (8, 9): 128, # Ada Lovelace
58
+ (9, 0): 128, # Hopper
59
+ (10, 0): 128, # Blackwell
60
+ (10, 1): 128, # Blackwell
61
+ (12, 0): 128, # Blackwell
62
+ }
63
+ SEMVER_TO_ARCH = {
64
+ (1, 0): "tesla",
65
+ (1, 1): "tesla",
66
+ (1, 2): "tesla",
67
+ (1, 3): "tesla",
68
+ (2, 0): "fermi",
69
+ (2, 1): "fermi",
70
+ (3, 0): "kepler",
71
+ (3, 2): "kepler",
72
+ (3, 5): "kepler",
73
+ (3, 7): "kepler",
74
+ (5, 0): "maxwell",
75
+ (5, 2): "maxwell",
76
+ (5, 3): "maxwell",
77
+ (6, 0): "pascal",
78
+ (6, 1): "pascal",
79
+ (6, 2): "pascal",
80
+ (7, 0): "volta",
81
+ (7, 2): "volta",
82
+ (7, 5): "turing",
83
+ (8, 0): "ampere",
84
+ (8, 6): "ampere",
85
+ (8, 7): "ampere",
86
+ (8, 9): "ada lovelace",
87
+ (9, 0): "hopper",
88
+ (10, 0): "blackwell",
89
+ (10, 1): "blackwell",
90
+ (12, 0): "blackwell",
91
+ }
92
+
93
+
94
+ # Attempt to load the CUDA library
95
+ libnames = ("libcuda.so", "libcuda.dylib", "cuda.dll")
96
+ for libname in libnames:
97
+ try:
98
+ cuda = ctypes.CDLL(libname)
99
+ except OSError:
100
+ continue
101
+ else:
102
+ break
103
+ else:
104
+ warning_msg = f"Could not load any of: {', '.join(libnames)}"
105
+ logger.warning(warning_msg)
106
+
107
+
108
+ def cuda_api_call(func: Callable) -> Callable:
109
+ """Wrap CUDA API calls and check their results.
110
+
111
+ Decorator for CUDA API calls
112
+ Raises RuntimeError if the CUDA call does not return CUDA_SUCCESS.
113
+
114
+ Returns:
115
+ Callable: The wrapped function that checks CUDA API call results.
116
+
117
+ """
118
+
119
+ @wraps(func)
120
+ def wrapper(*args, **kwargs): # noqa: ANN002, ANN003, ANN202
121
+ result = func(*args, **kwargs)
122
+ if result != CUDA_SUCCESS:
123
+ error_str = ctypes.c_char_p()
124
+ cuda.cuGetErrorString(result, ctypes.byref(error_str))
125
+ error_msg = error_str.value.decode() if error_str.value else "Unknown error"
126
+ msg = f"{func.__name__} failed with error code {result}: {error_msg}"
127
+ raise RuntimeError(msg)
128
+ return result
129
+
130
+ return wrapper
131
+
132
+
133
+ def cuda_api_call_warn(func: Callable) -> Callable:
134
+ """Wrap CUDA API calls and check their results.
135
+
136
+ Prints a warning message if the CUDA call does not return CUDA_SUCCESS.
137
+
138
+ Returns:
139
+ Callable: The wrapped function that checks CUDA API call results.
140
+
141
+ """
142
+
143
+ @wraps(func)
144
+ def wrapper(*args, **kwargs): # noqa: ANN002, ANN003, ANN202
145
+ result = func(*args, **kwargs)
146
+ if result != CUDA_SUCCESS:
147
+ error_str = ctypes.c_char_p()
148
+ cuda.cuGetErrorString(result, ctypes.byref(error_str))
149
+ error_msg = error_str.value.decode() if error_str.value else "Unknown error"
150
+ msg = f"Warning: {func.__name__} failed with error code {result}: {error_msg}"
151
+ warn(msg, stacklevel=2)
152
+ return result
153
+
154
+ return wrapper
155
+
156
+
157
+ # CUDA API calls wrapped with the decorator
158
+ @cuda_api_call
159
+ def cuInit(flags): # noqa: ANN001, ANN201, D103, N802
160
+ return cuda.cuInit(flags)
161
+
162
+
163
+ @cuda_api_call
164
+ def cuDeviceGetCount(count): # noqa: ANN001, ANN201, D103, N802
165
+ return cuda.cuDeviceGetCount(count)
166
+
167
+
168
+ @cuda_api_call
169
+ def cuDeviceGet(device, ordinal): # noqa: ANN001, ANN201, D103, N802
170
+ return cuda.cuDeviceGet(device, ordinal)
171
+
172
+
173
+ @cuda_api_call
174
+ def cuDeviceGetName(name, length, dev): # noqa: ANN001, ANN201, D103, N802
175
+ return cuda.cuDeviceGetName(name, length, dev)
176
+
177
+
178
+ @cuda_api_call
179
+ def cuDeviceComputeCapability(major, minor, dev): # noqa: ANN001, ANN201, D103, N802
180
+ return cuda.cuDeviceComputeCapability(major, minor, dev)
181
+
182
+
183
+ @cuda_api_call
184
+ def cuDeviceGetAttribute(pi, attrib, dev): # noqa: ANN001, ANN201, D103, N802
185
+ return cuda.cuDeviceGetAttribute(pi, attrib, dev)
186
+
187
+
188
+ @cuda_api_call_warn
189
+ def cuCtxCreate(pctx, flags, dev): # noqa: ANN001, ANN201, D103, N802
190
+ try:
191
+ result = cuda.cuCtxCreate_v2(pctx, flags, dev)
192
+ except AttributeError:
193
+ result = cuda.cuCtxCreate(pctx, flags, dev)
194
+ return result
195
+
196
+
197
+ @cuda_api_call_warn
198
+ def cuMemGetInfo(free, total): # noqa: ANN001, ANN201, D103, N802
199
+ try:
200
+ result = cuda.cuMemGetInfo_v2(free, total)
201
+ except AttributeError:
202
+ result = cuda.cuMemGetInfo(free, total)
203
+ return result
204
+
205
+
206
+ @cuda_api_call
207
+ def cuCtxDetach(ctx): # noqa: ANN001, ANN201, D103, N802
208
+ return cuda.cuCtxDetach(ctx)
209
+
210
+
211
+ # Main function to get CUDA device specs
212
+ def get_cuda_device_specs() -> list[dict[str, Any]]:
213
+ """Generate spec for each GPU device with format.
214
+
215
+ {
216
+ 'name': str,
217
+ 'compute_capability': (major: int, minor: int),
218
+ 'cores': int,
219
+ 'cuda_cores': int,
220
+ 'concurrent_threads': int,
221
+ 'gpu_clock_mhz': float,
222
+ 'mem_clock_mhz': float,
223
+ 'total_mem_mb': float,
224
+ 'free_mem_mb': float,
225
+ 'architecture': str,
226
+ 'cuda_cores': int
227
+ }
228
+
229
+ Returns:
230
+ A list of dictionaries containing specifications for each CUDA device.
231
+
232
+ """
233
+ # Initialize CUDA
234
+ cuInit(0)
235
+
236
+ num_gpus = ctypes.c_int()
237
+ cuDeviceGetCount(ctypes.byref(num_gpus))
238
+
239
+ device_specs = []
240
+ for i in range(num_gpus.value):
241
+ spec = {}
242
+ device = ctypes.c_int()
243
+ cuDeviceGet(ctypes.byref(device), i)
244
+
245
+ name = b" " * 100
246
+ cuDeviceGetName(ctypes.c_char_p(name), len(name), device)
247
+ spec["name"] = name.split(b"\0", 1)[0].decode()
248
+
249
+ cc_major = ctypes.c_int()
250
+ cc_minor = ctypes.c_int()
251
+ cuDeviceComputeCapability(
252
+ ctypes.byref(cc_major),
253
+ ctypes.byref(cc_minor),
254
+ device,
255
+ )
256
+ compute_capability = (cc_major.value, cc_minor.value)
257
+ spec["compute_capability"] = compute_capability
258
+
259
+ cores = ctypes.c_int()
260
+ cuDeviceGetAttribute(
261
+ ctypes.byref(cores),
262
+ CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT,
263
+ device,
264
+ )
265
+ spec["cores"] = cores.value
266
+
267
+ threads_per_core = ctypes.c_int()
268
+ cuDeviceGetAttribute(
269
+ ctypes.byref(threads_per_core),
270
+ CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR,
271
+ device,
272
+ )
273
+ spec["concurrent_threads"] = cores.value * threads_per_core.value
274
+
275
+ clockrate = ctypes.c_int()
276
+ cuDeviceGetAttribute(
277
+ ctypes.byref(clockrate),
278
+ CU_DEVICE_ATTRIBUTE_CLOCK_RATE,
279
+ device,
280
+ )
281
+ spec["gpu_clock_mhz"] = clockrate.value / 1000.0
282
+
283
+ cuDeviceGetAttribute(
284
+ ctypes.byref(clockrate),
285
+ CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE,
286
+ device,
287
+ )
288
+ spec["mem_clock_mhz"] = clockrate.value / 1000.0
289
+
290
+ context = ctypes.c_void_p()
291
+ if cuCtxCreate(ctypes.byref(context), 0, device) == CUDA_SUCCESS:
292
+ free_mem = ctypes.c_size_t()
293
+ total_mem = ctypes.c_size_t()
294
+
295
+ cuMemGetInfo(ctypes.byref(free_mem), ctypes.byref(total_mem))
296
+
297
+ spec["total_mem_mb"] = total_mem.value / 1024**2
298
+ spec["free_mem_mb"] = free_mem.value / 1024**2
299
+
300
+ spec["architecture"] = SEMVER_TO_ARCH.get(compute_capability, "unknown")
301
+ spec["cuda_cores"] = SEMVER_TO_CORES.get(
302
+ compute_capability,
303
+ "unknown",
304
+ )
305
+ spec["cuda_cores"] = (
306
+ spec["cuda_cores"] * cores.value if spec["cuda_cores"] != "unknown" else "unknown"
307
+ )
308
+ cuCtxDetach(context)
309
+
310
+ device_specs.append(spec)
311
+ return device_specs
312
+
313
+
314
+ def get_cuda_architecture() -> list[dict[str, Any]]:
315
+ """Get CUDA architecture information for each GPU device.
316
+
317
+ {
318
+ 'name': str,
319
+ 'compute_capability': (major: int, minor: int),
320
+ 'architecture': str,
321
+ }
322
+
323
+ Returns:
324
+ A list of dictionaries containing architecture information for each CUDA device.
325
+
326
+ """
327
+ # Initialize CUDA
328
+ cuInit(0)
329
+
330
+ num_gpus = ctypes.c_int()
331
+ cuDeviceGetCount(ctypes.byref(num_gpus))
332
+
333
+ device_specs = []
334
+ for i in range(num_gpus.value):
335
+ spec = {}
336
+ device = ctypes.c_int()
337
+ cuDeviceGet(ctypes.byref(device), i)
338
+
339
+ name = b" " * 100
340
+ cuDeviceGetName(ctypes.c_char_p(name), len(name), device)
341
+ spec["name"] = name.split(b"\0", 1)[0].decode()
342
+
343
+ cc_major = ctypes.c_int()
344
+ cc_minor = ctypes.c_int()
345
+ cuDeviceComputeCapability(
346
+ ctypes.byref(cc_major),
347
+ ctypes.byref(cc_minor),
348
+ device,
349
+ )
350
+ compute_capability = (cc_major.value, cc_minor.value)
351
+ spec["compute_capability"] = compute_capability
352
+ context = ctypes.c_void_p()
353
+ if cuCtxCreate(ctypes.byref(context), 0, device) == CUDA_SUCCESS:
354
+ spec["architecture"] = SEMVER_TO_ARCH.get(compute_capability, "unknown")
355
+ cuCtxDetach(context)
356
+
357
+ device_specs.append(spec)
358
+ return device_specs
359
+
360
+
361
+ def retrieve_cuda_version() -> float:
362
+ """Retrieve the CUDA driver version.
363
+
364
+ Returns:
365
+ str: CUDA version in the format "major.minor" or "unknown" if retrieval fails.
366
+
367
+ """
368
+ try:
369
+ version = ctypes.c_int()
370
+ cuda.cuDriverGetVersion(ctypes.byref(version))
371
+ major = version.value // 1000
372
+ minor = (version.value % 1000) // 10
373
+ except (AttributeError, OSError, ctypes.ArgumentError) as e:
374
+ logger.warning("Could not retrieve CUDA version: %s", e)
375
+ return -1
376
+ else:
377
+ return float(f"{major}.{minor}")
378
+
379
+
380
+ if __name__ == "__main__":
381
+ print(json.dumps(get_cuda_device_specs(), indent=2)) # noqa: T201
382
+ print(json.dumps(get_cuda_architecture(), indent=2)) # noqa: T201
383
+ cuda_archtecture_dict = get_cuda_architecture()[0] # Get the first device's architecture
384
+ arch_option = (
385
+ "sm_"
386
+ + str(cuda_archtecture_dict["compute_capability"][0])
387
+ + str(cuda_archtecture_dict["compute_capability"][1])
388
+ )
389
+ print(arch_option) # noqa: T201
390
+
391
+ cuda_version = retrieve_cuda_version()
392
+ print(f"CUDA Version: {cuda_version}") # noqa: T201