capytaine 2.0__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 (244) hide show
  1. capytaine-2.2/.github/workflows/build_docs.yml +53 -0
  2. {capytaine-2.0 → capytaine-2.2}/.github/workflows/build_wheels.yaml +12 -15
  3. capytaine-2.2/.github/workflows/test_new_commits.yaml +71 -0
  4. capytaine-2.2/.github/workflows/test_with_latest_dependencies.yaml +35 -0
  5. {capytaine-2.0 → capytaine-2.2}/.gitignore +1 -1
  6. capytaine-2.2/.pre-commit-config.yaml +40 -0
  7. capytaine-2.2/.zenodo.json +15 -0
  8. capytaine-2.2/Makefile +30 -0
  9. {capytaine-2.0 → capytaine-2.2}/PKG-INFO +32 -14
  10. {capytaine-2.0 → capytaine-2.2}/README.md +16 -8
  11. {capytaine-2.0 → capytaine-2.2}/capytaine/__about__.py +3 -3
  12. {capytaine-2.0 → capytaine-2.2}/capytaine/__init__.py +5 -3
  13. {capytaine-2.0 → capytaine-2.2}/capytaine/bem/airy_waves.py +4 -6
  14. {capytaine-2.0 → capytaine-2.2}/capytaine/bem/engines.py +146 -25
  15. {capytaine-2.0 → capytaine-2.2}/capytaine/bem/problems_and_results.py +217 -106
  16. {capytaine-2.0 → capytaine-2.2}/capytaine/bem/solver.py +179 -47
  17. {capytaine-2.0 → capytaine-2.2}/capytaine/bodies/__init__.py +1 -1
  18. {capytaine-2.0 → capytaine-2.2}/capytaine/bodies/bodies.py +207 -39
  19. {capytaine-2.0 → capytaine-2.2}/capytaine/bodies/predefined/__init__.py +0 -2
  20. {capytaine-2.0 → capytaine-2.2}/capytaine/bodies/predefined/cylinders.py +0 -2
  21. {capytaine-2.0 → capytaine-2.2}/capytaine/bodies/predefined/rectangles.py +0 -2
  22. {capytaine-2.0 → capytaine-2.2}/capytaine/bodies/predefined/spheres.py +0 -2
  23. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/abstract_green_function.py +0 -3
  24. capytaine-2.2/capytaine/green_functions/delhommeau.py +432 -0
  25. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/.gitignore +1 -0
  26. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/LICENSE +0 -1
  27. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/Makefile +3 -2
  28. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/benchmarks/openmp/benchmark_omp.f90 +16 -8
  29. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/benchmarks/openmp/read_output.py +1 -1
  30. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/benchmarks/profiling/benchmark_profiling.f90 +41 -33
  31. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/benchmarks/tabulations/benchmark_tabulation.f90 +15 -12
  32. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/examples/minimal/minimal_example.f90 +24 -14
  33. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/examples/minimal/minimal_example.py +7 -7
  34. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/src/Delhommeau_integrals.f90 +155 -83
  35. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/src/Green_Rankine.f90 +3 -3
  36. capytaine-2.2/capytaine/green_functions/libDelhommeau/src/Green_wave.f90 +402 -0
  37. capytaine-2.2/capytaine/green_functions/libDelhommeau/src/constants.f90 +45 -0
  38. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/src/float32.f90 +3 -0
  39. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/src/float64.f90 +3 -0
  40. capytaine-2.2/capytaine/green_functions/libDelhommeau/src/matrices.f90 +302 -0
  41. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/src/old_Prony_decomposition.f90 +5 -4
  42. {capytaine-2.0 → capytaine-2.2}/capytaine/io/bemio.py +17 -16
  43. {capytaine-2.0 → capytaine-2.2}/capytaine/io/legacy.py +52 -20
  44. {capytaine-2.0 → capytaine-2.2}/capytaine/io/mesh_loaders.py +49 -27
  45. {capytaine-2.0 → capytaine-2.2}/capytaine/io/mesh_writers.py +1 -3
  46. {capytaine-2.0 → capytaine-2.2}/capytaine/io/meshio.py +4 -1
  47. {capytaine-2.0 → capytaine-2.2}/capytaine/io/xarray.py +73 -35
  48. {capytaine-2.0 → capytaine-2.2}/capytaine/matrices/__init__.py +0 -2
  49. {capytaine-2.0 → capytaine-2.2}/capytaine/matrices/block.py +23 -2
  50. {capytaine-2.0 → capytaine-2.2}/capytaine/matrices/block_toeplitz.py +0 -2
  51. {capytaine-2.0 → capytaine-2.2}/capytaine/matrices/builders.py +2 -4
  52. {capytaine-2.0 → capytaine-2.2}/capytaine/matrices/linear_solvers.py +84 -7
  53. {capytaine-2.0 → capytaine-2.2}/capytaine/matrices/low_rank.py +0 -2
  54. {capytaine-2.0 → capytaine-2.2}/capytaine/meshes/__init__.py +0 -2
  55. {capytaine-2.0 → capytaine-2.2}/capytaine/meshes/clipper.py +0 -3
  56. {capytaine-2.0 → capytaine-2.2}/capytaine/meshes/collections.py +49 -20
  57. {capytaine-2.0 → capytaine-2.2}/capytaine/meshes/geometry.py +3 -6
  58. {capytaine-2.0 → capytaine-2.2}/capytaine/meshes/meshes.py +170 -81
  59. {capytaine-2.0 → capytaine-2.2}/capytaine/meshes/predefined/__init__.py +0 -1
  60. {capytaine-2.0 → capytaine-2.2}/capytaine/meshes/predefined/cylinders.py +48 -7
  61. {capytaine-2.0 → capytaine-2.2}/capytaine/meshes/predefined/rectangles.py +43 -10
  62. {capytaine-2.0 → capytaine-2.2}/capytaine/meshes/predefined/spheres.py +15 -4
  63. {capytaine-2.0 → capytaine-2.2}/capytaine/meshes/properties.py +43 -2
  64. capytaine-2.2/capytaine/meshes/quadratures.py +80 -0
  65. {capytaine-2.0 → capytaine-2.2}/capytaine/meshes/quality.py +1 -3
  66. {capytaine-2.0 → capytaine-2.2}/capytaine/meshes/surface_integrals.py +0 -1
  67. {capytaine-2.0 → capytaine-2.2}/capytaine/meshes/symmetric.py +55 -14
  68. {capytaine-2.0 → capytaine-2.2}/capytaine/post_pro/free_surfaces.py +4 -7
  69. {capytaine-2.0 → capytaine-2.2}/capytaine/post_pro/impedance.py +12 -10
  70. {capytaine-2.0 → capytaine-2.2}/capytaine/post_pro/kochin.py +5 -3
  71. capytaine-2.2/capytaine/post_pro/rao.py +60 -0
  72. capytaine-2.2/capytaine/tools/cache_on_disk.py +26 -0
  73. {capytaine-2.0 → capytaine-2.2}/capytaine/tools/deprecation_handling.py +2 -2
  74. {capytaine-2.0 → capytaine-2.2}/capytaine/tools/lists_of_points.py +13 -3
  75. capytaine-2.2/capytaine/tools/lru_cache.py +49 -0
  76. {capytaine-2.0 → capytaine-2.2}/capytaine/tools/optional_imports.py +0 -2
  77. {capytaine-2.0 → capytaine-2.2}/capytaine/tools/prony_decomposition.py +0 -3
  78. capytaine-2.2/capytaine/tools/symbolic_multiplication.py +107 -0
  79. capytaine-2.2/capytaine/ui/cli.py +28 -0
  80. capytaine-2.2/capytaine/ui/rich.py +5 -0
  81. {capytaine-2.0 → capytaine-2.2}/capytaine/ui/vtk/__init__.py +0 -3
  82. {capytaine-2.0 → capytaine-2.2}/capytaine/ui/vtk/animation.py +28 -8
  83. {capytaine-2.0 → capytaine-2.2}/capytaine/ui/vtk/body_viewer.py +2 -2
  84. {capytaine-2.0 → capytaine-2.2}/capytaine/ui/vtk/helpers.py +0 -3
  85. {capytaine-2.0 → capytaine-2.2}/capytaine/ui/vtk/mesh_viewer.py +0 -3
  86. capytaine-2.2/capytaine.scm +61 -0
  87. capytaine-2.2/code_of_conduct.md +133 -0
  88. {capytaine-2.0 → capytaine-2.2}/docs/Makefile +0 -9
  89. {capytaine-2.0 → capytaine-2.2}/docs/_static/custom.css +1 -2
  90. capytaine-2.2/docs/_templates/layout.html +10 -0
  91. {capytaine-2.0 → capytaine-2.2}/docs/changelog.rst +163 -3
  92. {capytaine-2.0 → capytaine-2.2}/docs/citing.rst +24 -1
  93. {capytaine-2.0 → capytaine-2.2}/docs/conf.py +23 -62
  94. {capytaine-2.0 → capytaine-2.2}/docs/developer_manual/index.rst +0 -1
  95. {capytaine-2.0 → capytaine-2.2}/docs/developer_manual/installation.rst +17 -3
  96. capytaine-2.2/docs/developer_manual/overview.rst +143 -0
  97. capytaine-2.2/docs/features.rst +60 -0
  98. {capytaine-2.0 → capytaine-2.2}/docs/index.rst +16 -9
  99. {capytaine-2.0 → capytaine-2.2}/docs/theory_manual/bibliography.rst +3 -1
  100. {capytaine-2.0 → capytaine-2.2}/docs/theory_manual/theory.rst +258 -55
  101. capytaine-2.2/docs/user_manual/body.rst +173 -0
  102. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/conventions.rst +45 -2
  103. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/cookbook.rst +15 -11
  104. capytaine-2.2/docs/user_manual/examples/Malenica_forward_speed.py +76 -0
  105. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/Nemoh.cal +0 -1
  106. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/animate_free_surface.py +4 -7
  107. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/axisymmetric_buoy.py +1 -3
  108. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/boat_animation.py +7 -11
  109. capytaine-2.2/docs/user_manual/examples/compare_Green_functions.py +33 -0
  110. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/convergence_study.py +2 -5
  111. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/custom_Green_function.py +3 -3
  112. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/custom_dofs.py +0 -1
  113. capytaine-2.2/docs/user_manual/examples/elasticity_of_beam.py +77 -0
  114. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/finite_depth_cylinder.py +2 -5
  115. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/haskind.py +1 -1
  116. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/hydrostatics.py +0 -1
  117. capytaine-2.2/docs/user_manual/examples/irregular_frequency_removal.py +76 -0
  118. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/kochin.py +1 -3
  119. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/plot_influence_matrix.py +1 -1
  120. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/plot_velocity_in_domain.py +2 -4
  121. capytaine-2.2/docs/user_manual/examples/preconditioner.py +89 -0
  122. capytaine-2.2/docs/user_manual/examples/pressure_on_hull.py +15 -0
  123. capytaine-2.2/docs/user_manual/examples/quickstart.py +32 -0
  124. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/radiation_cylinder.py +4 -9
  125. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/hydrostatics.rst +1 -2
  126. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/index.rst +2 -0
  127. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/installation.rst +26 -13
  128. capytaine-2.2/docs/user_manual/mesh.rst +370 -0
  129. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/outputs.rst +138 -22
  130. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/post_pro.rst +15 -7
  131. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/problem_setup.rst +35 -21
  132. capytaine-2.2/docs/user_manual/quickstart.rst +15 -0
  133. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/resolution.rst +67 -5
  134. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/tutorial.rst +33 -33
  135. capytaine-2.2/editable_install_requirements.txt +12 -0
  136. {capytaine-2.0 → capytaine-2.2}/meson.build +8 -31
  137. capytaine-2.2/noxfile.py +104 -0
  138. capytaine-2.2/pyproject.toml +55 -0
  139. capytaine-2.2/pytest/envs/2023-08-01-py3.8.txt +92 -0
  140. capytaine-2.2/pytest/envs/2024-04-08-py3.12.txt +80 -0
  141. capytaine-2.2/pytest/mesh_files_examples/cylinder2.msh +143 -0
  142. capytaine-2.2/pytest/mesh_files_examples/cylinder4.msh +277 -0
  143. capytaine-2.2/pytest/test_airy_waves.py +19 -0
  144. capytaine-2.2/pytest/test_bem_engines.py +55 -0
  145. capytaine-2.2/pytest/test_bem_green_function_fortran_core.py +217 -0
  146. capytaine-2.2/pytest/test_bem_green_function_matrix_shape.py +85 -0
  147. capytaine-2.2/pytest/test_bem_green_function_table_density.py +107 -0
  148. {capytaine-2.0 → capytaine-2.2}/pytest/test_bem_hierarchical_toeplitz_matrices.py +34 -28
  149. capytaine-2.2/pytest/test_bem_irregular_frequencies_removal.py +225 -0
  150. {capytaine-2.0 → capytaine-2.2}/pytest/test_bem_linear_combination_of_dofs.py +16 -14
  151. {capytaine-2.0 → capytaine-2.2}/pytest/test_bem_potential_velocity_and_free_surface_elevation.py +46 -2
  152. {capytaine-2.0 → capytaine-2.2}/pytest/test_bem_problems_and_results.py +119 -120
  153. {capytaine-2.0 → capytaine-2.2}/pytest/test_bem_solver.py +47 -42
  154. capytaine-2.2/pytest/test_bem_with_quadratures.py +76 -0
  155. capytaine-2.2/pytest/test_bem_zero_and_infinite_freq.py +58 -0
  156. {capytaine-2.0 → capytaine-2.2}/pytest/test_bodies.py +87 -52
  157. {capytaine-2.0 → capytaine-2.2}/pytest/test_bodies_predefined.py +11 -14
  158. {capytaine-2.0 → capytaine-2.2}/pytest/test_consistency_with_Nemoh_2.py +60 -54
  159. capytaine-2.2/pytest/test_forward_speed.py +223 -0
  160. {capytaine-2.0 → capytaine-2.2}/pytest/test_hydrostatics.py +12 -2
  161. {capytaine-2.0 → capytaine-2.2}/pytest/test_io.py +5 -5
  162. capytaine-2.2/pytest/test_io_mehses_mar.py +53 -0
  163. capytaine-2.2/pytest/test_io_meshes.py +134 -0
  164. capytaine-2.2/pytest/test_io_meshes_gdf.py +147 -0
  165. capytaine-2.2/pytest/test_io_meshes_hst.py +169 -0
  166. capytaine-2.2/pytest/test_io_meshes_pnl.py +164 -0
  167. {capytaine-2.0 → capytaine-2.2}/pytest/test_linear_solvers.py +3 -4
  168. {capytaine-2.0 → capytaine-2.2}/pytest/test_matrices.py +8 -3
  169. {capytaine-2.0 → capytaine-2.2}/pytest/test_meshes.py +136 -40
  170. {capytaine-2.0 → capytaine-2.2}/pytest/test_meshes_collections_and_symmetries.py +45 -42
  171. {capytaine-2.0 → capytaine-2.2}/pytest/test_meshes_geometry.py +0 -3
  172. capytaine-2.2/pytest/test_meshes_lid_generation.py +89 -0
  173. {capytaine-2.0 → capytaine-2.2}/pytest/test_meshes_predefined.py +47 -3
  174. {capytaine-2.0 → capytaine-2.2}/pytest/test_post_pro.py +22 -16
  175. capytaine-2.2/pytest/test_post_pro_kochin.py +113 -0
  176. capytaine-2.2/pytest/test_tool_lru_cache.py +107 -0
  177. capytaine-2.2/pytest/test_tool_symbolic_multiplication.py +102 -0
  178. {capytaine-2.0 → capytaine-2.2}/pytest/test_ui_matplotlib.py +0 -2
  179. {capytaine-2.0 → capytaine-2.2}/pytest/test_ui_vtk.py +0 -3
  180. capytaine-2.0/.github/workflows/tests.yaml +0 -39
  181. capytaine-2.0/.zenodo.json +0 -50
  182. capytaine-2.0/Makefile +0 -23
  183. capytaine-2.0/capytaine/green_functions/delhommeau.py +0 -270
  184. capytaine-2.0/capytaine/green_functions/libDelhommeau/src/Green_wave.f90 +0 -303
  185. capytaine-2.0/capytaine/green_functions/libDelhommeau/src/constants.f90 +0 -16
  186. capytaine-2.0/capytaine/green_functions/libDelhommeau/src/matrices.f90 +0 -274
  187. capytaine-2.0/capytaine/post_pro/rao.py +0 -66
  188. capytaine-2.0/capytaine/tools/lru_cache.py +0 -55
  189. capytaine-2.0/capytaine/ui/cli.py +0 -48
  190. capytaine-2.0/docs/_templates/layout.html +0 -5
  191. capytaine-2.0/docs/developer_manual/overview.rst +0 -154
  192. capytaine-2.0/docs/features.rst +0 -49
  193. capytaine-2.0/docs/user_manual/examples/compare_Green_functions.py +0 -36
  194. capytaine-2.0/docs/user_manual/examples/symmetric_body.py +0 -24
  195. capytaine-2.0/docs/user_manual/mesh.rst +0 -294
  196. capytaine-2.0/pyproject.toml +0 -30
  197. capytaine-2.0/pytest/test_bem_engines.py +0 -116
  198. capytaine-2.0/pytest/test_bem_green_functions.py +0 -136
  199. capytaine-2.0/pytest/test_bem_with_quadratures.py +0 -64
  200. capytaine-2.0/pytest/test_io_meshes.py +0 -358
  201. capytaine-2.0/pytest/test_post_pro_kochin.py +0 -44
  202. {capytaine-2.0 → capytaine-2.2}/CONTRIBUTING.md +0 -0
  203. {capytaine-2.0 → capytaine-2.2}/Dockerfile +0 -0
  204. {capytaine-2.0 → capytaine-2.2}/LICENSE +0 -0
  205. {capytaine-2.0 → capytaine-2.2}/capytaine/bem/__init__.py +0 -0
  206. {capytaine-2.0 → capytaine-2.2}/capytaine/bodies/dofs.py +0 -0
  207. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/__init__.py +0 -0
  208. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/README.md +0 -0
  209. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libDelhommeau/benchmarks/openmp/display_mesh.py +0 -0
  210. {capytaine-2.0 → capytaine-2.2}/capytaine/green_functions/libs/__init__.py +0 -0
  211. {capytaine-2.0 → capytaine-2.2}/capytaine/io/__init__.py +0 -0
  212. {capytaine-2.0 → capytaine-2.2}/capytaine/post_pro/__init__.py +0 -0
  213. {capytaine-2.0 → capytaine-2.2}/capytaine/tools/__init__.py +0 -0
  214. {capytaine-2.0 → capytaine-2.2}/capytaine/ui/__init__.py +0 -0
  215. {capytaine-2.0 → capytaine-2.2}/docs/_static/proof.css +0 -0
  216. {capytaine-2.0 → capytaine-2.2}/docs/_static/proof.js +0 -0
  217. {capytaine-2.0 → capytaine-2.2}/docs/theory_manual/index.rst +0 -0
  218. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/boat_200.mar +0 -0
  219. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/free_surface_elevation.py +0 -0
  220. {capytaine-2.0 → capytaine-2.2}/docs/user_manual/examples/multibody.py +0 -0
  221. {capytaine-2.0 → capytaine-2.2}/pytest/Bemio_verification_cases/sphere.out +0 -0
  222. {capytaine-2.0 → capytaine-2.2}/pytest/Hydrostatics_cases/sphere__hor_cyl__ver_cyl.pkl.json +0 -0
  223. {capytaine-2.0 → capytaine-2.2}/pytest/Nemoh_verification_cases/Cylinder/Cylinder.dat +0 -0
  224. {capytaine-2.0 → capytaine-2.2}/pytest/Nemoh_verification_cases/Cylinder/Nemoh.cal +0 -0
  225. {capytaine-2.0 → capytaine-2.2}/pytest/Nemoh_verification_cases/Cylinder/Nemoh_v3.cal +0 -0
  226. {capytaine-2.0 → capytaine-2.2}/pytest/Nemoh_verification_cases/Cylinder/reference_results/DiffractionForce.tec +0 -0
  227. {capytaine-2.0 → capytaine-2.2}/pytest/Nemoh_verification_cases/Cylinder/reference_results/ExcitationForce.tec +0 -0
  228. {capytaine-2.0 → capytaine-2.2}/pytest/Nemoh_verification_cases/Cylinder/reference_results/RadiationCoefficients.tec +0 -0
  229. {capytaine-2.0 → capytaine-2.2}/pytest/Nemoh_verification_cases/Nemoh.m +0 -0
  230. {capytaine-2.0 → capytaine-2.2}/pytest/Nemoh_verification_cases/NonSymmetrical/Nemoh.cal +0 -0
  231. {capytaine-2.0 → capytaine-2.2}/pytest/Nemoh_verification_cases/NonSymmetrical/Nemoh_v3.cal +0 -0
  232. {capytaine-2.0 → capytaine-2.2}/pytest/Nemoh_verification_cases/NonSymmetrical/NonSymmetrical.dat +0 -0
  233. {capytaine-2.0 → capytaine-2.2}/pytest/Nemoh_verification_cases/NonSymmetrical/reference_results/DiffractionForce.tec +0 -0
  234. {capytaine-2.0 → capytaine-2.2}/pytest/Nemoh_verification_cases/NonSymmetrical/reference_results/ExcitationForce.tec +0 -0
  235. {capytaine-2.0 → capytaine-2.2}/pytest/Nemoh_verification_cases/NonSymmetrical/reference_results/RadiationCoefficients.tec +0 -0
  236. {capytaine-2.0 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/single_body/Hydrostatics.dat +0 -0
  237. {capytaine-2.0 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/single_body/KH.dat +0 -0
  238. {capytaine-2.0 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/single_body_list/Hydrostatics.dat +0 -0
  239. {capytaine-2.0 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/single_body_list/KH.dat +0 -0
  240. {capytaine-2.0 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/two_bodies_list/Hydrostatics_0.dat +0 -0
  241. {capytaine-2.0 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/two_bodies_list/Hydrostatics_1.dat +0 -0
  242. {capytaine-2.0 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/two_bodies_list/KH_0.dat +0 -0
  243. {capytaine-2.0 → capytaine-2.2}/pytest/io_legacy_cases/reference_data/two_bodies_list/KH_1.dat +0 -0
  244. {capytaine-2.0 → capytaine-2.2}/pytest/mesh_files_examples/barge.med +0 -0
@@ -0,0 +1,53 @@
1
+ name: Build and deploy documentation
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ paths:
8
+ - 'docs/**'
9
+
10
+ pull_request:
11
+ paths:
12
+ - 'docs/**'
13
+
14
+ workflow_dispatch:
15
+
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
+
24
+ jobs:
25
+ build:
26
+
27
+ runs-on: ubuntu-latest
28
+
29
+ steps:
30
+
31
+ - name: Checkout
32
+ uses: actions/checkout@v4
33
+
34
+ - uses: actions/setup-python@v5
35
+ with:
36
+ python-version: '3.12'
37
+
38
+ - name: Install Capytaine and other dependencies
39
+ run: pip install .[optional,docs]
40
+
41
+ - name: Build documentation
42
+ run: cd docs && make
43
+
44
+ - name: Deploy pages
45
+ if: github.ref == 'refs/heads/master' # Only deploy the version merged into the master branch
46
+ uses: JamesIves/github-pages-deploy-action@releases/v4
47
+ with:
48
+ folder: ./docs/_build/html/
49
+ repository-name: capytaine/capytaine.github.io
50
+ branch: main
51
+ target-folder: master/
52
+ clean: true
53
+ token: ${{ secrets.TOKEN_PAGES }}
@@ -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,24 +15,20 @@ 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
- - uses: actions/checkout@v3
22
+ - uses: actions/checkout@v4
22
23
 
23
- # From https://github.com/insarlab/PySolid/blob/18dcc0ffdc1aed88d9f4d87d9307284df14d26a7/.github/workflows/build-and-publish-to-pypi.yml
24
- - name: Provide gfortran (macOS)
25
- if: runner.os == 'macOS'
26
- run: |
27
- # https://github.com/actions/virtual-environments/issues/2524
28
- # https://github.com/cbg-ethz/dce/blob/master/.github/workflows/pkgdown.yaml
29
- sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran
30
- sudo mkdir /usr/local/gfortran
31
- sudo ln -s /usr/local/Cellar/gcc@11/*/lib/gcc/11 /usr/local/gfortran/lib
32
- gfortran --version
24
+ - uses: fortran-lang/setup-fortran@v1
25
+ id: setup-fortran
26
+ with:
27
+ compiler: 'gcc'
28
+ version: '13'
33
29
 
34
30
  - name: Build wheels
35
- uses: pypa/cibuildwheel@v2.12.3
31
+ uses: pypa/cibuildwheel@v2.17.0
36
32
  env:
37
33
  CIBW_SKIP: "pp* *i686* *musllinux* *win32*"
38
34
  # Package the DLL dependencies in the wheel for windows (done by default for the other platforms).
@@ -44,6 +40,7 @@ jobs:
44
40
  # output-dir: wheelhouse
45
41
  # config-file: "{package}/pyproject.toml"
46
42
 
47
- - uses: actions/upload-artifact@v3
43
+ - uses: actions/upload-artifact@v4
48
44
  with:
45
+ name: wheels-${{ matrix.os }}
49
46
  path: ./wheelhouse/*.whl
@@ -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.
@@ -0,0 +1,35 @@
1
+ name: Build and test using latest available dependencies
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ schedule:
6
+ - cron: '5 5 5/15 * *' # On the 5th and 20th of each month at 5:05
7
+
8
+ env:
9
+ FORCE_COLOR: 3
10
+ # Colors for nox
11
+
12
+ jobs:
13
+ build_and_test:
14
+
15
+ runs-on: ubuntu-latest
16
+
17
+ strategy:
18
+ matrix:
19
+ python-version: ['3.8', '3.12']
20
+
21
+ steps:
22
+
23
+ - name: Checkout repository and submodules
24
+ uses: actions/checkout@v4
25
+
26
+ - name: Set up Python ${{ matrix.python-version }}
27
+ uses: actions/setup-python@v5
28
+ with:
29
+ python-version: ${{ matrix.python-version }}
30
+
31
+ - name: Set up nox
32
+ uses: wntrblm/nox@2024.03.02
33
+
34
+ - name: Run nox session
35
+ run: nox -s build_and_test_on_latest_env editable_build_and_test_on_latest_env
@@ -1,5 +1,5 @@
1
1
  .idea/
2
- examples/**/results*
2
+ pytest/Nemoh_verification_cases/*/results/
3
3
  docs/_static/
4
4
  docs/developer_manual/api/*.rst
5
5
  .pytest_cache/
@@ -0,0 +1,40 @@
1
+ exclude: "pytest/.*/.*"
2
+ repos:
3
+ - repo: https://github.com/pre-commit/pre-commit-hooks
4
+ rev: "v4.4.0"
5
+ hooks:
6
+ # Prevent giant files from being committed
7
+ - id: check-added-large-files
8
+ # Simply check whether files parse as valid python
9
+ - id: check-ast
10
+ # Check for files with names that would conflict on a case-insensitive filesystem like MacOS HFS+ or Windows FAT
11
+ - id: check-case-conflict
12
+ # Check for files that contain merge conflict strings
13
+ - id: check-merge-conflict
14
+ # Checks for symlinks which do not point to anything
15
+ - id: check-symlinks
16
+ # Attempts to load all TOML files to verify syntax
17
+ - id: check-toml
18
+ # Attempts to load all YAML files to verify syntax
19
+ - id: check-yaml
20
+ # Check for calls to breakpoint()
21
+ - id: debug-statements
22
+ # Makes sure files end in a newline and only a newline
23
+ - id: end-of-file-fixer
24
+ # Disallow commiting directly to "master"
25
+ - id: no-commit-to-branch
26
+ # Check the kind of line ending (LF or CRLF)
27
+ - id: mixed-line-ending
28
+ # Trim trailing whitespaces
29
+ - id: trailing-whitespace
30
+
31
+ # - repo: https://github.com/astral-sh/ruff-pre-commit
32
+ # rev: "v0.0.291"
33
+ # hooks:
34
+ # - id: ruff
35
+
36
+ - repo: https://github.com/codespell-project/codespell
37
+ rev: "v2.2.5"
38
+ hooks:
39
+ - id: codespell
40
+ args: ["-L", "ba,informations,inout,ist,lamda,ment,noe,periode,sur", "--skip", "capytaine/green_functions/libDelhommeau/src/old_Prony_decomposition.f90"]
@@ -0,0 +1,15 @@
1
+ {
2
+ "title": "Capytaine",
3
+ "upload_type": "software",
4
+ "creators": [
5
+ {
6
+ "affiliation": "Eurobios Mews Labs",
7
+ "name": "Matthieu Ancellin",
8
+ "orcid": "0000-0002-0316-3230"
9
+ },
10
+ {
11
+ "name": "the Capytaine contributors"
12
+ }
13
+ ],
14
+ "access_right": "open"
15
+ }
capytaine-2.2/Makefile ADDED
@@ -0,0 +1,30 @@
1
+ install:
2
+ pip install .
3
+
4
+ develop:
5
+ pip install -r editable_install_requirements.txt
6
+ pip install --no-build-isolation --editable .
7
+
8
+ TEMP_DIR := $(shell mktemp -d)
9
+ test_fortran_compilation:
10
+ # Compile the Fortran code without parallelism for easier reading of the errors.
11
+ # It is assumed that meson and ninja are already installed.
12
+ meson setup --wipe $(TEMP_DIR) && meson compile -C $(TEMP_DIR) -j 1
13
+
14
+ test:
15
+ # Build and test the current repository in a fixed environment.
16
+ nox -s build_and_test_on_locked_env
17
+
18
+ clean:
19
+ rm -f capytaine/green_functions/libs/*.so
20
+ rm -rf build/
21
+ rm -rf dist/
22
+ rm -rf capytaine.egg-info/
23
+ rm -rf docs/_build
24
+ rm -rf .pytest_cache/
25
+ rm -rf .nox/
26
+ rm -rf .venv/
27
+ rm -rf __pycache__ */__pycache__ */*/__pycache__ */*/*/__pycache__
28
+ rm -rf ${HOME}/.cache/capytaine/*
29
+
30
+ .PHONY: install develop test clean test_fortran_compilation
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: capytaine
3
- Version: 2.0
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
@@ -683,43 +683,60 @@ Classifier: Intended Audience :: Science/Research
683
683
  Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
684
684
  Classifier: Topic :: Scientific/Engineering
685
685
  Project-URL: Repository, https://github.com/capytaine/capytaine
686
- Requires-Python: >=3.7
687
- Requires-Dist: numpy
686
+ Requires-Python: >=3.8
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
691
- Requires-Dist: pytest; extra == "ci"
692
- Requires-Dist: hypothesis; extra == "ci"
693
- Provides-Extra: ci
692
+ Requires-Dist: rich
693
+ Requires-Dist: matplotlib; extra == "optional"
694
+ Requires-Dist: joblib>=1.3; extra == "optional"
695
+ Requires-Dist: meshio; extra == "optional"
696
+ Requires-Dist: pytest; extra == "test"
697
+ Requires-Dist: sphinx; extra == "docs"
698
+ Requires-Dist: sphinx-toolbox; extra == "docs"
699
+ Requires-Dist: sphinxcontrib-proof; extra == "docs"
700
+ Requires-Dist: sphinxcontrib-mermaid; extra == "docs"
701
+ Provides-Extra: optional
702
+ Provides-Extra: test
703
+ Provides-Extra: docs
694
704
  Description-Content-Type: text/markdown
695
705
 
696
706
  # Capytaine: a linear potential flow BEM solver with Python.
697
707
 
698
- [![DOI](http://joss.theoj.org/papers/10.21105/joss.01341/status.svg)](https://doi.org/10.21105/joss.01341)
699
- ![CI status](https://github.com/capytaine/capytaine/actions/workflows/tests.yaml/badge.svg?event=push)
708
+ ![CI status](https://github.com/capytaine/capytaine/actions/workflows/test_new_commits.yaml/badge.svg?event=push)
709
+ ![CI status](https://github.com/capytaine/capytaine/actions/workflows/test_with_latest_dependencies.yaml/badge.svg)
710
+
700
711
 
701
712
  Capytaine is Python package for the simulation of the interaction between water waves and floating bodies in frequency domain.
702
713
  It is built around a full rewrite of the open source Boundary Element Method (BEM) solver Nemoh for the linear potential flow wave theory.
703
714
 
704
715
  ## Installation
705
716
 
717
+ [![PyPI](https://img.shields.io/pypi/v/capytaine)](https://pypi.org/project/capytaine)
718
+ [![Conda-forge](https://img.shields.io/conda/vn/conda-forge/capytaine)](https://github.com/conda-forge/capytaine-feedstock)
719
+
706
720
  Packages for Windows, macOS and Linux are available on PyPI:
707
721
 
708
722
  ```bash
709
723
  pip install capytaine
710
724
  ```
711
- and Conda-forge:
725
+ and Conda-forge
726
+
712
727
  ```bash
713
728
  conda install -c conda-forge capytaine
714
729
  ```
715
730
 
716
731
  ## Documentation
717
732
 
718
- [https://ancell.in/capytaine/latest/](https://ancell.in/capytaine/latest/)
733
+ [https://capytaine.github.io/](https://capytaine.github.io/)
734
+
735
+ [![DOI](http://joss.theoj.org/papers/10.21105/joss.01341/status.svg)](https://doi.org/10.21105/joss.01341)
719
736
 
720
737
  ## License
721
738
 
722
- Copyright (C) 2017-2023, Matthieu Ancellin
739
+ Copyright (C) 2017-2024, Matthieu Ancellin
723
740
 
724
741
  Since April 2022, the development of Capytaine is funded by the Alliance for Sustainable Energy, LLC, Managing and Operating Contractor for the National Renewable Energy Laboratory (NREL) for the U.S. Department of Energy.
725
742
 
@@ -727,7 +744,8 @@ This program is free software: you can redistribute it and/or modify it under th
727
744
 
728
745
  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
729
746
 
730
- It is based on [Nemoh](https://lheea.ec-nantes.fr/logiciels-et-brevets/nemoh-presentation-192863.kjsp), which has been developed by Gérard Delhommeau, Aurélien Babarit et al., (École Centrale de Nantes) and is distributed under the Apache License 2.0.
747
+ It is based on version 2 of [Nemoh](https://lheea.ec-nantes.fr/logiciels-et-brevets/nemoh-presentation-192863.kjsp), which has been developed by Gérard Delhommeau, Aurélien Babarit et al., (École Centrale de Nantes) and was distributed under the Apache License 2.0.
748
+
749
+ Some core Fortran routines of Capytaine coming from Nemoh version 2 are also available under the Apache License 2.0. They can be found in the [`capytaine/green_functions/libDelhommeau`](https://github.com/capytaine/capytaine/tree/master/capytaine/green_functions/libDelhommeau) directory of Capytaine's repository.
731
750
 
732
- It includes code from [meshmagick](https://github.com/LHEEA/meshmagick/) by François Rongère (École
733
- Centrale de Nantes), licensed under the GNU General Public License (GPL).
751
+ Capytaine includes code from [meshmagick](https://github.com/LHEEA/meshmagick/) by François Rongère (École Centrale de Nantes), licensed under the GNU General Public License (GPL).
@@ -1,30 +1,37 @@
1
1
  # Capytaine: a linear potential flow BEM solver with Python.
2
2
 
3
- [![DOI](http://joss.theoj.org/papers/10.21105/joss.01341/status.svg)](https://doi.org/10.21105/joss.01341)
4
- ![CI status](https://github.com/capytaine/capytaine/actions/workflows/tests.yaml/badge.svg?event=push)
3
+ ![CI status](https://github.com/capytaine/capytaine/actions/workflows/test_new_commits.yaml/badge.svg?event=push)
4
+ ![CI status](https://github.com/capytaine/capytaine/actions/workflows/test_with_latest_dependencies.yaml/badge.svg)
5
+
5
6
 
6
7
  Capytaine is Python package for the simulation of the interaction between water waves and floating bodies in frequency domain.
7
8
  It is built around a full rewrite of the open source Boundary Element Method (BEM) solver Nemoh for the linear potential flow wave theory.
8
9
 
9
10
  ## Installation
10
11
 
12
+ [![PyPI](https://img.shields.io/pypi/v/capytaine)](https://pypi.org/project/capytaine)
13
+ [![Conda-forge](https://img.shields.io/conda/vn/conda-forge/capytaine)](https://github.com/conda-forge/capytaine-feedstock)
14
+
11
15
  Packages for Windows, macOS and Linux are available on PyPI:
12
16
 
13
17
  ```bash
14
18
  pip install capytaine
15
19
  ```
16
- and Conda-forge:
20
+ and Conda-forge
21
+
17
22
  ```bash
18
23
  conda install -c conda-forge capytaine
19
24
  ```
20
25
 
21
26
  ## Documentation
22
27
 
23
- [https://ancell.in/capytaine/latest/](https://ancell.in/capytaine/latest/)
28
+ [https://capytaine.github.io/](https://capytaine.github.io/)
29
+
30
+ [![DOI](http://joss.theoj.org/papers/10.21105/joss.01341/status.svg)](https://doi.org/10.21105/joss.01341)
24
31
 
25
32
  ## License
26
33
 
27
- Copyright (C) 2017-2023, Matthieu Ancellin
34
+ Copyright (C) 2017-2024, Matthieu Ancellin
28
35
 
29
36
  Since April 2022, the development of Capytaine is funded by the Alliance for Sustainable Energy, LLC, Managing and Operating Contractor for the National Renewable Energy Laboratory (NREL) for the U.S. Department of Energy.
30
37
 
@@ -32,7 +39,8 @@ This program is free software: you can redistribute it and/or modify it under th
32
39
 
33
40
  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
34
41
 
35
- It is based on [Nemoh](https://lheea.ec-nantes.fr/logiciels-et-brevets/nemoh-presentation-192863.kjsp), which has been developed by Gérard Delhommeau, Aurélien Babarit et al., (École Centrale de Nantes) and is distributed under the Apache License 2.0.
42
+ It is based on version 2 of [Nemoh](https://lheea.ec-nantes.fr/logiciels-et-brevets/nemoh-presentation-192863.kjsp), which has been developed by Gérard Delhommeau, Aurélien Babarit et al., (École Centrale de Nantes) and was distributed under the Apache License 2.0.
43
+
44
+ Some core Fortran routines of Capytaine coming from Nemoh version 2 are also available under the Apache License 2.0. They can be found in the [`capytaine/green_functions/libDelhommeau`](https://github.com/capytaine/capytaine/tree/master/capytaine/green_functions/libDelhommeau) directory of Capytaine's repository.
36
45
 
37
- It includes code from [meshmagick](https://github.com/LHEEA/meshmagick/) by François Rongère (École
38
- Centrale de Nantes), licensed under the GNU General Public License (GPL).
46
+ Capytaine includes code from [meshmagick](https://github.com/LHEEA/meshmagick/) by François Rongère (École Centrale de Nantes), licensed under the GNU General Public License (GPL).
@@ -1,14 +1,14 @@
1
- #!/usr/bin/env python
1
+ #!/usr/bin/env python3
2
2
 
3
3
  __all__ = ["__title__", "__description__", "__version__", "__author__", "__uri__", "__license__"]
4
4
 
5
5
  __title__ = "capytaine"
6
6
  __description__ = """Python BEM solver for linear potential flow, based on Nemoh"""
7
7
 
8
- __version__ = "2.0"
8
+ __version__ = "2.2"
9
9
 
10
10
  __author__ = "Matthieu Ancellin"
11
- __uri__ = "https://github.com/mancellin/capytaine"
11
+ __uri__ = "https://github.com/capytaine/capytaine"
12
12
  __license__ = "GPL-3.0"
13
13
 
14
14
 
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env python
2
- # coding: utf-8
3
1
  # Copyright (C) 2017-2019 Matthieu Ancellin
4
2
  # See LICENSE file at <https://github.com/mancellin/capytaine>
5
3
 
@@ -24,10 +22,14 @@ from capytaine.bodies.predefined.rectangles import Rectangle, RectangularParalle
24
22
 
25
23
  from capytaine.bem.problems_and_results import RadiationProblem, DiffractionProblem
26
24
  from capytaine.bem.solver import BEMSolver
27
- from capytaine.bem.engines import BasicMatrixEngine, HierarchicalToeplitzMatrixEngine
25
+ from capytaine.bem.engines import BasicMatrixEngine, HierarchicalToeplitzMatrixEngine, HierarchicalPrecondMatrixEngine
28
26
  from capytaine.green_functions.delhommeau import Delhommeau, XieDelhommeau
29
27
 
30
28
  from capytaine.post_pro.free_surfaces import FreeSurface
31
29
 
32
30
  from capytaine.io.mesh_loaders import load_mesh
33
31
  from capytaine.io.xarray import assemble_dataset
32
+
33
+ from capytaine.ui.rich import set_logging
34
+
35
+ set_logging(level="WARNING")
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env python
2
- # coding: utf-8
3
1
  """Computing the potential and velocity of Airy wave."""
4
2
  # Copyright (C) 2017-2019 Matthieu Ancellin
5
3
  # See LICENSE file at <https://github.com/mancellin/capytaine>
@@ -27,7 +25,8 @@ def airy_waves_potential(points, pb):
27
25
  x, y, z = points.T
28
26
  k = pb.wavenumber
29
27
  h = pb.water_depth
30
- wbar = x * np.cos(pb.wave_direction) + y * np.sin(pb.wave_direction)
28
+ beta = pb.encounter_wave_direction
29
+ wbar = x * np.cos(beta) + y * np.sin(beta)
31
30
 
32
31
  if 0 <= k*h < 20:
33
32
  cih = np.cosh(k*(z+h))/np.cosh(k*h)
@@ -61,8 +60,9 @@ def airy_waves_velocity(points, pb):
61
60
  x, y, z = points.T
62
61
  k = pb.wavenumber
63
62
  h = pb.water_depth
63
+ beta = pb.encounter_wave_direction
64
64
 
65
- wbar = x * np.cos(pb.wave_direction) + y * np.sin(pb.wave_direction)
65
+ wbar = x * np.cos(beta) + y * np.sin(beta)
66
66
 
67
67
  if 0 <= k*h < 20:
68
68
  cih = np.cosh(k*(z+h))/np.cosh(k*h)
@@ -104,5 +104,3 @@ def airy_waves_free_surface_elevation(points, pb):
104
104
  """
105
105
  points, output_shape = _normalize_free_surface_points(points)
106
106
  return 1j * pb.omega / pb.g * airy_waves_potential(points, pb).reshape(output_shape)
107
-
108
-