integrate Interface

public interface integrate

Public interface for various integration routines.


Module Procedures

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

Calculates the integral of an array y wrt. x using the trapezoid method. The mesh spacing does not necessarily 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)

Integral ∫y(x)·dx

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

Complex version of integrate_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)

Integral ∫y(x)·dx

public function integrate_range_re(x, y, a, b) result(r)

Constructs a piecewise hermitian cubic interpolation of an array y(x) from discrete numerical data, and then integrates the interpolation in the range (a, b). 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)

real(kind=wp), intent(in) :: a

Left endpoint

real(kind=wp), intent(in) :: b

Right endpoint

Return Value real(kind=wp)

Integral ∫y(x)·dx

public function integrate_range_cx(x, y, a, b) result(r)

Complex version of integrate_range_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)

real(kind=wp), intent(in) :: a

Left endpoint

real(kind=wp), intent(in) :: b

Right endpoint

Return Value complex(kind=wp)

Integral ∫y(x)·dx