Interpolates a given set of tables (x, y(x)) into a smooth curve. Assumes that x_table is an array with a monotone increase in values. Interpolation is done using n_interp points, in general a second order polynomial approximation is used except near sharp jumps.
Throws an error if x_table is not monotone.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n_interp | number of points used for interpolation |
||
real(kind=dp), | intent(in) | :: | x_table(:) | x-values in the table |
||
real(kind=dp), | intent(in) | :: | y_table(:) | y-values in the table |
||
real(kind=dp), | intent(out) | :: | x_interp(n_interp) | interpolated x-values |
||
real(kind=dp), | intent(out) | :: | y_interp(n_interp) | interpolated y-values |