capytaine 2.1__tar.gz → 2.2__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.
Files changed (234) hide show
  1. {capytaine-2.1 → capytaine-2.2}/.github/workflows/build_docs.yml +7 -0
  2. {capytaine-2.1 → capytaine-2.2}/.github/workflows/build_wheels.yaml +3 -2
  3. capytaine-2.2/.github/workflows/test_new_commits.yaml +71 -0
  4. {capytaine-2.1 → capytaine-2.2}/.github/workflows/test_with_latest_dependencies.yaml +2 -2
  5. {capytaine-2.1 → capytaine-2.2}/.pre-commit-config.yaml +1 -1
  6. {capytaine-2.1 → capytaine-2.2}/Makefile +2 -2
  7. {capytaine-2.1 → capytaine-2.2}/PKG-INFO +3 -8
  8. {capytaine-2.1 → capytaine-2.2}/capytaine/__about__.py +1 -1
  9. {capytaine-2.1 → capytaine-2.2}/capytaine/bem/problems_and_results.py +13 -8
  10. {capytaine-2.1 → capytaine-2.2}/capytaine/bem/solver.py +57 -23
  11. {capytaine-2.1 → capytaine-2.2}/capytaine/bodies/bodies.py +125 -24
  12. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/delhommeau.py +103 -51
  13. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/Makefile +1 -1
  14. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/benchmarks/openmp/benchmark_omp.f90 +15 -7
  15. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/benchmarks/profiling/benchmark_profiling.f90 +40 -32
  16. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/benchmarks/tabulations/benchmark_tabulation.f90 +15 -12
  17. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/examples/minimal/minimal_example.f90 +24 -14
  18. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/src/Delhommeau_integrals.f90 +62 -67
  19. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/src/Green_Rankine.f90 +2 -2
  20. capytaine-2.2/capytaine/green_functions/libDelhommeau/src/Green_wave.f90 +402 -0
  21. capytaine-2.2/capytaine/green_functions/libDelhommeau/src/constants.f90 +45 -0
  22. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/src/float32.f90 +3 -0
  23. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/src/float64.f90 +3 -0
  24. capytaine-2.2/capytaine/green_functions/libDelhommeau/src/matrices.f90 +302 -0
  25. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/src/old_Prony_decomposition.f90 +3 -2
  26. {capytaine-2.1 → capytaine-2.2}/capytaine/io/mesh_loaders.py +48 -24
  27. {capytaine-2.1 → capytaine-2.2}/capytaine/io/meshio.py +4 -1
  28. {capytaine-2.1 → capytaine-2.2}/capytaine/io/xarray.py +4 -2
  29. {capytaine-2.1 → capytaine-2.2}/capytaine/matrices/linear_solvers.py +2 -3
  30. {capytaine-2.1 → capytaine-2.2}/capytaine/meshes/collections.py +13 -2
  31. {capytaine-2.1 → capytaine-2.2}/capytaine/meshes/meshes.py +124 -2
  32. {capytaine-2.1 → capytaine-2.2}/capytaine/meshes/predefined/cylinders.py +2 -2
  33. {capytaine-2.1 → capytaine-2.2}/capytaine/meshes/properties.py +43 -0
  34. {capytaine-2.1 → capytaine-2.2}/capytaine/post_pro/rao.py +1 -1
  35. {capytaine-2.1 → capytaine-2.2}/capytaine/tools/cache_on_disk.py +3 -1
  36. {capytaine-2.1 → capytaine-2.2}/capytaine/tools/symbolic_multiplication.py +5 -2
  37. {capytaine-2.1 → capytaine-2.2}/capytaine/ui/vtk/body_viewer.py +2 -0
  38. capytaine-2.2/code_of_conduct.md +133 -0
  39. capytaine-2.2/docs/_templates/layout.html +10 -0
  40. {capytaine-2.1 → capytaine-2.2}/docs/changelog.rst +83 -12
  41. {capytaine-2.1 → capytaine-2.2}/docs/conf.py +18 -62
  42. {capytaine-2.1 → capytaine-2.2}/docs/developer_manual/installation.rst +3 -0
  43. capytaine-2.2/docs/developer_manual/overview.rst +143 -0
  44. {capytaine-2.1 → capytaine-2.2}/docs/features.rst +1 -0
  45. {capytaine-2.1 → capytaine-2.2}/docs/index.rst +3 -1
  46. {capytaine-2.1 → capytaine-2.2}/docs/theory_manual/theory.rst +145 -59
  47. capytaine-2.2/docs/user_manual/body.rst +173 -0
  48. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/cookbook.rst +14 -8
  49. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/compare_Green_functions.py +6 -6
  50. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/convergence_study.py +1 -1
  51. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/haskind.py +1 -1
  52. capytaine-2.2/docs/user_manual/examples/irregular_frequency_removal.py +76 -0
  53. capytaine-2.2/docs/user_manual/examples/pressure_on_hull.py +15 -0
  54. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/index.rst +1 -0
  55. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/installation.rst +8 -11
  56. capytaine-2.2/docs/user_manual/mesh.rst +370 -0
  57. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/outputs.rst +115 -4
  58. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/resolution.rst +30 -11
  59. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/tutorial.rst +25 -22
  60. capytaine-2.2/editable_install_requirements.txt +12 -0
  61. {capytaine-2.1 → capytaine-2.2}/meson.build +3 -30
  62. capytaine-2.2/noxfile.py +104 -0
  63. {capytaine-2.1 → capytaine-2.2}/pyproject.toml +12 -5
  64. capytaine-2.2/pytest/envs/2023-08-01-py3.8.txt +92 -0
  65. capytaine-2.2/pytest/envs/2024-04-08-py3.12.txt +80 -0
  66. capytaine-2.2/pytest/mesh_files_examples/cylinder2.msh +143 -0
  67. capytaine-2.2/pytest/mesh_files_examples/cylinder4.msh +277 -0
  68. capytaine-2.2/pytest/test_bem_engines.py +55 -0
  69. capytaine-2.2/pytest/test_bem_green_function_fortran_core.py +217 -0
  70. capytaine-2.1/pytest/test_bem_engines.py → capytaine-2.2/pytest/test_bem_green_function_matrix_shape.py +7 -61
  71. capytaine-2.1/pytest/test_bem_green_functions_table_density.py → capytaine-2.2/pytest/test_bem_green_function_table_density.py +7 -8
  72. {capytaine-2.1 → capytaine-2.2}/pytest/test_bem_hierarchical_toeplitz_matrices.py +0 -2
  73. capytaine-2.2/pytest/test_bem_irregular_frequencies_removal.py +225 -0
  74. {capytaine-2.1 → capytaine-2.2}/pytest/test_bem_linear_combination_of_dofs.py +3 -3
  75. {capytaine-2.1 → capytaine-2.2}/pytest/test_bem_potential_velocity_and_free_surface_elevation.py +0 -3
  76. {capytaine-2.1 → capytaine-2.2}/pytest/test_bem_problems_and_results.py +22 -2
  77. {capytaine-2.1 → capytaine-2.2}/pytest/test_bem_solver.py +21 -57
  78. capytaine-2.2/pytest/test_bem_zero_and_infinite_freq.py +58 -0
  79. {capytaine-2.1 → capytaine-2.2}/pytest/test_bodies.py +37 -46
  80. {capytaine-2.1 → capytaine-2.2}/pytest/test_bodies_predefined.py +11 -14
  81. {capytaine-2.1 → capytaine-2.2}/pytest/test_consistency_with_Nemoh_2.py +7 -6
  82. {capytaine-2.1 → capytaine-2.2}/pytest/test_hydrostatics.py +0 -2
  83. {capytaine-2.1 → capytaine-2.2}/pytest/test_io.py +4 -4
  84. capytaine-2.2/pytest/test_io_mehses_mar.py +53 -0
  85. capytaine-2.2/pytest/test_io_meshes.py +134 -0
  86. capytaine-2.2/pytest/test_io_meshes_gdf.py +147 -0
  87. capytaine-2.2/pytest/test_io_meshes_hst.py +169 -0
  88. capytaine-2.2/pytest/test_io_meshes_pnl.py +164 -0
  89. {capytaine-2.1 → capytaine-2.2}/pytest/test_matrices.py +0 -3
  90. {capytaine-2.1 → capytaine-2.2}/pytest/test_meshes.py +127 -34
  91. {capytaine-2.1 → capytaine-2.2}/pytest/test_meshes_collections_and_symmetries.py +32 -31
  92. {capytaine-2.1 → capytaine-2.2}/pytest/test_meshes_geometry.py +0 -2
  93. capytaine-2.2/pytest/test_meshes_lid_generation.py +89 -0
  94. {capytaine-2.1 → capytaine-2.2}/pytest/test_meshes_predefined.py +7 -3
  95. {capytaine-2.1 → capytaine-2.2}/pytest/test_post_pro_kochin.py +0 -2
  96. {capytaine-2.1 → capytaine-2.2}/pytest/test_ui_matplotlib.py +0 -2
  97. {capytaine-2.1 → capytaine-2.2}/pytest/test_ui_vtk.py +0 -3
  98. capytaine-2.1/.github/workflows/test_new_commits.yaml +0 -44
  99. capytaine-2.1/capytaine/green_functions/libDelhommeau/src/Green_wave.f90 +0 -311
  100. capytaine-2.1/capytaine/green_functions/libDelhommeau/src/constants.f90 +0 -16
  101. capytaine-2.1/capytaine/green_functions/libDelhommeau/src/matrices.f90 +0 -320
  102. capytaine-2.1/docs/_templates/layout.html +0 -6
  103. capytaine-2.1/docs/developer_manual/overview.rst +0 -154
  104. capytaine-2.1/docs/user_manual/examples/symmetric_body.py +0 -24
  105. capytaine-2.1/docs/user_manual/mesh.rst +0 -296
  106. capytaine-2.1/noxfile.py +0 -55
  107. capytaine-2.1/pytest/envs/2023-11-07.lock +0 -1132
  108. capytaine-2.1/pytest/test_bem_green_functions.py +0 -140
  109. capytaine-2.1/pytest/test_io_meshes.py +0 -365
  110. {capytaine-2.1 → capytaine-2.2}/.gitignore +0 -0
  111. {capytaine-2.1 → capytaine-2.2}/.zenodo.json +0 -0
  112. {capytaine-2.1 → capytaine-2.2}/CONTRIBUTING.md +0 -0
  113. {capytaine-2.1 → capytaine-2.2}/Dockerfile +0 -0
  114. {capytaine-2.1 → capytaine-2.2}/LICENSE +0 -0
  115. {capytaine-2.1 → capytaine-2.2}/README.md +0 -0
  116. {capytaine-2.1 → capytaine-2.2}/capytaine/__init__.py +0 -0
  117. {capytaine-2.1 → capytaine-2.2}/capytaine/bem/__init__.py +0 -0
  118. {capytaine-2.1 → capytaine-2.2}/capytaine/bem/airy_waves.py +0 -0
  119. {capytaine-2.1 → capytaine-2.2}/capytaine/bem/engines.py +0 -0
  120. {capytaine-2.1 → capytaine-2.2}/capytaine/bodies/__init__.py +0 -0
  121. {capytaine-2.1 → capytaine-2.2}/capytaine/bodies/dofs.py +0 -0
  122. {capytaine-2.1 → capytaine-2.2}/capytaine/bodies/predefined/__init__.py +0 -0
  123. {capytaine-2.1 → capytaine-2.2}/capytaine/bodies/predefined/cylinders.py +0 -0
  124. {capytaine-2.1 → capytaine-2.2}/capytaine/bodies/predefined/rectangles.py +0 -0
  125. {capytaine-2.1 → capytaine-2.2}/capytaine/bodies/predefined/spheres.py +0 -0
  126. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/__init__.py +0 -0
  127. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/abstract_green_function.py +0 -0
  128. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/.gitignore +0 -0
  129. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/LICENSE +0 -0
  130. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/README.md +0 -0
  131. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/benchmarks/openmp/display_mesh.py +0 -0
  132. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/benchmarks/openmp/read_output.py +0 -0
  133. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/examples/minimal/minimal_example.py +0 -0
  134. {capytaine-2.1 → capytaine-2.2}/capytaine/green_functions/libs/__init__.py +0 -0
  135. {capytaine-2.1 → capytaine-2.2}/capytaine/io/__init__.py +0 -0
  136. {capytaine-2.1 → capytaine-2.2}/capytaine/io/bemio.py +0 -0
  137. {capytaine-2.1 → capytaine-2.2}/capytaine/io/legacy.py +0 -0
  138. {capytaine-2.1 → capytaine-2.2}/capytaine/io/mesh_writers.py +0 -0
  139. {capytaine-2.1 → capytaine-2.2}/capytaine/matrices/__init__.py +0 -0
  140. {capytaine-2.1 → capytaine-2.2}/capytaine/matrices/block.py +0 -0
  141. {capytaine-2.1 → capytaine-2.2}/capytaine/matrices/block_toeplitz.py +0 -0
  142. {capytaine-2.1 → capytaine-2.2}/capytaine/matrices/builders.py +0 -0
  143. {capytaine-2.1 → capytaine-2.2}/capytaine/matrices/low_rank.py +0 -0
  144. {capytaine-2.1 → capytaine-2.2}/capytaine/meshes/__init__.py +0 -0
  145. {capytaine-2.1 → capytaine-2.2}/capytaine/meshes/clipper.py +0 -0
  146. {capytaine-2.1 → capytaine-2.2}/capytaine/meshes/geometry.py +0 -0
  147. {capytaine-2.1 → capytaine-2.2}/capytaine/meshes/predefined/__init__.py +0 -0
  148. {capytaine-2.1 → capytaine-2.2}/capytaine/meshes/predefined/rectangles.py +0 -0
  149. {capytaine-2.1 → capytaine-2.2}/capytaine/meshes/predefined/spheres.py +0 -0
  150. {capytaine-2.1 → capytaine-2.2}/capytaine/meshes/quadratures.py +0 -0
  151. {capytaine-2.1 → capytaine-2.2}/capytaine/meshes/quality.py +0 -0
  152. {capytaine-2.1 → capytaine-2.2}/capytaine/meshes/surface_integrals.py +0 -0
  153. {capytaine-2.1 → capytaine-2.2}/capytaine/meshes/symmetric.py +0 -0
  154. {capytaine-2.1 → capytaine-2.2}/capytaine/post_pro/__init__.py +0 -0
  155. {capytaine-2.1 → capytaine-2.2}/capytaine/post_pro/free_surfaces.py +0 -0
  156. {capytaine-2.1 → capytaine-2.2}/capytaine/post_pro/impedance.py +0 -0
  157. {capytaine-2.1 → capytaine-2.2}/capytaine/post_pro/kochin.py +0 -0
  158. {capytaine-2.1 → capytaine-2.2}/capytaine/tools/__init__.py +0 -0
  159. {capytaine-2.1 → capytaine-2.2}/capytaine/tools/deprecation_handling.py +0 -0
  160. {capytaine-2.1 → capytaine-2.2}/capytaine/tools/lists_of_points.py +0 -0
  161. {capytaine-2.1 → capytaine-2.2}/capytaine/tools/lru_cache.py +0 -0
  162. {capytaine-2.1 → capytaine-2.2}/capytaine/tools/optional_imports.py +0 -0
  163. {capytaine-2.1 → capytaine-2.2}/capytaine/tools/prony_decomposition.py +0 -0
  164. {capytaine-2.1 → capytaine-2.2}/capytaine/ui/__init__.py +0 -0
  165. {capytaine-2.1 → capytaine-2.2}/capytaine/ui/cli.py +0 -0
  166. {capytaine-2.1 → capytaine-2.2}/capytaine/ui/rich.py +0 -0
  167. {capytaine-2.1 → capytaine-2.2}/capytaine/ui/vtk/__init__.py +0 -0
  168. {capytaine-2.1 → capytaine-2.2}/capytaine/ui/vtk/animation.py +0 -0
  169. {capytaine-2.1 → capytaine-2.2}/capytaine/ui/vtk/helpers.py +0 -0
  170. {capytaine-2.1 → capytaine-2.2}/capytaine/ui/vtk/mesh_viewer.py +0 -0
  171. {capytaine-2.1 → capytaine-2.2}/capytaine.scm +0 -0
  172. {capytaine-2.1 → capytaine-2.2}/docs/Makefile +0 -0
  173. {capytaine-2.1 → capytaine-2.2}/docs/_static/custom.css +0 -0
  174. {capytaine-2.1 → capytaine-2.2}/docs/_static/proof.css +0 -0
  175. {capytaine-2.1 → capytaine-2.2}/docs/_static/proof.js +0 -0
  176. {capytaine-2.1 → capytaine-2.2}/docs/citing.rst +0 -0
  177. {capytaine-2.1 → capytaine-2.2}/docs/developer_manual/index.rst +0 -0
  178. {capytaine-2.1 → capytaine-2.2}/docs/theory_manual/bibliography.rst +0 -0
  179. {capytaine-2.1 → capytaine-2.2}/docs/theory_manual/index.rst +0 -0
  180. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/conventions.rst +0 -0
  181. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/Malenica_forward_speed.py +0 -0
  182. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/Nemoh.cal +0 -0
  183. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/animate_free_surface.py +0 -0
  184. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/axisymmetric_buoy.py +0 -0
  185. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/boat_200.mar +0 -0
  186. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/boat_animation.py +0 -0
  187. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/custom_Green_function.py +0 -0
  188. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/custom_dofs.py +0 -0
  189. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/elasticity_of_beam.py +0 -0
  190. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/finite_depth_cylinder.py +0 -0
  191. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/free_surface_elevation.py +0 -0
  192. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/hydrostatics.py +0 -0
  193. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/kochin.py +0 -0
  194. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/multibody.py +0 -0
  195. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/plot_influence_matrix.py +0 -0
  196. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/plot_velocity_in_domain.py +0 -0
  197. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/preconditioner.py +0 -0
  198. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/quickstart.py +0 -0
  199. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/examples/radiation_cylinder.py +0 -0
  200. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/hydrostatics.rst +0 -0
  201. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/post_pro.rst +0 -0
  202. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/problem_setup.rst +0 -0
  203. {capytaine-2.1 → capytaine-2.2}/docs/user_manual/quickstart.rst +0 -0
  204. {capytaine-2.1 → capytaine-2.2}/pytest/Bemio_verification_cases/sphere.out +0 -0
  205. {capytaine-2.1 → capytaine-2.2}/pytest/Hydrostatics_cases/sphere__hor_cyl__ver_cyl.pkl.json +0 -0
  206. {capytaine-2.1 → capytaine-2.2}/pytest/Nemoh_verification_cases/Cylinder/Cylinder.dat +0 -0
  207. {capytaine-2.1 → capytaine-2.2}/pytest/Nemoh_verification_cases/Cylinder/Nemoh.cal +0 -0
  208. {capytaine-2.1 → capytaine-2.2}/pytest/Nemoh_verification_cases/Cylinder/Nemoh_v3.cal +0 -0
  209. {capytaine-2.1 → capytaine-2.2}/pytest/Nemoh_verification_cases/Cylinder/reference_results/DiffractionForce.tec +0 -0
  210. {capytaine-2.1 → capytaine-2.2}/pytest/Nemoh_verification_cases/Cylinder/reference_results/ExcitationForce.tec +0 -0
  211. {capytaine-2.1 → capytaine-2.2}/pytest/Nemoh_verification_cases/Cylinder/reference_results/RadiationCoefficients.tec +0 -0
  212. {capytaine-2.1 → capytaine-2.2}/pytest/Nemoh_verification_cases/Nemoh.m +0 -0
  213. {capytaine-2.1 → capytaine-2.2}/pytest/Nemoh_verification_cases/NonSymmetrical/Nemoh.cal +0 -0
  214. {capytaine-2.1 → capytaine-2.2}/pytest/Nemoh_verification_cases/NonSymmetrical/Nemoh_v3.cal +0 -0
  215. {capytaine-2.1 → capytaine-2.2}/pytest/Nemoh_verification_cases/NonSymmetrical/NonSymmetrical.dat +0 -0
  216. {capytaine-2.1 → capytaine-2.2}/pytest/Nemoh_verification_cases/NonSymmetrical/reference_results/DiffractionForce.tec +0 -0
  217. {capytaine-2.1 → capytaine-2.2}/pytest/Nemoh_verification_cases/NonSymmetrical/reference_results/ExcitationForce.tec +0 -0
  218. {capytaine-2.1 → capytaine-2.2}/pytest/Nemoh_verification_cases/NonSymmetrical/reference_results/RadiationCoefficients.tec +0 -0
  219. {capytaine-2.1 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/single_body/Hydrostatics.dat +0 -0
  220. {capytaine-2.1 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/single_body/KH.dat +0 -0
  221. {capytaine-2.1 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/single_body_list/Hydrostatics.dat +0 -0
  222. {capytaine-2.1 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/single_body_list/KH.dat +0 -0
  223. {capytaine-2.1 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/two_bodies_list/Hydrostatics_0.dat +0 -0
  224. {capytaine-2.1 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/two_bodies_list/Hydrostatics_1.dat +0 -0
  225. {capytaine-2.1 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/two_bodies_list/KH_0.dat +0 -0
  226. {capytaine-2.1 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/two_bodies_list/KH_1.dat +0 -0
  227. {capytaine-2.1 → capytaine-2.2}/pytest/mesh_files_examples/barge.med +0 -0
  228. {capytaine-2.1 → capytaine-2.2}/pytest/test_airy_waves.py +0 -0
  229. {capytaine-2.1 → capytaine-2.2}/pytest/test_bem_with_quadratures.py +0 -0
  230. {capytaine-2.1 → capytaine-2.2}/pytest/test_forward_speed.py +0 -0
  231. {capytaine-2.1 → capytaine-2.2}/pytest/test_linear_solvers.py +0 -0
  232. {capytaine-2.1 → capytaine-2.2}/pytest/test_post_pro.py +0 -0
  233. {capytaine-2.1 → capytaine-2.2}/pytest/test_tool_lru_cache.py +0 -0
  234. {capytaine-2.1 → capytaine-2.2}/pytest/test_tool_symbolic_multiplication.py +0 -0
@@ -14,6 +14,13 @@ on:
14
14
  workflow_dispatch:
15
15
 
16
16
 
17
+ # The following block is meant to cancel the workflow if a newer commit is pushed on the pull request
18
+ # From https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre
19
+ concurrency:
20
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
21
+ cancel-in-progress: true
22
+
23
+
17
24
  jobs:
18
25
  build:
19
26
 
@@ -6,7 +6,7 @@ on:
6
6
  tags:
7
7
  - v*
8
8
  schedule:
9
- - cron: '5 5 5/15 * *' # On the 5th and 20th of each month at 5:05
9
+ - cron: '6 6 6/16 * *' # On the 6th and 22nd of each month at 6:06
10
10
 
11
11
 
12
12
  jobs:
@@ -15,7 +15,8 @@ jobs:
15
15
  runs-on: ${{ matrix.os }}
16
16
  strategy:
17
17
  matrix:
18
- os: [ubuntu-20.04, macos-11, windows-2019]
18
+ os: [ubuntu-20.04, macos-12, macos-14, windows-2019]
19
+ # MacOS<=13 are Intel, while MacOS 14 is Apple Silicon
19
20
 
20
21
  steps:
21
22
  - uses: actions/checkout@v4
@@ -0,0 +1,71 @@
1
+ name: Build and test in fixed environments
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - 'master'
7
+ paths-ignore:
8
+ # Do not run if only the documentation has been changed
9
+ - 'docs/**'
10
+ - '**/*.md'
11
+ pull_request:
12
+ paths-ignore:
13
+ # Do not run if only the documentation has been changed
14
+ - 'docs/**'
15
+ - '**/*.md'
16
+
17
+ env:
18
+ FORCE_COLOR: 3
19
+ # Colors for nox
20
+
21
+ # The following block is meant to cancel the workflow if a newer commit is pushed on the pull request
22
+ # From https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre
23
+ concurrency:
24
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
25
+ cancel-in-progress: true
26
+
27
+ jobs:
28
+ build_and_test:
29
+
30
+ runs-on: ubuntu-latest
31
+
32
+ strategy:
33
+ matrix:
34
+ python-version: ['3.8', '3.12']
35
+
36
+ steps:
37
+
38
+ - name: Checkout repository
39
+ uses: actions/checkout@v4
40
+
41
+ - name: Set up Python ${{ matrix.python-version }}
42
+ uses: actions/setup-python@v5
43
+ with:
44
+ python-version: ${{ matrix.python-version }}
45
+
46
+ - name: Set up nox
47
+ uses: wntrblm/nox@2024.03.02
48
+
49
+ - name: Run nox session
50
+ run: nox -s build_and_test_on_locked_env
51
+
52
+ compile_fortran:
53
+
54
+ runs-on: ubuntu-latest
55
+
56
+ steps:
57
+
58
+ - name: Checkout repository
59
+ uses: actions/checkout@v4
60
+
61
+ - name: Set up Fortran
62
+ uses: fortran-lang/setup-fortran@v1
63
+ with:
64
+ compiler: 'gcc'
65
+ version: '13'
66
+
67
+ - name: Compile and run example
68
+ working-directory: capytaine/green_functions/libDelhommeau/
69
+ run: make example && examples/minimal/minimal_example.bin
70
+ # Soundness of the results is not tested, only that the compiling and
71
+ # execution are succeeding.
@@ -16,7 +16,7 @@ jobs:
16
16
 
17
17
  strategy:
18
18
  matrix:
19
- python-version: ['3.7', '3.12']
19
+ python-version: ['3.8', '3.12']
20
20
 
21
21
  steps:
22
22
 
@@ -32,4 +32,4 @@ jobs:
32
32
  uses: wntrblm/nox@2024.03.02
33
33
 
34
34
  - name: Run nox session
35
- run: nox -s build_and_test_on_latest_env
35
+ run: nox -s build_and_test_on_latest_env editable_build_and_test_on_latest_env
@@ -37,4 +37,4 @@ repos:
37
37
  rev: "v2.2.5"
38
38
  hooks:
39
39
  - id: codespell
40
- args: ["-L", "ba,informations,inout,ist,lamda,ment,noe,periode,sur"]
40
+ args: ["-L", "ba,informations,inout,ist,lamda,ment,noe,periode,sur", "--skip", "capytaine/green_functions/libDelhommeau/src/old_Prony_decomposition.f90"]
@@ -2,8 +2,8 @@ install:
2
2
  pip install .
3
3
 
4
4
  develop:
5
- pip install meson-python ninja "numpy>=2.0.0rc1,<2.3" charset-normalizer # No installed from pyproject.toml in this case...
6
- pip install --no-build-isolation -e .
5
+ pip install -r editable_install_requirements.txt
6
+ pip install --no-build-isolation --editable .
7
7
 
8
8
  TEMP_DIR := $(shell mktemp -d)
9
9
  test_fortran_compilation:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: capytaine
3
- Version: 2.1
3
+ Version: 2.2
4
4
  Summary: Python BEM solver for linear potential flow, based on Nemoh
5
5
  Author-Email: Matthieu Ancellin <matthieu.ancellin@eurobios.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -684,7 +684,8 @@ Classifier: License :: OSI Approved :: GNU General Public License v3 or later (G
684
684
  Classifier: Topic :: Scientific/Engineering
685
685
  Project-URL: Repository, https://github.com/capytaine/capytaine
686
686
  Requires-Python: >=3.8
687
- Requires-Dist: numpy>=1.20
687
+ Requires-Dist: numpy>=1.20; python_version >= "3.9"
688
+ Requires-Dist: numpy>=1.24; python_version == "3.8"
688
689
  Requires-Dist: scipy
689
690
  Requires-Dist: pandas>=1.3
690
691
  Requires-Dist: xarray
@@ -692,18 +693,12 @@ Requires-Dist: rich
692
693
  Requires-Dist: matplotlib; extra == "optional"
693
694
  Requires-Dist: joblib>=1.3; extra == "optional"
694
695
  Requires-Dist: meshio; extra == "optional"
695
- Requires-Dist: quadpy-gpl; extra == "optional"
696
- Requires-Dist: numpy<=1.26.2; extra == "build"
697
- Requires-Dist: ninja; extra == "build"
698
- Requires-Dist: meson-python; extra == "build"
699
- Requires-Dist: charset-normalizer; extra == "build"
700
696
  Requires-Dist: pytest; extra == "test"
701
697
  Requires-Dist: sphinx; extra == "docs"
702
698
  Requires-Dist: sphinx-toolbox; extra == "docs"
703
699
  Requires-Dist: sphinxcontrib-proof; extra == "docs"
704
700
  Requires-Dist: sphinxcontrib-mermaid; extra == "docs"
705
701
  Provides-Extra: optional
706
- Provides-Extra: build
707
702
  Provides-Extra: test
708
703
  Provides-Extra: docs
709
704
  Description-Content-Type: text/markdown
@@ -5,7 +5,7 @@ __all__ = ["__title__", "__description__", "__version__", "__author__", "__uri__
5
5
  __title__ = "capytaine"
6
6
  __description__ = """Python BEM solver for linear potential flow, based on Nemoh"""
7
7
 
8
- __version__ = "2.1"
8
+ __version__ = "2.2"
9
9
 
10
10
  __author__ = "Matthieu Ancellin"
11
11
  __uri__ = "https://github.com/capytaine/capytaine"
@@ -193,7 +193,7 @@ class LinearPotentialFlowProblem:
193
193
  or len(self.body.mesh.faces) == 0):
194
194
  raise ValueError(f"The mesh of the body {self.body.__short_str__()} is empty.")
195
195
 
196
- panels_above_fs = self.body.mesh.faces_centers[:, 2] >= self.free_surface
196
+ panels_above_fs = self.body.mesh.faces_centers[:, 2] >= self.free_surface + 1e-8
197
197
  panels_below_sb = self.body.mesh.faces_centers[:, 2] <= -self.water_depth
198
198
  if (any(panels_above_fs) or any(panels_below_sb)):
199
199
 
@@ -218,7 +218,7 @@ class LinearPotentialFlowProblem:
218
218
  if len(self.boundary_condition.shape) != 1:
219
219
  raise ValueError(f"Expected a 1-dimensional array as boundary_condition. Provided boundary condition's shape: {self.boundary_condition.shape}.")
220
220
 
221
- if self.boundary_condition.shape[0] != self.body.mesh.nb_faces:
221
+ if self.boundary_condition.shape[0] != self.body.mesh_including_lid.nb_faces:
222
222
  raise ValueError(
223
223
  f"The shape of the boundary condition ({self.boundary_condition.shape})"
224
224
  f"does not match the number of faces of the mesh ({self.body.mesh.nb_faces})."
@@ -256,7 +256,7 @@ class LinearPotentialFlowProblem:
256
256
  def __str__(self):
257
257
  """Do not display default values in str(problem)."""
258
258
  parameters = [f"body={self.body.__short_str__() if self.body is not None else None}",
259
- f"{self.provided_freq_type}={self.__getattribute__(self.provided_freq_type):.3f}",
259
+ f"{self.provided_freq_type}={float(self.__getattribute__(self.provided_freq_type)):.3f}",
260
260
  f"water_depth={self.water_depth}"]
261
261
 
262
262
  if not self.forward_speed == _default_parameters['forward_speed']:
@@ -345,7 +345,7 @@ class DiffractionProblem(LinearPotentialFlowProblem):
345
345
  forward_speed=forward_speed, rho=rho, g=g)
346
346
 
347
347
  if float(self.omega) in {0.0, np.inf}:
348
- raise NotImplementedError(f"DiffractionProblem does not support zero or infinite frequency.")
348
+ raise NotImplementedError("DiffractionProblem does not support zero or infinite frequency.")
349
349
 
350
350
  if self.body is not None:
351
351
 
@@ -356,6 +356,9 @@ class DiffractionProblem(LinearPotentialFlowProblem):
356
356
  # Note that even with forward speed, this is computed based on the
357
357
  # frequency and not the encounter frequency.
358
358
 
359
+ if self.body.lid_mesh is not None:
360
+ self.boundary_condition = np.concatenate([self.boundary_condition, np.zeros(self.body.lid_mesh.nb_faces)])
361
+
359
362
  if len(self.body.dofs) == 0:
360
363
  LOG.warning(f"The body {self.body.name} used in diffraction problem has no dofs!")
361
364
 
@@ -398,10 +401,9 @@ class RadiationProblem(LinearPotentialFlowProblem):
398
401
  self.radiating_dof = next(iter(self.body.dofs))
399
402
 
400
403
  if self.radiating_dof not in self.body.dofs:
401
- LOG.error(f"In {self}: the radiating degree of freedom {self.radiating_dof} is not one of"
402
- f"the degrees of freedom of the body.\n"
403
- f"The dofs of the body are {list(self.body.dofs.keys())}")
404
- raise ValueError("Unrecognized degree of freedom name.")
404
+ raise ValueError(f"In {self}:\n"
405
+ f"the radiating dof {repr(self.radiating_dof)} is not one of the degrees of freedom of the body.\n"
406
+ f"The dofs of the body are {list(self.body.dofs.keys())}")
405
407
 
406
408
  dof = self.body.dofs[self.radiating_dof]
407
409
 
@@ -422,6 +424,9 @@ class RadiationProblem(LinearPotentialFlowProblem):
422
424
  )
423
425
  self.boundary_condition += self.forward_speed * ddofdx_dot_n
424
426
 
427
+ if self.body.lid_mesh is not None:
428
+ self.boundary_condition = np.concatenate([self.boundary_condition, np.zeros(self.body.lid_mesh.nb_faces)])
429
+
425
430
 
426
431
  def _astuple(self):
427
432
  return super()._astuple() + (self.radiating_dof,)
@@ -1,5 +1,5 @@
1
- # Copyright (C) 2017-2019 Matthieu Ancellin
2
- # See LICENSE file at <https://github.com/mancellin/capytaine>
1
+ # Copyright (C) 2017-2024 Matthieu Ancellin
2
+ # See LICENSE file at <https://github.com/capytaine/capytaine>
3
3
  """Solver for the BEM problem.
4
4
 
5
5
  .. code-block:: python
@@ -93,7 +93,9 @@ class BEMSolver:
93
93
  """
94
94
  LOG.info("Solve %s.", problem)
95
95
 
96
- if _check_wavelength: self._check_wavelength([problem])
96
+ if _check_wavelength:
97
+ self._check_wavelength_and_mesh_resolution([problem])
98
+ self._check_wavelength_and_irregular_frequencies([problem])
97
99
 
98
100
  if problem.forward_speed != 0.0:
99
101
  omega, wavenumber = problem.encounter_omega, problem.encounter_wavenumber
@@ -106,7 +108,7 @@ class BEMSolver:
106
108
  raise NotImplementedError("Direct solver is not able to solve problems with forward speed.")
107
109
 
108
110
  S, D = self.engine.build_matrices(
109
- problem.body.mesh, problem.body.mesh,
111
+ problem.body.mesh_including_lid, problem.body.mesh_including_lid,
110
112
  problem.free_surface, problem.water_depth, wavenumber,
111
113
  self.green_function, adjoint_double_layer=False
112
114
  )
@@ -116,7 +118,7 @@ class BEMSolver:
116
118
  sources = None
117
119
  else:
118
120
  S, K = self.engine.build_matrices(
119
- problem.body.mesh, problem.body.mesh,
121
+ problem.body.mesh_including_lid, problem.body.mesh_including_lid,
120
122
  problem.free_surface, problem.water_depth, wavenumber,
121
123
  self.green_function, adjoint_double_layer=True
122
124
  )
@@ -127,10 +129,11 @@ class BEMSolver:
127
129
  if problem.forward_speed != 0.0:
128
130
  result = problem.make_results_container(sources=sources)
129
131
  # Temporary result object to compute the ∇Φ term
130
- nabla_phi = self._compute_potential_gradient(problem.body.mesh, result)
132
+ nabla_phi = self._compute_potential_gradient(problem.body.mesh_including_lid, result)
131
133
  pressure += problem.rho * problem.forward_speed * nabla_phi[:, 0]
132
134
 
133
- forces = problem.body.integrate_pressure(pressure)
135
+ pressure_on_hull = pressure[:problem.body.mesh.nb_faces] # Discards pressure on lid if any
136
+ forces = problem.body.integrate_pressure(pressure_on_hull)
134
137
 
135
138
  if not keep_details:
136
139
  result = problem.make_results_container(forces)
@@ -162,7 +165,9 @@ class BEMSolver:
162
165
  list of LinearPotentialFlowResult
163
166
  the solved problems
164
167
  """
165
- if _check_wavelength: self._check_wavelength(problems)
168
+ if _check_wavelength:
169
+ self._check_wavelength_and_mesh_resolution(problems)
170
+ self._check_wavelength_and_irregular_frequencies(problems)
166
171
 
167
172
  if n_jobs == 1: # force sequential resolution
168
173
  problems = sorted(problems)
@@ -184,31 +189,60 @@ class BEMSolver:
184
189
  return results
185
190
 
186
191
  @staticmethod
187
- def _check_wavelength(problems):
192
+ def _check_wavelength_and_mesh_resolution(problems):
188
193
  """Display a warning if some of the problems have a mesh resolution
189
194
  that might not be sufficient for the given wavelength."""
190
195
  risky_problems = [pb for pb in problems
191
- if pb.wavelength < pb.body.minimal_computable_wavelength]
196
+ if 0.0 < pb.wavelength < pb.body.minimal_computable_wavelength]
192
197
  nb_risky_problems = len(risky_problems)
193
198
  if nb_risky_problems == 1:
194
199
  pb = risky_problems[0]
195
200
  freq_type = risky_problems[0].provided_freq_type
196
201
  freq = pb.__getattribute__(freq_type)
197
202
  LOG.warning(f"Mesh resolution for {pb}:\n"
198
- f"The resolution of the mesh of the body {pb.body.__short_str__()} might "
199
- f"be insufficient for {freq_type}={freq}.\n"
200
- "This warning appears because the largest panel of this mesh "
201
- f"has radius {pb.body.mesh.faces_radiuses.max():.3f} > wavelength/8."
202
- )
203
+ f"The resolution of the mesh of the body {pb.body.__short_str__()} might "
204
+ f"be insufficient for {freq_type}={freq}.\n"
205
+ "This warning appears because the largest panel of this mesh "
206
+ f"has radius {pb.body.mesh.faces_radiuses.max():.3f} > wavelength/8."
207
+ )
203
208
  elif nb_risky_problems > 1:
204
209
  freq_type = risky_problems[0].provided_freq_type
205
210
  freqs = np.array([float(pb.__getattribute__(freq_type)) for pb in risky_problems])
206
211
  LOG.warning(f"Mesh resolution for {nb_risky_problems} problems:\n"
207
- "The resolution of the mesh might be insufficient "
212
+ "The resolution of the mesh might be insufficient "
208
213
  f"for {freq_type} ranging from {freqs.min():.3f} to {freqs.max():.3f}.\n"
209
- "This warning appears when the largest panel of this mesh "
210
- "has radius > wavelength/8."
211
- )
214
+ "This warning appears when the largest panel of this mesh "
215
+ "has radius > wavelength/8."
216
+ )
217
+
218
+ @staticmethod
219
+ def _check_wavelength_and_irregular_frequencies(problems):
220
+ """Display a warning if some of the problems might encounter irregular frequencies."""
221
+ risky_problems = [pb for pb in problems
222
+ if pb.body.first_irregular_frequency_estimate() < pb.omega < np.inf]
223
+ nb_risky_problems = len(risky_problems)
224
+ if nb_risky_problems >= 1:
225
+ if any(pb.body.lid_mesh is None for pb in problems):
226
+ recommendation = "Setting a lid for the floating body is recommended."
227
+ else:
228
+ recommendation = "The lid might need to be closer to the free surface."
229
+ if nb_risky_problems == 1:
230
+ pb = risky_problems[0]
231
+ freq_type = risky_problems[0].provided_freq_type
232
+ freq = pb.__getattribute__(freq_type)
233
+ LOG.warning(f"Irregular frequencies for {pb}:\n"
234
+ f"The body {pb.body.__short_str__()} might display irregular frequencies "
235
+ f"for {freq_type}={freq}.\n"
236
+ + recommendation
237
+ )
238
+ elif nb_risky_problems > 1:
239
+ freq_type = risky_problems[0].provided_freq_type
240
+ freqs = np.array([float(pb.__getattribute__(freq_type)) for pb in risky_problems])
241
+ LOG.warning(f"Irregular frequencies for {nb_risky_problems} problems:\n"
242
+ "Irregular frequencies might be encountered "
243
+ f"for {freq_type} ranging from {freqs.min():.3f} to {freqs.max():.3f}.\n"
244
+ + recommendation
245
+ )
212
246
 
213
247
  def fill_dataset(self, dataset, bodies, *, method='indirect', n_jobs=1, **kwargs):
214
248
  """Solve a set of problems defined by the coordinates of an xarray dataset.
@@ -271,7 +305,7 @@ class BEMSolver:
271
305
  They probably have not been stored by the solver because the option keep_details=True have not been set or the direct method has been used.
272
306
  Please re-run the resolution with the indirect method and keep_details=True.""")
273
307
 
274
- S, _ = self.green_function.evaluate(points, result.body.mesh, result.free_surface, result.water_depth, result.encounter_wavenumber)
308
+ S, _ = self.green_function.evaluate(points, result.body.mesh_including_lid, result.free_surface, result.water_depth, result.encounter_wavenumber)
275
309
  potential = S @ result.sources # Sum the contributions of all panels in the mesh
276
310
  return potential.reshape(output_shape)
277
311
 
@@ -283,7 +317,7 @@ class BEMSolver:
283
317
  They probably have not been stored by the solver because the option keep_details=True have not been set.
284
318
  Please re-run the resolution with this option.""")
285
319
 
286
- _, gradG = self.green_function.evaluate(points, result.body.mesh, result.free_surface, result.water_depth, result.encounter_wavenumber,
320
+ _, gradG = self.green_function.evaluate(points, result.body.mesh_including_lid, result.free_surface, result.water_depth, result.encounter_wavenumber,
287
321
  early_dot_product=False)
288
322
  velocities = np.einsum('ijk,j->ik', gradG, result.sources) # Sum the contributions of all panels in the mesh
289
323
  return velocities.reshape((*output_shape, 3))
@@ -409,7 +443,7 @@ class BEMSolver:
409
443
  if chunk_size > mesh.nb_faces:
410
444
  S = self.engine.build_S_matrix(
411
445
  mesh,
412
- result.body.mesh,
446
+ result.body.mesh_including_lid,
413
447
  result.free_surface, result.water_depth, result.wavenumber,
414
448
  self.green_function
415
449
  )
@@ -421,7 +455,7 @@ class BEMSolver:
421
455
  faces_to_extract = list(range(i, min(i+chunk_size, mesh.nb_faces)))
422
456
  S = self.engine.build_S_matrix(
423
457
  mesh.extract_faces(faces_to_extract),
424
- result.body.mesh,
458
+ result.body.mesh_including_lid,
425
459
  result.free_surface, result.water_depth, result.wavenumber,
426
460
  self.green_function
427
461
  )