indexing_procedures Submodule

Contains module procedures associated with the Indexing class


Uses


Module Functions

pure module function getProcDoF(this) result(procDoF)

Getter for procDoFs

Arguments

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

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

pure module function getNumH(this) result(numH)

Getter for numH

Arguments

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

Return Value integer(kind=ik)

pure module function getNumX(this) result(numX)

Getter for numX

Arguments

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

Return Value integer(kind=ik)

pure module function getNumV(this) result(numV)

Getter for numV

Arguments

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

Return Value integer(kind=ik)

pure module function findIndex(this, name, xInd, hInd, vInd, local) result(ind)

Return index of degree of freedom associated with variable with given name and with coordinates given by xInd,hInd,vInd If local is true return index in the local implicit vector

Arguments

Type IntentOptional Attributes Name
class(Indexing), intent(in) :: this
character(len=*), intent(in) :: name
integer(kind=ik), intent(in) :: xInd
integer(kind=ik), intent(in), optional :: hInd
integer(kind=ik), intent(in), optional :: vInd
logical, intent(in), optional :: local

Return Value integer(kind=ik)

pure module function findDistIndex(this, xInd, hInd, vInd, allH, locXInd) result(ind)

Return linear index of distribution corresponding to xInd,hInd,vInd - if allH is true return indexing assuming all harmonics are indexed locally. If present locXInd is used to identify the processor

Arguments

Type IntentOptional Attributes Name
class(Indexing), intent(in) :: this
integer(kind=ik), intent(in) :: xInd
integer(kind=ik), intent(in) :: hInd
integer(kind=ik), intent(in) :: vInd
logical, intent(in) :: allH
integer(kind=ik), intent(in), optional :: locXInd

Return Value integer(kind=ik)

pure module function mapToGlobalIndices(this, name, inputIndices) result(ind)

Returns list of global indices associated with all possible combinations of inputIndices (IntArray of size 1 or 3) and given variable name

Arguments

Type IntentOptional Attributes Name
class(Indexing), intent(in) :: this
character(len=*), intent(in) :: name
type(IntArray), intent(in), dimension(:) :: inputIndices

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

pure module function findLocalXIndex(this, xInd, locXInd) result(ind)

Return local non-distribution variable index corresponding to xInd,if present, locXInd is used to identify the processor

Arguments

Type IntentOptional Attributes Name
class(Indexing), intent(in) :: this
integer(kind=ik), intent(in) :: xInd
integer(kind=ik), intent(in), optional :: locXInd

Return Value integer(kind=ik)

pure module function getAllIndicesOfVar(this, varInd, procRank) result(ind)

Returns all local indices corresponding to variable with a given index on given processor, accounting for dual grid variables

Arguments

Type IntentOptional Attributes Name
class(Indexing), intent(in) :: this
integer(kind=ik), intent(in) :: varInd
integer(kind=ik), intent(in) :: procRank

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


Module Subroutines

pure module subroutine initIndexing(this, part, gridData, varList, xHaloWidth)

Indexing object initialization routine

Arguments

Type IntentOptional Attributes Name
class(Indexing), intent(inout) :: this
type(Partition), intent(in) :: part

Partition component of initialized Indexing object

type(Grid), intent(in) :: gridData

Grid object used to initialize Indexing

type(VariableList), intent(in) :: varList

Implicit variable list

integer(kind=ik), intent(in), optional :: xHaloWidth

Width of halo in x-direction - if passed will assume the x-grid is periodic