Skip to content

Commit

Permalink
extend docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLampert committed Jan 9, 2025
1 parent 040768b commit 9a62605
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/dispersion_relation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
LinearDispersionRelation(ref_height)
A struct representing a linear dispersion relation ``\omega(k)`` of an equation. The reference
water height `h0` is given by `ref_height`.
water height `h0` is given by `ref_height`. A dispersion relation can be called as
`disp_rel(equations, k)` to compute the wave frequency ``\omega(k)`` for a given wavenumber `k`
and a set of equations.
See also [`wave_speed`](@ref) for computing the wave speed ``c = \omega(k) / k``.
"""
struct LinearDispersionRelation{RealT <: Real}
ref_height::RealT
Expand All @@ -22,6 +26,8 @@ of the `equations`.
The wave speed is given by ``c = \omega(k) / k``. If `normalize` is `true`, the wave speed is normalized
by the shallow water wave speed ``\sqrt{g h0}``, where `g` is the gravity constant and `h0` is the reference
water height of the dispersion relation.
See also [`LinearDispersionRelation`](@ref).
"""
function wave_speed(disp_rel::LinearDispersionRelation, equations, k;
normalize = false)
Expand Down

0 comments on commit 9a62605

Please sign in to comment.