capytaine.green_functions.hams module

class capytaine.green_functions.hams.FinGreen3D(*, nb_dispersion_roots=200)[source]

Bases: AbstractGreenFunction

Wrapper for the Fortran implementation of the finite depth Green function of [Liu et al.].

Uses the same implementation as Delhommeau() for the Rankine and reflected Rankine terms.

property all_tabulation_parameters

An alias meant to pass to the Fortran functions all the parameters controlling the tabulation in a single item.

compute_dispersion_relation_roots(nk, wavenumber, depth)[source]
dummy_param = -999
evaluate(mesh1, mesh2, *, free_surface=0.0, water_depth=inf, wavenumber, adjoint_double_layer=True, early_dot_product=True, diagonal_term_in_double_layer=True)[source]

Assemble the influence matrices between mesh1 and mesh2.

Parameters:
  • mesh1 (MeshLike or array of shape (n, 3)) – mesh of the receiving body (where the potential is measured), or an array of points (only supported if only S is wanted or early_dot_product is False).

  • mesh2 (MeshLike) – mesh of the source body (over which the source distribution is integrated)

  • free_surface (float) – position of the free surface

  • water_depth (float) – constant depth of water

  • wavenumber (float) – wavenumber

  • adjoint_double_layer (bool, optional) – compute double layer for direct method (D) or adjoint double layer for indirect method (K) matrices (default: True)

  • early_dot_product (bool, optional) – if True, K is the matrix of ∫∇G·n, if False it is the gradient ∫∇G (default: True)

  • diagonal_term_in_double_layer (bool, optional) – if True, add the I/2 term in the double layer operator (default: True)

Returns:

the matrices S and K, with shapes (n, m) for S and (n, m) for K if early_dot_product is True or (3, n, m) otherwise, where n is the number of receiving points of mesh1 and m the number of faces of mesh2.

Return type:

tuple of arrays

finite_depth_method_index = array(-1, dtype=int32)
floating_point_precision: str = 'float64'
fortran_core = <module 'capytaine.green_functions.Delhommeau_float64' from '/home/runner/work/_temp/setup-uv-cache/archive-v0/0Rudd_diFPWAFKR-/lib/python3.12/site-packages/capytaine/green_functions/Delhommeau_float64.cpython-312-x86_64-linux-gnu.so'>
gf_singularities_index = array(1, dtype=int32)
prony_decomposition = array([[0.]])
tabulated_integrals = array([3.6382351e-316])
tabulated_r_range = array([3.87653466e-316])
tabulated_z_range = array([9.408e-320])
tabulation_grid_shape_index = -999
tabulation_nb_integration_points = 1
class capytaine.green_functions.hams.HAMS_GF[source]

Bases: AbstractGreenFunction

evaluate(mesh1, mesh2, *, water_depth=inf, **kwargs)[source]

Assemble the influence matrices between mesh1 and mesh2.

Parameters:
  • mesh1 (MeshLike or array of shape (n, 3)) – mesh of the receiving body (where the potential is measured), or an array of points (only supported if only S is wanted or early_dot_product is False).

  • mesh2 (MeshLike) – mesh of the source body (over which the source distribution is integrated)

  • free_surface (float) – position of the free surface

  • water_depth (float) – constant depth of water

  • wavenumber (float) – wavenumber

  • adjoint_double_layer (bool, optional) – compute double layer for direct method (D) or adjoint double layer for indirect method (K) matrices (default: True)

  • early_dot_product (bool, optional) – if True, K is the matrix of ∫∇G·n, if False it is the gradient ∫∇G (default: True)

  • diagonal_term_in_double_layer (bool, optional) – if True, add the I/2 term in the double layer operator (default: True)

Returns:

the matrices S and K, with shapes (n, m) for S and (n, m) for K if early_dot_product is True or (3, n, m) otherwise, where n is the number of receiving points of mesh1 and m the number of faces of mesh2.

Return type:

tuple of arrays

exportable_settings: dict = {'green_function': 'HAMS_GF'}
floating_point_precision: str = 'float64'
class capytaine.green_functions.hams.LiangWuNoblesseGF[source]

Bases: AbstractGreenFunction

Wrapper for the Fortran implementation of the infinite depth Green function of [Liang, Wu, Noblesse, 2018].

Uses the same implementation as Delhommeau() for the Rankine and reflected Rankine terms.

property all_tabulation_parameters

An alias meant to pass to the Fortran functions all the parameters controlling the tabulation in a single item.

dispersion_relation_roots = array([3.84676424e-316])
dummy_param = -999
evaluate(mesh1, mesh2, *, free_surface=0.0, water_depth=inf, wavenumber, adjoint_double_layer=True, early_dot_product=True, diagonal_term_in_double_layer=True)[source]

Assemble the influence matrices between mesh1 and mesh2.

Parameters:
  • mesh1 (MeshLike or array of shape (n, 3)) – mesh of the receiving body (where the potential is measured), or an array of points (only supported if only S is wanted or early_dot_product is False).

  • mesh2 (MeshLike) – mesh of the source body (over which the source distribution is integrated)

  • free_surface (float) – position of the free surface

  • water_depth (float) – constant depth of water

  • wavenumber (float) – wavenumber

  • adjoint_double_layer (bool, optional) – compute double layer for direct method (D) or adjoint double layer for indirect method (K) matrices (default: True)

  • early_dot_product (bool, optional) – if True, K is the matrix of ∫∇G·n, if False it is the gradient ∫∇G (default: True)

  • diagonal_term_in_double_layer (bool, optional) – if True, add the I/2 term in the double layer operator (default: True)

Returns:

the matrices S and K, with shapes (n, m) for S and (n, m) for K if early_dot_product is True or (3, n, m) otherwise, where n is the number of receiving points of mesh1 and m the number of faces of mesh2.

Return type:

tuple of arrays

exportable_settings: dict = {'green_function': 'LiangWuNoblesseGF'}
finite_depth_method_index = -9999
floating_point_precision: str = 'float64'
fortran_core = <module 'capytaine.green_functions.Delhommeau_float64' from '/home/runner/work/_temp/setup-uv-cache/archive-v0/0Rudd_diFPWAFKR-/lib/python3.12/site-packages/capytaine/green_functions/Delhommeau_float64.cpython-312-x86_64-linux-gnu.so'>
prony_decomposition = array([[0.]])
tabulated_integrals = array([3.82631476e-316])
tabulated_r_range = array([3.84675974e-316])
tabulated_z_range = array([6.93009561e-310])
tabulation_grid_shape_index = array(-1, dtype=int32)
tabulation_nb_integration_points = 1