capytaine 2.0__tar.gz → 2.1__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 (218) hide show
  1. capytaine-2.1/.github/workflows/build_docs.yml +46 -0
  2. {capytaine-2.0 → capytaine-2.1}/.github/workflows/build_wheels.yaml +9 -13
  3. capytaine-2.1/.github/workflows/test_new_commits.yaml +44 -0
  4. capytaine-2.1/.github/workflows/test_with_latest_dependencies.yaml +35 -0
  5. {capytaine-2.0 → capytaine-2.1}/.gitignore +1 -1
  6. capytaine-2.1/.pre-commit-config.yaml +40 -0
  7. capytaine-2.1/.zenodo.json +15 -0
  8. capytaine-2.1/Makefile +30 -0
  9. {capytaine-2.0 → capytaine-2.1}/PKG-INFO +37 -14
  10. {capytaine-2.0 → capytaine-2.1}/README.md +16 -8
  11. {capytaine-2.0 → capytaine-2.1}/capytaine/__about__.py +3 -3
  12. {capytaine-2.0 → capytaine-2.1}/capytaine/__init__.py +5 -3
  13. {capytaine-2.0 → capytaine-2.1}/capytaine/bem/airy_waves.py +4 -6
  14. {capytaine-2.0 → capytaine-2.1}/capytaine/bem/engines.py +146 -25
  15. {capytaine-2.0 → capytaine-2.1}/capytaine/bem/problems_and_results.py +206 -100
  16. {capytaine-2.0 → capytaine-2.1}/capytaine/bem/solver.py +140 -42
  17. {capytaine-2.0 → capytaine-2.1}/capytaine/bodies/__init__.py +1 -1
  18. {capytaine-2.0 → capytaine-2.1}/capytaine/bodies/bodies.py +86 -19
  19. {capytaine-2.0 → capytaine-2.1}/capytaine/bodies/predefined/__init__.py +0 -2
  20. {capytaine-2.0 → capytaine-2.1}/capytaine/bodies/predefined/cylinders.py +0 -2
  21. {capytaine-2.0 → capytaine-2.1}/capytaine/bodies/predefined/rectangles.py +0 -2
  22. {capytaine-2.0 → capytaine-2.1}/capytaine/bodies/predefined/spheres.py +0 -2
  23. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/abstract_green_function.py +0 -3
  24. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/delhommeau.py +161 -51
  25. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/.gitignore +1 -0
  26. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/LICENSE +0 -1
  27. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/Makefile +2 -1
  28. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/benchmarks/openmp/benchmark_omp.f90 +4 -4
  29. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/benchmarks/openmp/read_output.py +1 -1
  30. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/benchmarks/profiling/benchmark_profiling.f90 +4 -4
  31. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/examples/minimal/minimal_example.f90 +5 -5
  32. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/examples/minimal/minimal_example.py +7 -7
  33. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/Delhommeau_integrals.f90 +104 -27
  34. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/Green_Rankine.f90 +1 -1
  35. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/Green_wave.f90 +28 -20
  36. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/matrices.f90 +66 -20
  37. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/old_Prony_decomposition.f90 +2 -2
  38. {capytaine-2.0 → capytaine-2.1}/capytaine/io/bemio.py +17 -16
  39. {capytaine-2.0 → capytaine-2.1}/capytaine/io/legacy.py +52 -20
  40. {capytaine-2.0 → capytaine-2.1}/capytaine/io/mesh_loaders.py +1 -3
  41. {capytaine-2.0 → capytaine-2.1}/capytaine/io/mesh_writers.py +1 -3
  42. {capytaine-2.0 → capytaine-2.1}/capytaine/io/xarray.py +69 -33
  43. {capytaine-2.0 → capytaine-2.1}/capytaine/matrices/__init__.py +0 -2
  44. {capytaine-2.0 → capytaine-2.1}/capytaine/matrices/block.py +23 -2
  45. {capytaine-2.0 → capytaine-2.1}/capytaine/matrices/block_toeplitz.py +0 -2
  46. {capytaine-2.0 → capytaine-2.1}/capytaine/matrices/builders.py +2 -4
  47. {capytaine-2.0 → capytaine-2.1}/capytaine/matrices/linear_solvers.py +83 -5
  48. {capytaine-2.0 → capytaine-2.1}/capytaine/matrices/low_rank.py +0 -2
  49. {capytaine-2.0 → capytaine-2.1}/capytaine/meshes/__init__.py +0 -2
  50. {capytaine-2.0 → capytaine-2.1}/capytaine/meshes/clipper.py +0 -3
  51. {capytaine-2.0 → capytaine-2.1}/capytaine/meshes/collections.py +38 -20
  52. {capytaine-2.0 → capytaine-2.1}/capytaine/meshes/geometry.py +3 -6
  53. {capytaine-2.0 → capytaine-2.1}/capytaine/meshes/meshes.py +47 -80
  54. {capytaine-2.0 → capytaine-2.1}/capytaine/meshes/predefined/__init__.py +0 -1
  55. {capytaine-2.0 → capytaine-2.1}/capytaine/meshes/predefined/cylinders.py +46 -5
  56. {capytaine-2.0 → capytaine-2.1}/capytaine/meshes/predefined/rectangles.py +43 -10
  57. {capytaine-2.0 → capytaine-2.1}/capytaine/meshes/predefined/spheres.py +15 -4
  58. {capytaine-2.0 → capytaine-2.1}/capytaine/meshes/properties.py +0 -2
  59. capytaine-2.1/capytaine/meshes/quadratures.py +80 -0
  60. {capytaine-2.0 → capytaine-2.1}/capytaine/meshes/quality.py +1 -3
  61. {capytaine-2.0 → capytaine-2.1}/capytaine/meshes/surface_integrals.py +0 -1
  62. {capytaine-2.0 → capytaine-2.1}/capytaine/meshes/symmetric.py +55 -14
  63. {capytaine-2.0 → capytaine-2.1}/capytaine/post_pro/free_surfaces.py +4 -7
  64. {capytaine-2.0 → capytaine-2.1}/capytaine/post_pro/impedance.py +12 -10
  65. {capytaine-2.0 → capytaine-2.1}/capytaine/post_pro/kochin.py +5 -3
  66. capytaine-2.1/capytaine/post_pro/rao.py +60 -0
  67. capytaine-2.1/capytaine/tools/cache_on_disk.py +24 -0
  68. {capytaine-2.0 → capytaine-2.1}/capytaine/tools/deprecation_handling.py +2 -2
  69. {capytaine-2.0 → capytaine-2.1}/capytaine/tools/lists_of_points.py +13 -3
  70. capytaine-2.1/capytaine/tools/lru_cache.py +49 -0
  71. {capytaine-2.0 → capytaine-2.1}/capytaine/tools/optional_imports.py +0 -2
  72. {capytaine-2.0 → capytaine-2.1}/capytaine/tools/prony_decomposition.py +0 -3
  73. capytaine-2.1/capytaine/tools/symbolic_multiplication.py +104 -0
  74. capytaine-2.1/capytaine/ui/cli.py +28 -0
  75. capytaine-2.1/capytaine/ui/rich.py +5 -0
  76. {capytaine-2.0 → capytaine-2.1}/capytaine/ui/vtk/__init__.py +0 -3
  77. {capytaine-2.0 → capytaine-2.1}/capytaine/ui/vtk/animation.py +28 -8
  78. {capytaine-2.0 → capytaine-2.1}/capytaine/ui/vtk/body_viewer.py +0 -2
  79. {capytaine-2.0 → capytaine-2.1}/capytaine/ui/vtk/helpers.py +0 -3
  80. {capytaine-2.0 → capytaine-2.1}/capytaine/ui/vtk/mesh_viewer.py +0 -3
  81. capytaine-2.1/capytaine.scm +61 -0
  82. {capytaine-2.0 → capytaine-2.1}/docs/Makefile +0 -9
  83. {capytaine-2.0 → capytaine-2.1}/docs/_static/custom.css +1 -2
  84. {capytaine-2.0 → capytaine-2.1}/docs/_templates/layout.html +1 -0
  85. {capytaine-2.0 → capytaine-2.1}/docs/changelog.rst +92 -3
  86. {capytaine-2.0 → capytaine-2.1}/docs/citing.rst +24 -1
  87. {capytaine-2.0 → capytaine-2.1}/docs/conf.py +5 -0
  88. {capytaine-2.0 → capytaine-2.1}/docs/developer_manual/index.rst +0 -1
  89. {capytaine-2.0 → capytaine-2.1}/docs/developer_manual/installation.rst +14 -3
  90. capytaine-2.1/docs/features.rst +59 -0
  91. {capytaine-2.0 → capytaine-2.1}/docs/index.rst +13 -8
  92. {capytaine-2.0 → capytaine-2.1}/docs/theory_manual/bibliography.rst +3 -1
  93. {capytaine-2.0 → capytaine-2.1}/docs/theory_manual/theory.rst +136 -19
  94. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/conventions.rst +45 -2
  95. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/cookbook.rst +1 -3
  96. capytaine-2.1/docs/user_manual/examples/Malenica_forward_speed.py +76 -0
  97. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/Nemoh.cal +0 -1
  98. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/animate_free_surface.py +4 -7
  99. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/axisymmetric_buoy.py +1 -3
  100. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/boat_animation.py +7 -11
  101. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/compare_Green_functions.py +1 -4
  102. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/convergence_study.py +1 -4
  103. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/custom_Green_function.py +3 -3
  104. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/custom_dofs.py +0 -1
  105. capytaine-2.1/docs/user_manual/examples/elasticity_of_beam.py +77 -0
  106. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/finite_depth_cylinder.py +2 -5
  107. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/hydrostatics.py +0 -1
  108. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/kochin.py +1 -3
  109. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/plot_influence_matrix.py +1 -1
  110. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/plot_velocity_in_domain.py +2 -4
  111. capytaine-2.1/docs/user_manual/examples/preconditioner.py +89 -0
  112. capytaine-2.1/docs/user_manual/examples/quickstart.py +32 -0
  113. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/radiation_cylinder.py +4 -9
  114. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/hydrostatics.rst +1 -2
  115. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/index.rst +1 -0
  116. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/installation.rst +19 -3
  117. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/mesh.rst +18 -16
  118. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/outputs.rst +23 -18
  119. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/post_pro.rst +15 -7
  120. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/problem_setup.rst +35 -21
  121. capytaine-2.1/docs/user_manual/quickstart.rst +15 -0
  122. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/resolution.rst +44 -1
  123. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/tutorial.rst +8 -11
  124. {capytaine-2.0 → capytaine-2.1}/meson.build +5 -1
  125. capytaine-2.1/noxfile.py +55 -0
  126. capytaine-2.1/pyproject.toml +48 -0
  127. capytaine-2.1/pytest/envs/2023-11-07.lock +1132 -0
  128. capytaine-2.1/pytest/test_airy_waves.py +19 -0
  129. {capytaine-2.0 → capytaine-2.1}/pytest/test_bem_engines.py +44 -21
  130. {capytaine-2.0 → capytaine-2.1}/pytest/test_bem_green_functions.py +51 -47
  131. capytaine-2.1/pytest/test_bem_green_functions_table_density.py +108 -0
  132. {capytaine-2.0 → capytaine-2.1}/pytest/test_bem_hierarchical_toeplitz_matrices.py +34 -26
  133. {capytaine-2.0 → capytaine-2.1}/pytest/test_bem_linear_combination_of_dofs.py +13 -11
  134. {capytaine-2.0 → capytaine-2.1}/pytest/test_bem_potential_velocity_and_free_surface_elevation.py +47 -0
  135. {capytaine-2.0 → capytaine-2.1}/pytest/test_bem_problems_and_results.py +102 -123
  136. capytaine-2.1/pytest/test_bem_solver.py +153 -0
  137. capytaine-2.1/pytest/test_bem_with_quadratures.py +76 -0
  138. {capytaine-2.0 → capytaine-2.1}/pytest/test_bodies.py +52 -8
  139. {capytaine-2.0 → capytaine-2.1}/pytest/test_consistency_with_Nemoh_2.py +54 -49
  140. capytaine-2.1/pytest/test_forward_speed.py +223 -0
  141. {capytaine-2.0 → capytaine-2.1}/pytest/test_hydrostatics.py +12 -0
  142. {capytaine-2.0 → capytaine-2.1}/pytest/test_io.py +1 -1
  143. {capytaine-2.0 → capytaine-2.1}/pytest/test_io_meshes.py +51 -44
  144. {capytaine-2.0 → capytaine-2.1}/pytest/test_linear_solvers.py +3 -4
  145. {capytaine-2.0 → capytaine-2.1}/pytest/test_matrices.py +8 -0
  146. {capytaine-2.0 → capytaine-2.1}/pytest/test_meshes.py +9 -6
  147. {capytaine-2.0 → capytaine-2.1}/pytest/test_meshes_collections_and_symmetries.py +12 -10
  148. {capytaine-2.0 → capytaine-2.1}/pytest/test_meshes_geometry.py +0 -1
  149. {capytaine-2.0 → capytaine-2.1}/pytest/test_meshes_predefined.py +40 -0
  150. {capytaine-2.0 → capytaine-2.1}/pytest/test_post_pro.py +22 -16
  151. capytaine-2.1/pytest/test_post_pro_kochin.py +115 -0
  152. capytaine-2.1/pytest/test_tool_lru_cache.py +107 -0
  153. capytaine-2.1/pytest/test_tool_symbolic_multiplication.py +102 -0
  154. capytaine-2.0/.github/workflows/tests.yaml +0 -39
  155. capytaine-2.0/.zenodo.json +0 -50
  156. capytaine-2.0/Makefile +0 -23
  157. capytaine-2.0/capytaine/post_pro/rao.py +0 -66
  158. capytaine-2.0/capytaine/tools/lru_cache.py +0 -55
  159. capytaine-2.0/capytaine/ui/cli.py +0 -48
  160. capytaine-2.0/docs/features.rst +0 -49
  161. capytaine-2.0/pyproject.toml +0 -30
  162. capytaine-2.0/pytest/test_bem_solver.py +0 -112
  163. capytaine-2.0/pytest/test_bem_with_quadratures.py +0 -64
  164. capytaine-2.0/pytest/test_post_pro_kochin.py +0 -44
  165. {capytaine-2.0 → capytaine-2.1}/CONTRIBUTING.md +0 -0
  166. {capytaine-2.0 → capytaine-2.1}/Dockerfile +0 -0
  167. {capytaine-2.0 → capytaine-2.1}/LICENSE +0 -0
  168. {capytaine-2.0 → capytaine-2.1}/capytaine/bem/__init__.py +0 -0
  169. {capytaine-2.0 → capytaine-2.1}/capytaine/bodies/dofs.py +0 -0
  170. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/__init__.py +0 -0
  171. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/README.md +0 -0
  172. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/benchmarks/openmp/display_mesh.py +0 -0
  173. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/benchmarks/tabulations/benchmark_tabulation.f90 +0 -0
  174. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/constants.f90 +0 -0
  175. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/float32.f90 +0 -0
  176. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/float64.f90 +0 -0
  177. {capytaine-2.0 → capytaine-2.1}/capytaine/green_functions/libs/__init__.py +0 -0
  178. {capytaine-2.0 → capytaine-2.1}/capytaine/io/__init__.py +0 -0
  179. {capytaine-2.0 → capytaine-2.1}/capytaine/io/meshio.py +0 -0
  180. {capytaine-2.0 → capytaine-2.1}/capytaine/post_pro/__init__.py +0 -0
  181. {capytaine-2.0 → capytaine-2.1}/capytaine/tools/__init__.py +0 -0
  182. {capytaine-2.0 → capytaine-2.1}/capytaine/ui/__init__.py +0 -0
  183. {capytaine-2.0 → capytaine-2.1}/docs/_static/proof.css +0 -0
  184. {capytaine-2.0 → capytaine-2.1}/docs/_static/proof.js +0 -0
  185. {capytaine-2.0 → capytaine-2.1}/docs/developer_manual/overview.rst +0 -0
  186. {capytaine-2.0 → capytaine-2.1}/docs/theory_manual/index.rst +0 -0
  187. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/boat_200.mar +0 -0
  188. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/free_surface_elevation.py +0 -0
  189. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/haskind.py +0 -0
  190. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/multibody.py +0 -0
  191. {capytaine-2.0 → capytaine-2.1}/docs/user_manual/examples/symmetric_body.py +0 -0
  192. {capytaine-2.0 → capytaine-2.1}/pytest/Bemio_verification_cases/sphere.out +0 -0
  193. {capytaine-2.0 → capytaine-2.1}/pytest/Hydrostatics_cases/sphere__hor_cyl__ver_cyl.pkl.json +0 -0
  194. {capytaine-2.0 → capytaine-2.1}/pytest/Nemoh_verification_cases/Cylinder/Cylinder.dat +0 -0
  195. {capytaine-2.0 → capytaine-2.1}/pytest/Nemoh_verification_cases/Cylinder/Nemoh.cal +0 -0
  196. {capytaine-2.0 → capytaine-2.1}/pytest/Nemoh_verification_cases/Cylinder/Nemoh_v3.cal +0 -0
  197. {capytaine-2.0 → capytaine-2.1}/pytest/Nemoh_verification_cases/Cylinder/reference_results/DiffractionForce.tec +0 -0
  198. {capytaine-2.0 → capytaine-2.1}/pytest/Nemoh_verification_cases/Cylinder/reference_results/ExcitationForce.tec +0 -0
  199. {capytaine-2.0 → capytaine-2.1}/pytest/Nemoh_verification_cases/Cylinder/reference_results/RadiationCoefficients.tec +0 -0
  200. {capytaine-2.0 → capytaine-2.1}/pytest/Nemoh_verification_cases/Nemoh.m +0 -0
  201. {capytaine-2.0 → capytaine-2.1}/pytest/Nemoh_verification_cases/NonSymmetrical/Nemoh.cal +0 -0
  202. {capytaine-2.0 → capytaine-2.1}/pytest/Nemoh_verification_cases/NonSymmetrical/Nemoh_v3.cal +0 -0
  203. {capytaine-2.0 → capytaine-2.1}/pytest/Nemoh_verification_cases/NonSymmetrical/NonSymmetrical.dat +0 -0
  204. {capytaine-2.0 → capytaine-2.1}/pytest/Nemoh_verification_cases/NonSymmetrical/reference_results/DiffractionForce.tec +0 -0
  205. {capytaine-2.0 → capytaine-2.1}/pytest/Nemoh_verification_cases/NonSymmetrical/reference_results/ExcitationForce.tec +0 -0
  206. {capytaine-2.0 → capytaine-2.1}/pytest/Nemoh_verification_cases/NonSymmetrical/reference_results/RadiationCoefficients.tec +0 -0
  207. {capytaine-2.0 → capytaine-2.1}/pytest/io_legacy_cases/reference_data/single_body/Hydrostatics.dat +0 -0
  208. {capytaine-2.0 → capytaine-2.1}/pytest/io_legacy_cases/reference_data/single_body/KH.dat +0 -0
  209. {capytaine-2.0 → capytaine-2.1}/pytest/io_legacy_cases/reference_data/single_body_list/Hydrostatics.dat +0 -0
  210. {capytaine-2.0 → capytaine-2.1}/pytest/io_legacy_cases/reference_data/single_body_list/KH.dat +0 -0
  211. {capytaine-2.0 → capytaine-2.1}/pytest/io_legacy_cases/reference_data/two_bodies_list/Hydrostatics_0.dat +0 -0
  212. {capytaine-2.0 → capytaine-2.1}/pytest/io_legacy_cases/reference_data/two_bodies_list/Hydrostatics_1.dat +0 -0
  213. {capytaine-2.0 → capytaine-2.1}/pytest/io_legacy_cases/reference_data/two_bodies_list/KH_0.dat +0 -0
  214. {capytaine-2.0 → capytaine-2.1}/pytest/io_legacy_cases/reference_data/two_bodies_list/KH_1.dat +0 -0
  215. {capytaine-2.0 → capytaine-2.1}/pytest/mesh_files_examples/barge.med +0 -0
  216. {capytaine-2.0 → capytaine-2.1}/pytest/test_bodies_predefined.py +0 -0
  217. {capytaine-2.0 → capytaine-2.1}/pytest/test_ui_matplotlib.py +0 -0
  218. {capytaine-2.0 → capytaine-2.1}/pytest/test_ui_vtk.py +0 -0
