Calculate a flux from the derivative data and the equation coefficient.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=wp), | intent(in), | dimension(2) | :: | u | The input state vector . |
|
real(kind=wp), | intent(in) | :: | C11 | The coefficient of the second radial derivative term, . |
||
real(kind=wp), | intent(in) | :: | C02 | The coefficient of the mixed second derivative term, . |
On return the flux.
function flux ( u, C11, C02 )
!! Calculate a flux from the derivative data and the equation coefficient.
use kinds
implicit none
complex(wp), dimension(2), intent(in) :: u
!! The input state vector \((\Upsilon,\Pi)\).
real(wp), intent(in) :: C11
!! The coefficient of the second radial derivative term, \(c_{rr}\).
real(wp), intent(in) :: C02
!! The coefficient of the mixed second derivative term, \(c_{tr}\).
complex(wp), dimension(2) :: flux
!! On return the flux.
flux(1) = -C11 * u(1) - C02 * u(2)
flux(2) = -u(1)
return
end function flux