range_filter_derivation_class Module

Houses composite derivation class where a derivations result is zeroed out wherever a set of passed variables is not within their defined ranges


Used by


Interfaces

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(:)

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

Derived Types

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
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: init => initRangeFilterDeriv
procedure, public :: calculate => calculateRangeFilter