swiift.lib.dr ============= .. py:module:: swiift.lib.dr .. autoapi-nested-parse:: Dispersion relation solvers =========================== Find the root of dispersion relations. Classes ------- .. autoapisummary:: swiift.lib.dr.FreeSurfaceSolver Module Contents --------------- .. py:class:: FreeSurfaceSolver Solve the dispersion relation of free surface waves. For a know wave frequency and constant water depth, solves for the wavenumbers. .. attribute:: alphas Squared angular frequency scaled by gravity. :type: array_like .. attribute:: depth Water depth, in m. :type: float .. py:method:: from_ocean(ocean, spectrum, gravity) :classmethod: Build a solver from existing objects. :param ocean: :type ocean: Ocean :param spectrum: :type spectrum: DiscreteSpectrum :param gravity: Acceleration of gravity, in m^s-2. :type gravity: float :rtype: FreeSurfaceSolver .. py:method:: compute_wavenumbers(real = True, n = None) Compute wavenumbers. :param real: Whether to look for real or complex wavenumbers. Only the former is implemented at the moment. :type real: bool :param n: Number of complex wavenumbers to solve for. Has no effect at the moment. :type n: int | None :returns: Computed wavenumbers, in m^-1. :rtype: np.ndarray :raises NotImplementedError: If the parameter `real` is set to `False`.