@@ -0,0 +1,46 @@
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
+ jobs:
18
+ build:
19
+
20
+ runs-on: ubuntu-latest
21
+
22
+ steps:
23
+
24
+ - name: Checkout
25
+ uses: actions/checkout@v4
26
+
27
+ - uses: actions/setup-python@v5
28
+ with:
29
+ python-version: '3.12'
30
+
31
+ - name: Install Capytaine and other dependencies
32
+ run: pip install .[optional,docs]
33
+
34
+ - name: Build documentation
35
+ run: cd docs && make
36
+
37
+ - name: Deploy pages
38
+ if: github.ref == 'refs/heads/master' # Only deploy the version merged into the master branch
39
+ uses: JamesIves/github-pages-deploy-action@releases/v4
40
+ with:
41
+ folder: ./docs/_build/html/
42
+ repository-name: capytaine/capytaine.github.io
43
+ branch: main
44
+ target-folder: master/
45
+ clean: true
46
+ token: ${{ secrets.TOKEN_PAGES }}
@@ -18,21 +18,16 @@ jobs:
18
18
  os: [ubuntu-20.04, macos-11, windows-2019]
19
19
 
20
20
  steps:
21
- - uses: actions/checkout@v3
21
+ - uses: actions/checkout@v4
22
22
 
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
23
+ - uses: fortran-lang/setup-fortran@v1
24
+ id: setup-fortran
25
+ with:
26
+ compiler: 'gcc'
27
+ version: '13'
33
28
 
