NuMFor 9f2ab49 (2024-04-08)
Numerical (Modern) Fortran. Library for Simple Numerical computing
csplev Interface Reference

csplev Performs a spline interpolation in a point or in a table More...

Public Member Functions

real(dp) function cspl_interp (xc, csp)
 Interpolates a function using previously calculated representation of splines.
 
real(dp) function, dimension(size(xnew)) cspl_interp_tab (xnew, csp)
 Interpolates a function using previously calculated representation of splines. Works over an array of x values and returns an array of interpolated values
 

Detailed Description

csplev Performs a spline interpolation in a point or in a table

See also
cspl_interp and cspl_interp_tab

Example:

! Create the CubicSpline
! Notice that we know exactly the second derivative
call csplrep(x, y, -y(1), -y(ndim), csp)
! Apply the interpolation to the new grid
ynew = csplev(xnew, csp)

Member Function/Subroutine Documentation

◆ cspl_interp()

real(dp) function cspl_interp ( real(dp), intent(in) xc,
class(cubicspline), intent(in) csp )

Interpolates a function using previously calculated representation of splines.

Note
Before calling this function, must be called csplrep()
Parameters
[in]xcvalue where evaluate the interpolation
[in]cspspline coefficients
Returns
the interpolated value

◆ cspl_interp_tab()

real(dp) function, dimension(size(xnew)) cspl_interp_tab ( real(dp), dimension(:), intent(in) xnew,
class(cubicspline), intent(in) csp )

Interpolates a function using previously calculated representation of splines. Works over an array of x values and returns an array of interpolated values

Parameters
[in]cspspline coefficients
[in]xnewarray of x values
Returns
Interpolated values at xnew positions

The documentation for this interface was generated from the following file: