differentiate Interface

public interface differentiate

Public interface for various differentiation routines.


Module Procedures

public pure function differentiate_array_re(x, y) result(r)

Calculates the numerical derivative of an array y wrt. x using central differences at the interior points and forward/backward differences at the exterior points. All three approaches yield two-point approximations of the derivatives, thus the mesh spacing does not have to be uniform.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: x

Variable x

real(kind=wp), intent(in), dimension(size(x)) :: y

Function y(x)

Return Value real(kind=wp), dimension(size(x))

Derivative dy/dx

public pure function differentiate_array_cx(x, y) result(r)

Complex version of differentiate_array_re.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: x

Variable x

complex(kind=wp), intent(in), dimension(size(x)) :: y

Function y(x)

Return Value complex(kind=wp), dimension(size(x))

Derivative dy/dx