Stencil1D Derived Type

type, public, extends(Object) :: Stencil1D

1D stencil component for global stencil construction


Components

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

True only if user explicitly sets it to true

integer(kind=ik), private, allocatable, dimension(:) :: rawStencil
type(IntArray), private, allocatable, dimension(:) :: fixedStencil

Optional fixed vStencil


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

  • interface

    private pure module function getMask(this, coord, dimSize, periodic) result(res)

    Get logical mask for included stencil points for given coordinate and dimension size. If periodic, the stencil dimension is treated as being periodic with periodicity equal to dimSize.

    Arguments

    Type IntentOptional Attributes Name
    class(Stencil1D), intent(in) :: this
    integer(kind=ik), intent(in) :: coord
    integer(kind=ik), intent(in) :: dimSize
    logical, intent(in), optional :: periodic

    Return Value logical, allocatable, dimension(:)

procedure, public :: getFixedStencil

  • interface

    private pure module function getFixedStencil(this) result(fixedStencil)

    Return values of fixed stencil

    Arguments

    Type IntentOptional Attributes Name
    class(Stencil1D), intent(in) :: this

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

procedure, public :: getStencilDims

  • interface

    private pure module function getStencilDims(this) result(dim)

    Returns size of stencil

    Arguments

    Type IntentOptional Attributes Name
    class(Stencil1D), intent(in) :: this

    Return Value integer(kind=ik)

procedure, public :: mapCoords

  • interface

    private pure module function mapCoords(this, inputCoord, dimSize, periodic) result(output)

    Stencil1D coordinate mapping routine

    Arguments

    Type IntentOptional Attributes Name
    class(Stencil1D), intent(in) :: this
    integer(kind=ik), intent(in) :: inputCoord

    Input coordinate value

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

    Size of dimension in which mapping is done

    logical, intent(in), optional :: periodic

    True if dimension is periodic

    Return Value integer(kind=ik), allocatable, dimension(:)

procedure, public :: isStencilFixed

  • interface

    private pure module function isStencilFixed(this) result(stencilIsFixed)

    Check if stencil is fixed

    Arguments

    Type IntentOptional Attributes Name
    class(Stencil1D), intent(in) :: this

    Return Value logical

procedure, public :: init => initStencil

  • interface

    private pure module subroutine initStencil(this, rawStencil, fixedStencil)

    Stencil1D object initialization routine

    Arguments

    Type IntentOptional Attributes Name
    class(Stencil1D), intent(inout) :: this
    integer(kind=ik), intent(in), optional, dimension(:) :: rawStencil

    Optional raw stencil, defaults to [0] - a diagonal stencil.

    type(IntArray), intent(in), optional, dimension(:) :: fixedStencil

    Optional fixed stencil