bspline_class Derived Type

type, public :: bspline_class

Base class for the b-spline types


Inherited by

type~~bspline_class~~InheritedByGraph type~bspline_class bspline_class type~bspline_1d bspline_1d type~bspline_1d->type~bspline_class type~bspline_2d bspline_2d type~bspline_2d->type~bspline_class type~bspline_3d bspline_3d type~bspline_3d->type~bspline_class type~bspline_4d bspline_4d type~bspline_4d->type~bspline_class type~bspline_5d bspline_5d type~bspline_5d->type~bspline_class type~bspline_6d bspline_6d type~bspline_6d->type~bspline_class

Components

Type Visibility Attributes Name Initial
integer(kind=ip), private :: inbvx = 1_ip

internal variable used by dbvalu for efficient processing

integer(kind=ip), private :: iflag = 1_ip

saved iflag from the list routine call.

logical, private :: initialized = .false.

true if the class is initialized and ready to use

logical, private :: extrap = .false.

if true, then extrapolation is allowed during evaluation


Type-Bound Procedures

procedure, private, non_overridable :: destroy_base

destructor for the abstract type

  • private pure subroutine destroy_base(me)

    Destructor for contents of the base bspline_class class. (this routine is called by the extended classes).

    Arguments

    Type IntentOptional Attributes Name
    class(bspline_class), intent(inout) :: me

procedure, private, non_overridable :: set_extrap_flag

internal routine to set the extrap flag

  • private pure subroutine set_extrap_flag(me, extrap)

    Sets the extrap flag in the class.

    Arguments

    Type IntentOptional Attributes Name
    class(bspline_class), intent(inout) :: me
    logical, intent(in), optional :: extrap

    if not present, then False is used

procedure(destroy_func), public, deferred :: destroy

destructor

  • pure subroutine destroy_func(me) Prototype

    interface for bspline destructor routines

    Arguments

    Type IntentOptional Attributes Name
    class(bspline_class), intent(inout) :: me

procedure(size_func), public, deferred :: size_of

size of the structure in bits

  • pure function size_func(me) result(s) Prototype

    interface for size routines

    Arguments

    Type IntentOptional Attributes Name
    class(bspline_class), intent(in) :: me

    Return Value integer(kind=ip)

    size of the structure in bits

procedure, public, non_overridable :: status_ok

returns true if the last iflag status code was =0.

  • private elemental function status_ok(me) result(ok)

    This routines returns true if the iflag code from the last routine called was =0. Maybe of the routines have output iflag variables, so they can be checked explicitly, or this routine can be used.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(bspline_class), intent(in) :: me

    Return Value logical

procedure, public, non_overridable :: status_message => get_bspline_status_message

retrieve the last status message

  • private pure function get_bspline_status_message(me, iflag) result(msg)

    Get the status message from a bspline_class routine call.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(bspline_class), intent(in) :: me
    integer(kind=ip), intent(in), optional :: iflag

    the corresponding status code

    Return Value character(len=:), allocatable

    status message associated with the flag

procedure, public, non_overridable :: clear_flag => clear_bspline_flag

to reset the iflag saved in the class.

  • private elemental subroutine clear_bspline_flag(me)

    This sets the iflag variable in the class to 0 (which indicates that everything is OK). It can be used after an error is encountered.

    Arguments

    Type IntentOptional Attributes Name
    class(bspline_class), intent(inout) :: me

Source Code

    type,public,abstract :: bspline_class
        !! Base class for the b-spline types
        private
        integer(ip) :: inbvx = 1_ip  !! internal variable used by [[dbvalu]] for efficient processing
        integer(ip) :: iflag = 1_ip  !! saved `iflag` from the list routine call.
        logical :: initialized = .false. !! true if the class is initialized and ready to use
        logical :: extrap = .false. !! if true, then extrapolation is allowed during evaluation
    contains
        private
        procedure,non_overridable :: destroy_base  !! destructor for the abstract type
        procedure,non_overridable :: set_extrap_flag !! internal routine to set the `extrap` flag
        procedure(destroy_func),deferred,public :: destroy  !! destructor
        procedure(size_func),deferred,public :: size_of !! size of the structure in bits
        procedure,public,non_overridable :: status_ok  !! returns true if the last `iflag` status code was `=0`.
        procedure,public,non_overridable :: status_message => get_bspline_status_message  !! retrieve the last
                                                                                          !! status message
        procedure,public,non_overridable :: clear_flag => clear_bspline_flag  !! to reset the `iflag` saved in the class.
    end type bspline_class