Textbook Derived Type

type, public, extends(Object) :: Textbook

Object storing named derivations


Components

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

True only if user explicitly sets it to true

type(DerivationContainer), private, allocatable, dimension(:) :: derivations
type(StringArray), private, allocatable, dimension(:) :: derivationNames
type(MatDerivationContainer), private, allocatable, dimension(:) :: matDerivations
type(StringArray), private, allocatable, dimension(:) :: matDerivationNames

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject

  • interface

    private pure module function isDefinedObject(this) result(defined)

    Getter for userDefined

    Arguments

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

    Return Value logical

procedure, public :: makeDefined => makeDefinedObject

  • interface

    private pure module subroutine makeDefinedObject(this)

    Set userDefined to .true.

    Arguments

    Type IntentOptional Attributes Name
    class(Object), intent(inout) :: this

procedure, public :: makeUndefined => makeUndefinedObject

  • interface

    private pure module subroutine makeUndefinedObject(this)

    Set userDefined to .false.

    Arguments

    Type IntentOptional Attributes Name
    class(Object), intent(inout) :: this

procedure, public :: addDerivation

  • interface

    private pure module subroutine addDerivation(this, deriv, name)

    Add derivation object to textbook

    Arguments

    Type IntentOptional Attributes Name
    class(Textbook), intent(inout) :: this
    class(Derivation), intent(in) :: deriv
    character(len=*), intent(in) :: name

procedure, public :: isDerivationRegistered

  • interface

    private pure module function isDerivationRegistered(this, name) result(reg)

    Check whether derivation with given name is registered in the textbook

    Arguments

    Type IntentOptional Attributes Name
    class(Textbook), intent(in) :: this
    character(len=*), intent(in) :: name

    Return Value logical

procedure, public :: copyDerivation

  • interface

    private pure module subroutine copyDerivation(this, name, deriv)

    Copy derivation with given name into passed deriv object, overwriting any existing derivation

    Arguments

    Type IntentOptional Attributes Name
    class(Textbook), intent(in) :: this
    character(len=*), intent(in) :: name
    class(Derivation), intent(inout), allocatable :: deriv

procedure, public :: addMatDerivation

  • interface

    private pure module subroutine addMatDerivation(this, deriv, name)

    Add matrix derivation object to textbook

    Arguments

    Type IntentOptional Attributes Name
    class(Textbook), intent(inout) :: this
    class(MatDerivation), intent(in) :: deriv
    character(len=*), intent(in) :: name

procedure, public :: isMatDerivationRegistered

  • interface

    private pure module function isMatDerivationRegistered(this, name) result(reg)

    Check whether matrix derivation with given name is registered in the textbook

    Arguments

    Type IntentOptional Attributes Name
    class(Textbook), intent(in) :: this
    character(len=*), intent(in) :: name

    Return Value logical

procedure, public :: copyMatDerivation

  • interface

    private pure module subroutine copyMatDerivation(this, name, deriv)

    Copy matrix derivation with given name into passed deriv object, overwriting any existing derivation

    Arguments

    Type IntentOptional Attributes Name
    class(Textbook), intent(in) :: this
    character(len=*), intent(in) :: name
    class(MatDerivation), intent(inout), allocatable :: deriv

procedure, public :: init => initTextbook

  • interface

    private pure module subroutine initTextbook(this)

    Textbook object initialization

    Arguments

    Type IntentOptional Attributes Name
    class(Textbook), intent(inout) :: this