nearest_interp_2d Derived Type

type, public, extends(linear_interp_2d) :: nearest_interp_2d

Class for 2d nearest neighbor interpolation.


Inherits

type~~nearest_interp_2d~~InheritsGraph type~nearest_interp_2d nearest_interp_2d type~linear_interp_2d linear_interp_2d type~nearest_interp_2d->type~linear_interp_2d type~linear_interp_class linear_interp_class type~linear_interp_2d->type~linear_interp_class

Type-Bound Procedures

procedure, public :: initialize => initialize_2d

  • private pure subroutine initialize_2d(me, x, y, f, istat)

    Constructor for a linear_interp_2d class.

    Arguments

    Type IntentOptional Attributes Name
    class(linear_interp_2d), intent(inout) :: me
    real(kind=wp), intent(in), dimension(:) :: x
    real(kind=wp), intent(in), dimension(:) :: y
    real(kind=wp), intent(in), dimension(:,:) :: f
    integer, intent(out) :: istat

    0 : no problems, 1 : x is not strictly increasing, 2 : y is not strictly increasing, 10 : x is not equal to size(f,1), 20 : y is not equal to size(f,2), 100 : cannot use linear interpolation for only one point.

procedure, public :: destroy => destroy_2d

procedure, public :: evaluate => nearest_2d

  • private pure subroutine nearest_2d(me, x, y, f, istat)

    2D nearest neighbor interpolation routine.

    Arguments

    Type IntentOptional Attributes Name
    class(nearest_interp_2d), intent(inout) :: me
    real(kind=wp), intent(in) :: x
    real(kind=wp), intent(in) :: y
    real(kind=wp), intent(out) :: f

    Nearest

    integer, intent(out), optional :: istat

    0 : no problems, -1 : class has not been initialized

Source Code

    type,extends(linear_interp_2d),public :: nearest_interp_2d
        !! Class for 2d nearest neighbor interpolation.
        contains
        procedure,public :: evaluate => nearest_2d
    end type nearest_interp_2d