cubicSpline_t Derived Type

type, public, extends(spline_t) :: cubicSpline_t

type~~cubicspline_t~~InheritsGraph type~cubicspline_t cubicSpline_t type~spline_t spline_t type~spline_t->type~cubicspline_t
Help


Cubic spline type

Uses hermite interpolation between datapoints with derivaties computed at construction time.



Components

TypeVisibility AttributesNameInitial
real(kind=wp), public, dimension(:), allocatable:: t0

Parameterization variable data

real(kind=wp), public, dimension(:,:), allocatable:: x0

Datapoints for spline

real(kind=wp), public, dimension(:,:), allocatable:: d0

Derivatives at datapoints \(\vec{x}_0\)

character(len=:), public, allocatable:: method

Method used to compute derivatives

real(kind=wp), public :: c

Tension parameter for cardinal splines


Constructor

public interface cubicSpline_t

Constructor for cubicSpline_t

  • private function newCubicSpline(t0, x0, method, c) result(self)

    Constructor for cubicSpline_t

    Arguments

    Type IntentOptional AttributesName
    real(kind=wp), intent(in), dimension(:):: t0

    Parameterization data \(t_0\)

    real(kind=wp), intent(in), dimension(:,:):: x0

    Datapoints for spline \(\vec{x}_0\)

    character(len=*), intent(in), optional :: method

    Derivative calculation method

    Valid methods are the following:
    * 'finiteDifference'
    * 'catmullRom'
    * 'cardinal'
    * 'conventional'

    real(kind=wp), intent(in), optional :: c

    Tension parameter for cardinal splines

    Not used by other spline types

    Return Value type(cubicSpline_t)

    New spline


Type-Bound Procedures

procedure, public :: x => x_cubicSpline

  • private function x_cubicSpline(self, t) result(o)

    Evalute the cubic spline at point \(t\)

    Arguments

    Type IntentOptional AttributesName
    class(cubicSpline_t), intent(in) :: self

    Spline of curve

    real(kind=wp), intent(in) :: t

    Parameterization point

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

    Spline location \(\vec{x}\)