Compute amplitude and phase of the oscillation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrand_oscillation), | intent(in) | :: | self | Advection field. |
Amplitude and phase.
function amplitude_phase(self) result(ap)
!< Compute amplitude and phase of the oscillation.
class(integrand_oscillation), intent(in) :: self !< Advection field.
real(R_P) :: ap(1:2) !< Amplitude and phase.
ap(1) = sqrt(self%U(1)**2 + self%U(2)**2)
ap(2) = atan(-self%U(1) / self%U(2))
endfunction amplitude_phase