capytaine 2.3__cp311-cp311-win_amd64.whl → 3.0.0a1__cp311-cp311-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. capytaine/__about__.py +7 -2
  2. capytaine/__init__.py +11 -15
  3. capytaine/bem/engines.py +234 -354
  4. capytaine/bem/problems_and_results.py +30 -21
  5. capytaine/bem/solver.py +205 -81
  6. capytaine/bodies/bodies.py +279 -862
  7. capytaine/bodies/dofs.py +136 -9
  8. capytaine/bodies/hydrostatics.py +540 -0
  9. capytaine/bodies/multibodies.py +216 -0
  10. capytaine/green_functions/{libs/Delhommeau_float32.cp311-win_amd64.dll.a → Delhommeau_float32.cp311-win_amd64.dll.a} +0 -0
  11. capytaine/green_functions/Delhommeau_float32.cp311-win_amd64.pyd +0 -0
  12. capytaine/green_functions/{libs/Delhommeau_float64.cp311-win_amd64.dll.a → Delhommeau_float64.cp311-win_amd64.dll.a} +0 -0
  13. capytaine/green_functions/Delhommeau_float64.cp311-win_amd64.pyd +0 -0
  14. capytaine/green_functions/abstract_green_function.py +2 -2
  15. capytaine/green_functions/delhommeau.py +50 -31
  16. capytaine/green_functions/hams.py +19 -13
  17. capytaine/io/legacy.py +3 -103
  18. capytaine/io/xarray.py +15 -10
  19. capytaine/meshes/__init__.py +2 -6
  20. capytaine/meshes/abstract_meshes.py +375 -0
  21. capytaine/meshes/clean.py +302 -0
  22. capytaine/meshes/clip.py +347 -0
  23. capytaine/meshes/export.py +89 -0
  24. capytaine/meshes/geometry.py +244 -394
  25. capytaine/meshes/io.py +433 -0
  26. capytaine/meshes/meshes.py +621 -676
  27. capytaine/meshes/predefined/cylinders.py +22 -56
  28. capytaine/meshes/predefined/rectangles.py +26 -85
  29. capytaine/meshes/predefined/spheres.py +4 -11
  30. capytaine/meshes/quality.py +118 -407
  31. capytaine/meshes/surface_integrals.py +48 -29
  32. capytaine/meshes/symmetric_meshes.py +641 -0
  33. capytaine/meshes/visualization.py +353 -0
  34. capytaine/post_pro/free_surfaces.py +1 -4
  35. capytaine/post_pro/kochin.py +10 -10
  36. capytaine/tools/block_circulant_matrices.py +275 -0
  37. capytaine/tools/lists_of_points.py +2 -2
  38. capytaine/tools/memory_monitor.py +45 -0
  39. capytaine/tools/symbolic_multiplication.py +31 -5
  40. capytaine/tools/timer.py +68 -42
  41. capytaine-3.0.0a1.dist-info/DELVEWHEEL +2 -0
  42. {capytaine-2.3.dist-info → capytaine-3.0.0a1.dist-info}/METADATA +8 -14
  43. capytaine-3.0.0a1.dist-info/RECORD +70 -0
  44. capytaine/bodies/predefined/__init__.py +0 -6
  45. capytaine/bodies/predefined/cylinders.py +0 -151
  46. capytaine/bodies/predefined/rectangles.py +0 -111
  47. capytaine/bodies/predefined/spheres.py +0 -70
  48. capytaine/green_functions/FinGreen3D/.gitignore +0 -1
  49. capytaine/green_functions/FinGreen3D/FinGreen3D.f90 +0 -3589
  50. capytaine/green_functions/FinGreen3D/LICENSE +0 -165
  51. capytaine/green_functions/FinGreen3D/Makefile +0 -16
  52. capytaine/green_functions/FinGreen3D/README.md +0 -24
  53. capytaine/green_functions/FinGreen3D/test_program.f90 +0 -39
  54. capytaine/green_functions/LiangWuNoblesse/.gitignore +0 -1
  55. capytaine/green_functions/LiangWuNoblesse/LICENSE +0 -504
  56. capytaine/green_functions/LiangWuNoblesse/LiangWuNoblesseWaveTerm.f90 +0 -751
  57. capytaine/green_functions/LiangWuNoblesse/Makefile +0 -18
  58. capytaine/green_functions/LiangWuNoblesse/README.md +0 -2
  59. capytaine/green_functions/LiangWuNoblesse/test_program.f90 +0 -28
  60. capytaine/green_functions/libs/Delhommeau_float32.cp311-win_amd64.pyd +0 -0
  61. capytaine/green_functions/libs/Delhommeau_float64.cp311-win_amd64.pyd +0 -0
  62. capytaine/green_functions/libs/__init__.py +0 -0
  63. capytaine/io/mesh_loaders.py +0 -1086
  64. capytaine/io/mesh_writers.py +0 -692
  65. capytaine/io/meshio.py +0 -38
  66. capytaine/matrices/__init__.py +0 -16
  67. capytaine/matrices/block.py +0 -592
  68. capytaine/matrices/block_toeplitz.py +0 -325
  69. capytaine/matrices/builders.py +0 -89
  70. capytaine/matrices/linear_solvers.py +0 -232
  71. capytaine/matrices/low_rank.py +0 -395
  72. capytaine/meshes/clipper.py +0 -465
  73. capytaine/meshes/collections.py +0 -334
  74. capytaine/meshes/mesh_like_protocol.py +0 -37
  75. capytaine/meshes/properties.py +0 -276
  76. capytaine/meshes/quadratures.py +0 -80
  77. capytaine/meshes/symmetric.py +0 -392
  78. capytaine/tools/lru_cache.py +0 -49
  79. capytaine/ui/vtk/__init__.py +0 -3
  80. capytaine/ui/vtk/animation.py +0 -329
  81. capytaine/ui/vtk/body_viewer.py +0 -28
  82. capytaine/ui/vtk/helpers.py +0 -82
  83. capytaine/ui/vtk/mesh_viewer.py +0 -461
  84. capytaine-2.3.dist-info/DELVEWHEEL +0 -2
  85. capytaine-2.3.dist-info/RECORD +0 -97
  86. {capytaine-2.3.dist-info → capytaine-3.0.0a1.dist-info}/LICENSE +0 -0
  87. {capytaine-2.3.dist-info → capytaine-3.0.0a1.dist-info}/WHEEL +0 -0
  88. {capytaine-2.3.dist-info → capytaine-3.0.0a1.dist-info}/entry_points.txt +0 -0
