lin_interp1D_class Module

Houses linear interpolation class


Used by


Interfaces

interface

  • private 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(:)

interface

  • private 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(:)

interface

  • private 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(:)

interface

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

    Interpolate input array defined on the same grid as the interpolation 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(:)

interface

  • private pure module subroutine initInterpolation(this, gridPoints, interpolationPoints)

    Initialization routine for 1D interpolation 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

interface

  • private 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

Derived Types

type, public, extends(Object) ::  Interpolation1D

Linear interpolation object housing information necessary for linearly interpolating 1D data. Will fail assertsion if interpolation points are outside of the grid.

Components

Type Visibility Attributes Name Initial
logical, public :: userDefined = .false.

True only if user explicitly sets it to true

integer(kind=ik), private, allocatable, dimension(:) :: firstDataIndex

Array containing the first interpolation index (the second is 1 above the first)

real(kind=rk), private, allocatable, dimension(:) :: interpWeights

Array containing interpolation weights for each interpolation point. Will be set to -1 if the point is outside the grid.

real(kind=rk), private, allocatable, dimension(:) :: interpPoints

Points at which this interpolation object provides values

real(kind=rk), private, allocatable, dimension(:) :: gridBuffer

Buffer for grid values used when updating interpolation points

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: getFirstDataIndices
procedure, public :: getInterpWeights
procedure, public :: getInterpPoints
procedure, public :: updateInterpolationPoints
procedure, public :: interpolate
procedure, public :: init => initInterpolation