RangeFilterDerivation Derived Type

type, public, extends(Derivation) :: RangeFilterDerivation

Composite derivation class containing a single calculation rule, which is overriden with zeros wherever any one in a set of control variables is outside their defined range. If derivIndices isn't passed will pass all indices to the derivation.


Components

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

True only if user explicitly sets it to true

class(Derivation), private, allocatable :: derivObj

Derivation providing default values

integer(kind=ik), private, allocatable, dimension(:) :: derivIndices

Subset of index vector passed to derivation

integer(kind=ik), private, allocatable, dimension(:) :: controlIndices

Subset of index vector used to determine which elements should be zeroed out

type(RealArray), private, allocatable, dimension(:) :: controlRanges

Array of size 2 vectors representing the lower and upper bound for each control value


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 => initRangeFilterDeriv

  • interface

    private module subroutine initRangeFilterDeriv(this, derivObj, controlIndices, controlRanges, derivIndices)

    Initialize range filter derivation object

    Arguments

    Type IntentOptional Attributes Name
    class(RangeFilterDerivation), intent(inout) :: this
    class(Derivation), intent(in) :: derivObj
    integer(kind=ik), intent(in), dimension(:) :: controlIndices
    type(RealArray), intent(in), dimension(:) :: controlRanges
    integer(kind=ik), intent(in), optional, dimension(:) :: derivIndices

procedure, public :: calculate => calculateRangeFilter

  • interface

    private module function calculateRangeFilter(this, inputArray, indices) result(output)

    Arguments

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

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