Skip to content

Commit 5b270f6

Browse files
committedNov 22, 2020
normalization in energy() docstring
1 parent b165e17 commit 5b270f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/barotropicqg.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ set_U!(prob, U::Float64) = set_U!(prob.sol, prob.vars, prob.params, prob.grid, U
331331
energy(prob)
332332
energy(sol, grid)
333333
334-
Returns the domain-averaged kinetic energy of solution `sol`: ∫ ½ (u²+v²) dxdy / (Lx Ly) = ∑ ½ k² |ψ̂|².
334+
Returns the domain-averaged kinetic energy of solution `sol`: ∫ ½ (u²+v²) dxdy / (Lx Ly) = ∑ ½ k² |ψ̂|² / (Lx Ly).
335335
"""
336336
energy(sol, grid) = parsevalsum2(sqrt.(grid.Krsq) .* grid.invKrsq .* sol, grid) / (2 * grid.Lx * grid.Ly)
337337
energy(prob) = energy(prob.sol, prob.grid)

1 commit comments

Comments
 (1)

liasiegelman commented on Nov 23, 2020

@liasiegelman
Collaborator

@navidcy looks good to me (is there a more formal way to review this PR?)

Please sign in to comment.