evaluate the 2nd 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) |
2nd derivative of a radial profile with respect to rho ~sqrt(magnetic flux).
FUNCTION rProfile_drho2(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 !! 2nd 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^2/dx^2 f(g(x)) = [g'(x)]^2 * f''(g(x))+g''(x) * f'(g(x)) derivative = rho2_derivative(rho,deriv=1)**2*sf%eval_at_rho2(rho2, deriv=2) & + rho2_derivative(rho,deriv=2)* sf%eval_at_rho2(rho2, deriv=1) END FUNCTION rProfile_drho2