stencil_class Module

Houses stencil class which provides stencil-based coordinate mapping for matrix terms


Used by


Interfaces

interface

  • private pure module function mapCoords(this, gridObj, inputArray) result(output)

    Stencil coordinate mapping routine

    Arguments

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

    Grid used to construct the mapping

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

    Input array of coordinates (size 1 - [x], or size 3 [x,h,v])

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

interface

  • private pure module subroutine initStencil(this, xStencil, vStencil, hStencil, mapToDist, xPeriodic, vStencilFixed)

    Stencil object initialization routine

    Arguments

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

    Stencil in x-direction

    integer(kind=ik), intent(in), optional, dimension(:) :: vStencil

    Stencil in v-direction

    integer(kind=ik), intent(in), optional, dimension(:) :: hStencil

    l harmonic stencil

    logical, intent(in), optional :: mapToDist

    Set to true if stencil maps to harmonic/velocity space

    logical, intent(in), optional :: xPeriodic

    Set to true if x-grid is periodic

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

    Optional fixed vStencil


Derived Types

type, public, extends(Object) ::  Stencil

Stencil object for construction of matrix patterns by mapping row coordinates to sets of column coordinates

Components

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

True only if user explicitly sets it to true

type(Stencil1D), private :: xStencil

Stencil in x-direction

type(Stencil1D), private, allocatable :: vStencil

Stencil in v-direction (used as absolute coordinates if mapping from just x-coordinate)

type(Stencil1D), private, allocatable :: hStencil

Stencil in total harmonics (used as absolute coordinates if mapping from just x-coordinate)

logical, private :: xPeriodic

True if the x grid is periodic

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: mapCoords
procedure, public :: init => initStencil