FluidStencilGen1D Derived Type

type, public, extends(JaggedArrayGenerator) :: FluidStencilGen1D

JaggedArrayGenerator for extending the fixed stencil capabilities of StencilGenerator1D to allow for an additional multiplicative dependence on fluid variables in the passed variable container or modelbound data. Allows associating different variables to each column.


Components

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

True only if user explicitly sets it to true

type(StencilGenerator1D), private :: fixedStencilGen

Fixed component generator

type(StringArray), private, allocatable, dimension(:) :: varContColVarNames

Names of variable container variables associated with each of the stencil columns. Max one variable ber column

type(StringArray), private, allocatable, dimension(:) :: mbColVarNames

Names of modelbound variables associated with each of the stencil columns. Max one variable ber column

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

Indices of variable container variables associated with each of the stencil columns. Max one variable ber column

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

Fixed stencil values calculated using parent StencilGenerator1D

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

Buffer for the variable component of the column vectors


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, varContColVarNames, mbColVarNames, periodicDim, coordInterval)

    1D fluid variable stencil value generator initialization routine

    Arguments

    Type IntentOptional Attributes Name
    class(FluidStencilGen1D), intent(inout) :: this
    type(Stencil1D), intent(in) :: stencilObj
    type(RealArray), intent(in), dimension(:) :: columnVecs
    type(StringArray), intent(in), dimension(:) :: varContColVarNames
    type(StringArray), intent(in), dimension(:) :: mbColVarNames
    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 variable fluid 1D stencil values in place (does not depend on hostModel)

    Arguments

    Type IntentOptional Attributes Name
    class(FluidStencilGen1D), 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