libSUFR
a LIBrary of Some Useful Fortran Routines
All Classes Namespaces Files Functions Variables Pages
interpolate.f90 File Reference

(libSUFR version 0.7.8, revision 407, hash 01069b8, 2025-03-02)

Procedures to do interpolation (and fitting?) More...

Go to the source code of this file.

Modules

module  sufr_interpolate
 Procedures to do interpolation (and fitting?)
 

Functions/Subroutines

pure real(double) function sufr_interpolate::linear_interpolation (x1, x2, y1, y2, x)
 Do linear interpolation using the data points x1,x2, and y1,y2 to find the value y corresponding to x.
 
pure real function sufr_interpolate::linear_interpolation_sp (x1, x2, y1, y2, x)
 Do linear interpolation using the data points x1,x2, and y1,y2 to find the value y corresponding to x, using single-precision variables.
 
real(double) function sufr_interpolate::linear_interpolate_array (xarr, yarr, xval)
 Do linear interpolation using the data arrays xArr,yArr to find the value y corresponding to x.
 
pure subroutine sufr_interpolate::perfect_parabolic_fit (x1, x2, x3, y1, y2, y3, a, b, c)
 Fit a parabola perfectly to three sets of data points x1,y1, x2,y2 and x3,y3.
 
pure real(double) function sufr_interpolate::parabola (x, a, b, c)
 Compute a parabola a*x^2 + b*x + c.
 
pure integer function sufr_interpolate::locate_value_in_array (xval, xarray)
 Locate the index in a monotonic array, such that a given value lies between array(index) and array(index+1). 0 or nArr+1 is returned if the value lies outside the array.
 

Detailed Description

Procedures to do interpolation (and fitting?)

Definition in file interpolate.f90.