finite_difference Interface

public interface finite_difference

Module Procedures

private pure function finite_difference_1(dt, x) result(rst)

Estimates the derivative of a data set by means of a naive implementation of a finite difference scheme based upon central differences.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: dt

The time step between data points.

real(kind=real64), intent(in), dimension(:) :: x

An N-element array containing the data whose derivative is to be estimated.

Return Value real(kind=real64), allocatable, dimension(:)

An N-element array containing the derivative estimate.

private pure function finite_difference_2(t, x) result(rst)

Computes an estimate to the derivative of an evenly-sampled data set using total variation regularization.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:) :: t

An N-element array containing the time points at which x was sampled.

real(kind=real64), intent(in), dimension(:) :: x

An N-element array containing the data whose derivative is to be estimated.

Return Value real(kind=real64), allocatable, dimension(:)

An N-element array containing the derivative estimate.