evaluate the 3rd derivative of a radial profile with respect to rho ~sqrt(magnetic flux).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_rProfile) | :: | sf |
self |
|||
| real(kind=wp), | intent(in) | :: | rho |
rho position rho ~sqrt(magnetic flux) |
3rd derivative of a radial profile with respect to rho ~sqrt(magnetic flux)
FUNCTION rProfile_drho3(sf, rho) RESULT(derivative) ! INPUT VARIABLES -------------------------! CLASS(c_rProfile) :: sf !! self REAL(wp), INTENT(IN) :: rho !! rho position rho ~sqrt(magnetic flux) ! OUTPUT VARIABLES -------------------------! REAL(wp) :: derivative !! 3rd derivative of a radial profile with respect to rho ~sqrt(magnetic flux) ! LOCAL VARIABLES -------------------------! REAL(wp) :: rho2 ! CODE --------------------------------------------------------------------------------------------------------------------------! rho2 = rho2_derivative(rho,deriv=0) ! d^3/dx^3 f(g(x)) = 3g'(x) * f''(g(x)) * g''(x) + [g'(x)]^3*f'''(g(x)) + f'(x) * g'''(x) derivative = 3*rho2_derivative(rho,deriv=1)* sf%eval_at_rho2(rho2, deriv=2)*rho2_derivative(rho,deriv=2) & + rho2_derivative(rho,deriv=1)**3*sf%eval_at_rho2(rho2, deriv=3) & + rho2_derivative(rho,deriv=3)* sf%eval_at_rho2(rho2, deriv=1) END FUNCTION rProfile_drho3