StencilGenerator1D Derived Type

type, public, extends(JaggedArrayGenerator) :: StencilGenerator1D

JaggedArrayGenerator for calculating a fixed stencil based on fixed column-wise value vectors and a Stencil1D object. Each column value vector is associated with its entry in the Stencil1D object.


Components

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

True only if user explicitly sets it to true

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

Column vectors corresponding to each of the stencil points. They must all be the same length corresponding to the global size of the dimension.

logical, private :: periodicDim

True if the dimension is periodic (used by the stencil to determine which columns are present in edge cases)

type(IntArray), public, allocatable, dimension(:) :: presentColumns

Jagged integer array with the same shape as the result, containing the corresponding stencil point index used to sample from columnVectors

integer(kind=ik), public, dimension(2) :: coordInterval

Local coordinate interval (bounds inclusive) - Defaults to the entirety of the dimension


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 :: calculate

  • interface

    private module function calculate(this, varCont, mbData, hostModel) result(res)

    Use in place version of stencil calculation to return values

    Arguments

    Type IntentOptional Attributes Name
    class(JaggedArrayGenerator), intent(inout) :: this
    type(VariableContainer), intent(in) :: varCont
    class(ModelboundData), intent(in), optional :: mbData
    class(ModelSurrogate), intent(in), optional :: hostModel

    Return Value type(RealArray), allocatable, dimension(:)

procedure, public :: init => initGenerator

  • interface

    private module subroutine initGenerator(this, stencilObj, columnVecs, periodicDim, coordInterval)

    1D fixed stencil value generator initialization routine

    Arguments

    Type IntentOptional Attributes Name
    class(StencilGenerator1D), intent(inout) :: this
    type(Stencil1D), intent(in) :: stencilObj
    type(RealArray), intent(in), dimension(:) :: columnVecs
    logical, intent(in), optional :: periodicDim
    integer(kind=ik), intent(in), optional, dimension(2) :: coordInterval

procedure, public :: calculateInPlace => calcVals

  • interface

    private module subroutine calcVals(this, varCont, res, mbData, hostModel)

    Calculate fixed 1D stencil values in place (does not depend on varCont,mbData, or hostModel)

    Arguments

    Type IntentOptional Attributes Name
    class(StencilGenerator1D), intent(inout) :: this
    type(VariableContainer), intent(in) :: varCont
    type(RealArray), intent(inout), allocatable, dimension(:) :: res
    class(ModelboundData), intent(in), optional :: mbData
    class(ModelSurrogate), intent(in), optional :: hostModel