partition_procedures Submodule

Contains module procedures associated with the partition class


Uses


Module Functions

pure module function getMinX(this) result(minX)

Getter for minX

Arguments

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

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

pure module function getMinXAtInd(this, ind) result(minX)

Return minX at index ind

Arguments

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

Return Value integer(kind=ik)

pure module function getMaxX(this) result(maxX)

Getter for maxX

Arguments

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

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

pure module function getMaxXAtInd(this, ind) result(maxX)

Return maxX at index ind

Arguments

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

Return Value integer(kind=ik)

pure module function getMinH(this) result(minH)

Getter for minH

Arguments

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

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

pure module function getMinHAtInd(this, ind) result(minH)

Return minH at index ind

Arguments

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

Return Value integer(kind=ik)

pure module function getMaxH(this) result(maxH)

Getter for maxH

Arguments

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

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

pure module function getMaxHAtInd(this, ind) result(maxH)

Return maxH at index ind

Arguments

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

Return Value integer(kind=ik)

pure module function getLocNumX(this) result(locX)

Getter for locX

Arguments

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

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

pure module function getLocNumH(this) result(locH)

Getter for locH

Arguments

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

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

pure module function findProc(this, xInd, hInd) result(procInd)

Return partition index which contains xInd and hInd

Arguments

Type IntentOptional Attributes Name
class(Partition), intent(in) :: this
integer(kind=ik), intent(in) :: xInd
integer(kind=ik), intent(in) :: hInd

Return Value integer(kind=ik)

pure module function filterCoords(this, ind, coords, normalize) result(res)

Filters coordinate list of shape 1,: or 3,: based on partition data, leaving only those present at partition index ind. If normalize is true will shift all values in each dimension to so that the smallest value is 1

Arguments

Type IntentOptional Attributes Name
class(Partition), intent(in) :: this
integer(kind=ik), intent(in) :: ind
integer(kind=ik), intent(in), dimension(:,:) :: coords
logical, intent(in), optional :: normalize

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


Module Subroutines

module subroutine initSimplePartition(this, numProcsX, numProcsH, numX, numH)

Partition initialization routine - assuming even distributions in x and h directions

Arguments

Type IntentOptional Attributes Name
class(Partition), intent(inout) :: this
integer(kind=ik), intent(in) :: numProcsX

Number of processes in x direction

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

Number of processes in h direction

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

Total number of x grid points

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

Total number of h grid points

pure module subroutine initPartition(this, minX, maxX, minH, maxH)

Partition initialization routine - general

Arguments

Type IntentOptional Attributes Name
class(Partition), intent(inout) :: this
integer(kind=ik), intent(in), dimension(:) :: minX

First x-index in each partition

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

Last x-index in each partition

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

First h-index in each partition

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

Last x-index in each partition