lin_interp1d_procedures Submodule

Contains module procedures associated with the 1d linear interpolation class


Uses


Module Functions

pure module function getFirstDataIndices(this) result(inds)

Getter for firstDataIndex

Arguments

Type IntentOptional Attributes Name
class(Interpolation1D), intent(in) :: this

Return Value integer(kind=ik), allocatable, dimension(:)

pure module function getInterpWeights(this) result(weights)

Getter for interpWeights

Arguments

Type IntentOptional Attributes Name
class(Interpolation1D), intent(in) :: this

Return Value real(kind=rk), allocatable, dimension(:)

pure module function getInterpPoints(this) result(points)

Getter for interpPoints

Arguments

Type IntentOptional Attributes Name
class(Interpolation1D), intent(in) :: this

Return Value real(kind=rk), allocatable, dimension(:)

pure module function interpolate(this, targetArray) result(interpVals)

Interpolate input array defined on the same grid as the Interpolation1D object at points

Arguments

Type IntentOptional Attributes Name
class(Interpolation1D), intent(in) :: this
real(kind=rk), intent(in), dimension(:) :: targetArray

Return Value real(kind=rk), allocatable, dimension(:)


Module Subroutines

pure module subroutine initInterpolation(this, gridPoints, interpolationPoints)

Initialization routine for 1D Interpolation1D object

Arguments

Type IntentOptional Attributes Name
class(Interpolation1D), intent(inout) :: this
real(kind=rk), intent(in), dimension(:) :: gridPoints
real(kind=rk), intent(in), optional, dimension(:) :: interpolationPoints

pure module subroutine updateInterpolationPoints(this, interpolationPoints)

Updates the interpolation points and weightss

Arguments

Type IntentOptional Attributes Name
class(Interpolation1D), intent(inout) :: this
real(kind=rk), intent(in), dimension(:) :: interpolationPoints