Defines a type meant for performing cubic spline interpolation.
Initializes the interpolation object.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(spline_interpolator), | intent(inout) | :: | this |
The spline_interpolator object. |
||
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
An N-element array containing the x-coordinate data in either monotonically increasing or decreasing order. |
|
| real(kind=real64), | intent(in), | dimension(:) | :: | y |
An N-element array containing the y-coordinate data. |
|
| integer(kind=int32), | intent(in), | optional | :: | ibcbeg |
An optional input that defines the nature of the boundary condition at the beginning of the spline. If no parameter, or an invalid parameter, is specified, the default condition (SPLINE_QUADRATIC_OVER_INTERVAL) is used.
|
|
| real(kind=real64), | intent(in), | optional | :: | ybcbeg |
If needed, the value of the initial point boundary condition. If needed, but not supplied, a default value of zero will be used. |
|
| integer(kind=int32), | intent(in), | optional | :: | ibcend |
An optional input that defines the nature of the boundary condition at the end of the spline. If no parameter, or an invalid parameter, is specified, the default condition (SPLINE_QUADRATIC_OVER_INTERVAL) is used.
|
|
| real(kind=real64), | intent(in), | optional | :: | ybcend |
If needed, the value of the final point boundary condition. If needed, but not supplied, a default value of zero will be used. |
|
| class(errors), | intent(inout), | optional, | target | :: | err |
An error handling object. |
Performs the interpolation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_interpolator), | intent(inout) | :: | this |
The base_interpolator object. |
||
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
An N-element array containing the x values at which to compute the interpolation. |
|
| real(kind=real64), | intent(out), | dimension(:) | :: | yi |
An N-element array containing the interpolated data. |
|
| class(errors), | intent(inout), | optional, | target | :: | err |
An error handling object. |
Interpolates a single value.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(spline_interpolator), | intent(inout) | :: | this |
The spline_interpolator object. |
||
| real(kind=real64), | intent(in) | :: | x |
The value at which to compute the interpolation. |
The interpolated value.