multiplicative_generator_core_class Module

Core of stencil generators based on tensor products



Interfaces

interface

  • private module subroutine initCore(this, gridObj, partitionObj, procRank, rowCoords, fluidCol, fixedVVals, vValsDependOnX)

    Multiplicative generator core initialization routine

    Arguments

    Type IntentOptional Attributes Name
    class(MultiplicativeGeneratorCore), intent(inout) :: this
    type(Grid), intent(in) :: gridObj

    Grid object used to determine local number of rows

    type(Partition), intent(in) :: partitionObj

    Partition object used to determine local number of rows

    integer(kind=ik), intent(in) :: procRank

    Current processor rank

    integer(kind=ik), intent(in), dimension(:,:) :: rowCoords

    Global row coordinate values

    logical, intent(in), optional :: fluidCol

    True if column variable is fluid. Defaults to false.

    real(kind=rk), intent(in), optional, dimension(:) :: fixedVVals

    Fixed velocity stencil values when the row variable is fluid and the column variable is kinetic

    logical, intent(in), optional :: vValsDependOnX

    True if v stencil has spatial dependence. Defaults to false.

interface

  • private module subroutine calcCoreVals(this, res, xVals, hVals, vVals)

    Calculate multiplicative core values. All passed stencil values should be indexed starting at the first evolved point. If there are any gaps in the row values those must also be included for indexing to work.

    Arguments

    Type IntentOptional Attributes Name
    class(MultiplicativeGeneratorCore), intent(inout) :: this
    type(RealArray), intent(inout), allocatable, dimension(:) :: res
    type(RealArray), intent(in), dimension(:) :: xVals

    x stencil values

    type(RealArray), intent(in), optional, dimension(:) :: hVals

    h stencil values

    type(RealArray), intent(in), optional, dimension(:) :: vVals

    v stencil values


Derived Types

type, public, extends(Object) ::  MultiplicativeGeneratorCore

Provides capability of building stencil value objects based on tensor products of individual stencil value array

Components

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

True only if user explicitly sets it to true

integer(kind=ik), public, allocatable, dimension(:,:) :: localRowCoords

Local values of row coordinates, used to access passed values

logical, private :: fluidCol

If true will only use x values

logical, private :: vValsDependOnX

True if the v stencil is expected to have x dependence (assumes to be in a form similar to single harmonic vars)

real(kind=rk), public, allocatable, dimension(:) :: fixedVVals

Fixed velocity stencil values used when the column variable is a distribution and the row variable isn't

integer(kind=ik), private :: expXSize

Expected size of x stencil

integer(kind=ik), private :: expVSize

Expected size of v stencil (when it does not depend on x)

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: init => initCore
procedure, public :: calculateInPlace => calcCoreVals