partition_class Module

Houses Partition object responsible for decomposing the x-h domain


Used by


Interfaces

interface

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

interface

  • private 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)

interface

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

interface

  • private 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)

interface

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

interface

  • private 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)

interface

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

interface

  • private 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)

interface

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

interface

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

interface

  • private 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)

interface

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

    Filters coordinate list of shape 1,: or 3,: based on partition data. 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

interface

  • private 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

interface

  • private 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


Derived Types

type, public, extends(Object) ::  Partition

Object responsible for storing the x-h domain decomposition

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

First x-index in each partition

integer(kind=ik), private, allocatable, dimension(:) :: maxX

Last x-index in each partition

integer(kind=ik), private, allocatable, dimension(:) :: minH

First h-index in each partition

integer(kind=ik), private, allocatable, dimension(:) :: maxH

Last h-index in each partition

integer(kind=ik), private, allocatable, dimension(:) :: locX

Number of x-grid points for each partition

integer(kind=ik), private, allocatable, dimension(:) :: locH

Number of h-grid points for each partition

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: getMinX
procedure, public :: getMinXAtInd
procedure, public :: getMinH
procedure, public :: getMinHAtInd
procedure, public :: getMaxX
procedure, public :: getMaxXAtInd
procedure, public :: getMaxH
procedure, public :: getMaxHAtInd
procedure, public :: getLocNumX
procedure, public :: getLocNumH
procedure, public :: findProc
procedure, public :: filterCoords
procedure, public :: initSimplePartition
procedure, public :: init => initPartition