calculation_tree_derivation_class Module

Houses derivation class with an attached calculation tree object



Interfaces

interface

  • private module function calculateTree(this, inputArray, indices) result(output)

    Arguments

    Type IntentOptional Attributes Name
    class(CalculationTreeDerivation), intent(inout) :: this
    type(RealArray), intent(in), dimension(:) :: inputArray
    integer(kind=ik), intent(in), dimension(:) :: indices

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

interface

  • private module subroutine initCalculationTreeDeriv(this, flattenedTree)

    Initialize calculation tree derivation using flattened tree

    Arguments

    Type IntentOptional Attributes Name
    class(CalculationTreeDerivation), intent(inout) :: this
    type(FlatTree), intent(in) :: flattenedTree

Derived Types

type, public, extends(Derivation) ::  CalculationTreeDerivation

Derivation object that has a calculation tree component, used to evaluate the derivation result independently of the passed indices. The derivation is constructed using a FlatTree, which needs to be unpacked before the derivation can be used. Note: This derivation should only be used if the passed object is the global VariableContainers variable array.

Components

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

True only if user explicitly sets it to true

type(CalculationTree), private, allocatable :: tree
type(FlatTree), private :: flattenedTree
integer(kind=ik), private, pointer :: testPointer => null()

Used to check whether the tree needs to be reconstructed. Should become unassociated if this derivation object goes through a copy/allocation which is pointer unsafe.

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: init => initCalculationTreeDeriv
procedure, public :: calculate => calculateTree