bessel_jn_derivative Function

private function bessel_jn_derivative(n, x) result(der)

Compute derivative for Bessel function of first kind of order n.

Arguments

Type IntentOptional Attributes Name
integer :: n

The order of the function.

real(kind=rk), intent(in) :: x

The evaluation point.

Return Value real(kind=rk)

The function value.


Called by

proc~~bessel_jn_derivative~~CalledByGraph proc~bessel_jn_derivative bessel_jn_derivative proc~tem_eval_miescatter_magnangular tem_eval_miescatter_magnangular proc~tem_eval_miescatter_magnangular->proc~bessel_jn_derivative proc~tem_init_data tem_init_data proc~tem_init_data->proc~bessel_jn_derivative proc~tem_eval_miescatter_magnx tem_eval_miescatter_magnx proc~tem_eval_miescatter_magnx->proc~tem_eval_miescatter_magnangular proc~tem_eval_miescatter_magny tem_eval_miescatter_magny proc~tem_eval_miescatter_magny->proc~tem_eval_miescatter_magnangular proc~tem_load_miescatter tem_load_miescatter proc~tem_load_miescatter->proc~tem_init_data interface~tem_load_miescatter_displacementfieldz tem_load_miescatter_displacementfieldz interface~tem_load_miescatter_displacementfieldz->proc~tem_load_miescatter interface~tem_load_miescatter_magneticfieldx tem_load_miescatter_magneticfieldx interface~tem_load_miescatter_magneticfieldx->proc~tem_load_miescatter interface~tem_load_miescatter_magneticfieldy tem_load_miescatter_magneticfieldy interface~tem_load_miescatter_magneticfieldy->proc~tem_load_miescatter proc~tem_spacetime_for_coord tem_spacetime_for_coord proc~tem_spacetime_for_coord->proc~tem_eval_miescatter_magnx proc~tem_spacetime_for_coord->proc~tem_eval_miescatter_magny proc~tem_spatial_for_coord tem_spatial_for_coord proc~tem_spatial_for_coord->proc~tem_eval_miescatter_magnx proc~tem_spatial_for_coord->proc~tem_eval_miescatter_magny interface~tem_spacetime_for tem_spacetime_for interface~tem_spacetime_for->proc~tem_spacetime_for_coord interface~tem_spatial_for tem_spatial_for interface~tem_spatial_for->proc~tem_spatial_for_coord proc~load_spacetime_predefined load_spacetime_predefined proc~load_spacetime_predefined->interface~tem_load_miescatter_displacementfieldz proc~load_spacetime_predefined->interface~tem_load_miescatter_magneticfieldx proc~load_spacetime_predefined->interface~tem_load_miescatter_magneticfieldy proc~load_spatial_predefined load_spatial_predefined proc~load_spatial_predefined->interface~tem_load_miescatter_displacementfieldz proc~load_spatial_predefined->interface~tem_load_miescatter_magneticfieldx proc~load_spatial_predefined->interface~tem_load_miescatter_magneticfieldy proc~tem_spacetime_for_stcoord tem_spacetime_for_stcoord proc~tem_spacetime_for_stcoord->proc~tem_spacetime_for_coord proc~tem_spacetime_scalar_for_index tem_spacetime_scalar_for_index proc~tem_spacetime_scalar_for_index->proc~tem_spacetime_for_coord proc~tem_spatial_scalar_for_index tem_spatial_scalar_for_index proc~tem_spatial_scalar_for_index->proc~tem_spatial_for_coord

Source Code

  function bessel_jn_derivative(n,x) result(der)
    ! --------------------------------------------------------------------------
    !> The order of the function.
    integer :: n
    !> The evaluation point.
    real(kind=rk), intent(in) :: x
    !> The function value.
    real(kind=rk) :: der
    ! --------------------------------------------------------------------------
    ! --------------------------------------------------------------------------

    ! Calculate the derivative by recursive relation
    der = 0.5_rk*(bessel_jn(n-1,x)-bessel_jn(n+1,x))

  end function bessel_jn_derivative