stencil_generator1d_class Module

Stencil generator for fixed stencils that exist only in one dimension


Used by


Interfaces

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

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

Derived Types

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
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: calculate
procedure, public :: init => initGenerator
procedure, public :: calculateInPlace => calcVals