@@ -1,70 +0,0 @@
1
- """Generate spherical bodies."""
2
- # Copyright (C) 2017-2022 Matthieu Ancellin
3
- # See LICENSE file at <https://github.com/capytaine/capytaine>
4
-
5
- import logging
6
-
7
- import numpy as np
8
-
9
- from capytaine.meshes import Mesh
10
- from capytaine.meshes.predefined import mesh_sphere
11
- from capytaine.bodies.bodies import FloatingBody
12
-
13
- LOG = logging.getLogger(__name__)
14
-
15
-
16
- class Sphere(FloatingBody):
17
- """Sphere
18
- Deprecated: please prefer capytaine.meshes.predefined.mesh_sphere()
19
-
20
- Parameters
21
- ----------
22
- radius : float
23
- radius of the sphere
24
- center : 3-ple or array of shape (3,)
25
- position of the geometric center of the sphere
26
- ntheta : int
27
- number of panels along a meridian (or number of parallels-1)
28
- nphi : int
29
- number of panels along a parallel (or number of meridians-1)
30
- axial_symmetry : bool
31
- if True, use the axial symmetry to build the mesh (default: True)
32
- clip_free_surface : bool
33
- if True, only mesh the part of the sphere where z < 0 (default: False),
34
- can be used with center to obtain any clipped sphere,
35
- if True, then ntheta is the number of parallel below the free surface.
36
- name : string
37
- a name identifying the sphere (default: "sphere_id" where id is an unique integer).
38
- """
39
-
40
- def __init__(self, *, radius=1.0, center=(0, 0, 0),
41
- ntheta=10, nphi=10, clip_free_surface=False,
42
- axial_symmetry=True, clever=None,
43
- name=None):
44
-
45
- LOG.warning("Deprecation warning: The class Sphere() is deprecated. "
46
- "Please prefer the function capytaine.meshes.predefined.mesh_sphere()")
47
-
48
- if clever is not None:
49
- LOG.warning("Deprecation warning: `clever` argument for Sphere is deprecated. "
50
- "Use `axial_symmetry` instead.")
51
-
52
- if name is None:
53
- name = f"sphere_{next(Mesh._ids)}"
54
-
55
- if clip_free_surface:
56
- if center[2] < -radius: # fully immersed
57
- pass
58
- elif center[2] < radius:
59
- ntheta = int(ntheta*np.pi/np.arccos(center[2]/radius))
60
- else:
61
- raise ValueError("Impossible to mesh the immersed hull of a sphere completely out of the water")
62
-
63
- mesh = mesh_sphere(radius=radius, center=center, resolution=(ntheta, nphi), axial_symmetry=axial_symmetry, name=f"{name}_mesh")
64
-
65
- if clip_free_surface:
66
- mesh.keep_immersed_part()
67
-
68
- self.radius = radius
69
- self.geometric_center = np.array(center, dtype=float)
70
- FloatingBody.__init__(self, mesh=mesh, name=name)
@@ -1 +0,0 @@
1
- build/