stencil1d_procedures Submodule

Contains module procedures associated with the stencil1d class


Uses


Module Functions

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

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

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)

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

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


Module Subroutines

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