grid_class Module

Houses Grid object responsible for storing spatial, velocity, and harmonic grid vertices


Used by


Interfaces

interface

  • private pure module function getXGrid(this) result(x)

    Getter for xGrid

    Arguments

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

    Return Value real(kind=rk), allocatable, dimension(:)

interface

  • private pure module function getVGrid(this) result(v)

    Getter for vGrid

    Arguments

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

    Return Value real(kind=rk), allocatable, dimension(:)

interface

  • private pure module function getMaxL(this) result(maxL)

    Getter for maxL

    Arguments

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

    Return Value integer(kind=ik)

interface

  • private pure module function getMaxM(this) result(maxM)

    Getter for maxM

    Arguments

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

    Return Value integer(kind=ik)

interface

  • private pure module function getNumH(this) result(numH)

    Return total number of resolved harmonic on grid

    Arguments

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

    Return Value integer(kind=ik)

interface

  • private pure module function getNumX(this) result(numX)

    Return number of x points on grid

    Arguments

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

    Return Value integer(kind=ik)

interface

  • private pure module function getNumV(this) result(numV)

    Return number of v points on grid

    Arguments

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

    Return Value integer(kind=ik)

interface

  • private pure module function getLGrid(this) result(l)

    Getter for lGrid

    Arguments

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

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

interface

  • private pure module function getMGrid(this) result(m)

    Getter for mGrid

    Arguments

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

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

interface

  • private pure module function getHarmonicIm(this) result(im)

    Getter for imaginaryHarmonic

    Arguments

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

    Return Value logical, allocatable, dimension(:)

interface

  • private pure module function getH(this, l, m, im) result(h)

    Return index of harmonic l,m, (if im=true returns the imaginary component)

    Arguments

    Type IntentOptional Attributes Name
    class(Grid), intent(in) :: this
    integer(kind=ik), intent(in) :: l
    integer(kind=ik), intent(in) :: m
    logical, intent(in) :: im

    Return Value integer(kind=ik)

interface

  • private pure module function getL(this, ind) result(l)

    Return l number for given harmonic index

    Arguments

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

    Return Value integer(kind=ik)

interface

  • private pure module function getM(this, ind) result(m)

    Return m number for given harmonic index

    Arguments

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

    Return Value integer(kind=ik)

interface

  • private pure module function isImaginary(this, ind) result(im)

    Return true if harmonic with given index is imaginary

    Arguments

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

    Return Value logical

interface

  • private pure module subroutine initGrid(this, x, v, maxL, maxM)

    Grid initialization routine

    Arguments

    Type IntentOptional Attributes Name
    class(Grid), intent(inout) :: this
    real(kind=rk), intent(in), dimension(:) :: x

    Positions of x-grid cell centres

    real(kind=rk), intent(in), dimension(:) :: v

    Positions of v-grid cell centres

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

    Highest resolved l-harmonic

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

    Highest resolved m-harmonic


Derived Types

type, public, extends(Object) ::  Grid

Grid object storing cell positions of x and v grid, as well as Legendre harmonic data of the grid

Components

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

True only if user explicitly sets it to true

real(kind=rk), private, allocatable, dimension(:) :: xGrid

Positions of x-grid cell centres

real(kind=rk), private, allocatable, dimension(:) :: vGrid

Positions of v-grid cell centres

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

l-numbers of each resolved harmonic

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

m-numbers of each resolved harmonic

logical, private, allocatable, dimension(:) :: imaginaryHarmonic

True if resolved harmonic is imaginary

integer(kind=ik), private :: maxL

Highest l-number resolved on grid

integer(kind=ik), private :: maxM

Highest m-number resolved on grid

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: getXGrid
procedure, public :: getVGrid
procedure, public :: getMaxL
procedure, public :: getMaxM
procedure, public :: getNumX
procedure, public :: getNumV
procedure, public :: getNumH
procedure, public :: getLGrid
procedure, public :: getMGrid
procedure, public :: getHarmonicIm
procedure, public :: getH
procedure, public :: getL
procedure, public :: getM
procedure, public :: isImaginary
procedure, public :: init => initGrid