Skip to content

Commit

Permalink
add comment for energy_total
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickersing committed Mar 28, 2024
1 parent aad0a4f commit d4cfb82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/equations/shallow_water_multilayer_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,9 @@ end
energy_total(u, equations)
end

# Calculate total energy for a conservative state `u`
# Calculate total energy for a conservative state `u`.
# The total energy is composed of the kinetic energy, the hydrostatic pressure and the potential
# energy from the bottom topography and the layer interfaces.
@inline function Trixi.energy_total(u, equations::ShallowWaterMultiLayerEquations1D)
h = waterheight(u, equations)
v = velocity(u, equations)
Expand Down

0 comments on commit d4cfb82

Please sign in to comment.