34
29
  - name: Build wheels
35
- uses: pypa/cibuildwheel@v2.12.3
30
+ uses: pypa/cibuildwheel@v2.17.0
36
31
  env:
37
32
  CIBW_SKIP: "pp* *i686* *musllinux* *win32*"
38
33
  # Package the DLL dependencies in the wheel for windows (done by default for the other platforms).
@@ -44,6 +39,7 @@ jobs:
44
39
  # output-dir: wheelhouse
45
40
  # config-file: "{package}/pyproject.toml"
46
41
 
47
- - uses: actions/upload-artifact@v3
42
+ - uses: actions/upload-artifact@v4
48
43
  with:
44
+ name: wheels-${{ matrix.os }}
49
45
  path: ./wheelhouse/*.whl
@@ -0,0 +1,44 @@
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
+ jobs:
22
+ build_and_test:
23
+
24
+ runs-on: ubuntu-latest
25
+
26
+ strategy:
27
+ matrix:
28
+ python-version: ['3.8', '3.11']
29
+
30
+ steps:
31
+
32
+ - name: Checkout repository and submodules
33
+ uses: actions/checkout@v4
34
+
35
+ - name: Set up Python ${{ matrix.python-version }}
36
+ uses: actions/setup-python@v5
37
+ with:
38
+ python-version: ${{ matrix.python-version }}
39
+
40
+ - name: Set up nox
41
+ uses: wntrblm/nox@2024.03.02
42
+
43
+ - name: Run nox session
44
+ run: nox -s build_and_test_on_locked_env
@@ -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.7', '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
@@ -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"]
@@ -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.1/Makefile ADDED
@@ -0,0 +1,30 @@
1
+ install:
2
+ pip install .
3
+
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 .
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.1
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,65 @@ 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
688
688
  Requires-Dist: scipy
689
689
  Requires-Dist: pandas>=1.3
690
690
  Requires-Dist: xarray
691
- Requires-Dist: pytest; extra == "ci"
692
- Requires-Dist: hypothesis; extra == "ci"
693
- Provides-Extra: ci
691
+ Requires-Dist: rich
692
+ Requires-Dist: matplotlib; extra == "optional"
693
+ Requires-Dist: joblib>=1.3; extra == "optional"
694
+ 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
+ Requires-Dist: pytest; extra == "test"
701
+ Requires-Dist: sphinx; extra == "docs"
702
+ Requires-Dist: sphinx-toolbox; extra == "docs"
703
+ Requires-Dist: sphinxcontrib-proof; extra == "docs"
704
+ Requires-Dist: sphinxcontrib-mermaid; extra == "docs"
705
+ Provides-Extra: optional
706
+ Provides-Extra: build
707
+ Provides-Extra: test
708
+ Provides-Extra: docs
694
709
  Description-Content-Type: text/markdown
695
710
 
696
711
  # Capytaine: a linear potential flow BEM solver with Python.
697
712
 
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)
713
+ ![CI status](https://github.com/capytaine/capytaine/actions/workflows/test_new_commits.yaml/badge.svg?event=push)
714
+ ![CI status](https://github.com/capytaine/capytaine/actions/workflows/test_with_latest_dependencies.yaml/badge.svg)
715
+
700
716
 
701
717
  Capytaine is Python package for the simulation of the interaction between water waves and floating bodies in frequency domain.
702
718
  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
719
 
704
720
  ## Installation
705
721
 
722
+ [![PyPI](https://img.shields.io/pypi/v/capytaine)](https://pypi.org/project/capytaine)
723
+ [![Conda-forge](https://img.shields.io/conda/vn/conda-forge/capytaine)](https://github.com/conda-forge/capytaine-feedstock)
724
+
706
725
  Packages for Windows, macOS and Linux are available on PyPI:
707
726
 
708
727
  ```bash
709
728
  pip install capytaine
710
729
  ```
711
- and Conda-forge:
730
+ and Conda-forge
731
+
712
732
  ```bash
713
733
  conda install -c conda-forge capytaine
714
734
  ```
715
735
 
716
736
  ## Documentation
717
737
 
718
- [https://ancell.in/capytaine/latest/](https://ancell.in/capytaine/latest/)
738
+ [https://capytaine.github.io/](https://capytaine.github.io/)
739
+
740
+ [![DOI](http://joss.theoj.org/papers/10.21105/joss.01341/status.svg)](https://doi.org/10.21105/joss.01341)
719
741
 
720
742
  ## License
721
743
 
722
- Copyright (C) 2017-2023, Matthieu Ancellin
744
+ Copyright (C) 2017-2024, Matthieu Ancellin
723
745
 
724
746
  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
747
 
@@ -727,7 +749,8 @@ This program is free software: you can redistribute it and/or modify it under th
727
749
 
728
750
  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
751
 
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.
752
+ 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.
753
+
754
+ 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
755
 
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).
756
+ 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.1"
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
-