stencil1d_class Module

Houses 1D stencil component class for matrix terms


Used by


Interfaces

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(:)

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(:)

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)

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

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(:)

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


Derived Types

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
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: getMask
procedure, public :: getFixedStencil
procedure, public :: getStencilDims
procedure, public :: mapCoords
procedure, public :: isStencilFixed
procedure, public :: init => initStencil