CalculationRule Derived Type

type, public, extends(Object) :: CalculationRule

Object used to calculate derived variables using a derivation object and set of required variable names


Components

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

True only if user explicitly sets it to true

class(Derivation), public, allocatable :: derivationMethod

Derivation object used to calculate derived variables

type(StringArray), public, allocatable, dimension(:) :: requiredVarNames

Names of variables required for the derivation


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 :: init => initCalculationRule

  • interface

    private pure module subroutine initCalculationRule(this, deriv, names)

    Calculation rule object initialization routine

    Arguments

    Type IntentOptional Attributes Name
    class(CalculationRule), intent(inout) :: this
    class(Derivation), intent(in), optional :: deriv

    Derivation component

    type(StringArray), intent(in), optional, dimension(:) :: names

    Required variable names