QUISPL
Utility/Data Access SubroutineUses a spline fitting method to return the interpolated value or 1st/2nd derivative of the interpolated value for a Reference_Spline element.
Use
The function can be called by any user-defined subroutine.
Format
- Fortran Calling Syntax
- CALL QUISPL (XVAL, ZVAL, ID, IORD, ARRAY, ERRFLG)
- C/C++ Calling Syntax
- c_quispl (xval, zval, id, iord, array, errflg)
- Python Calling Syntax
- [array, errflg] = py_quispl (xval, zval, id, iord)
- Compose/MATLAB Calling Syntax
- [array, errflg] = m_quispl (xval, zval, id, iord)
Description
QUISPL is a quintic, spline-based interpolation (5th order) that requires a minimum of six points on a curve. It provides a continuous and smooth curve for the zeroth, first, and second derivative. The smoother a derivative is, the easier it is for the solver to converge. However, a noisy dataset with sudden changes in value can led to oscillatory results.
Attributes
- XVAL
- [double]
- ZVAL
- [double]
- ID
- [integer]
- IORD
- The order of the derivative to be returned by the spline function. Only 0, 1, or 2 are valid entities.
Output
- ARRAY
- [double]
- ERRFLG
- [logical]
Example
The following is a Python-based, user-defined request
element that calls the QUISPL data access
subroutine.
def REQSUB(id, time, par, npar, iflag):
results = [0.0]*8
results[0] = QUISPL(time,0,100,0)
results[1] = QUISPL(time,0,100,1)
results[2] = QUISPL(time,0,100,2)
return results