kMat_t Derived Type

type, public :: kMat_t


Contents

Source Code


Components

Type Visibility Attributes Name Initial
integer(kind=MPIArg), private :: shm_win
real(kind=dp), private, pointer :: kMat_p(:)
integer(kind=int64), private :: kMatSize

Type-Bound Procedures

procedure, public :: readKMatFromFile

  • public subroutine readKMatFromFile(this, filename)

    Arguments

    Type IntentOptional Attributes Name
    class(kMat_t) :: this
    character(len=*) :: filename

procedure, public :: setupKMat

  • public subroutine setupKMat(this)

    Arguments

    Type IntentOptional Attributes Name
    class(kMat_t) :: this

procedure, public :: freeMemory

  • public subroutine freeMemory(this)

    Arguments

    Type IntentOptional Attributes Name
    class(kMat_t) :: this

procedure, public :: directElement

  • public function directElement(this, i, j, k, l) result(matel)

    Arguments

    Type IntentOptional Attributes Name
    class(kMat_t) :: this
    integer, intent(in) :: i
    integer, intent(in) :: j
    integer, intent(in) :: k
    integer, intent(in) :: l

    Return Value real(kind=dp)

procedure, public :: exchElement

  • public function exchElement(this, i, j, k, l) result(matel)

    Arguments

    Type IntentOptional Attributes Name
    class(kMat_t) :: this
    integer, intent(in) :: i
    integer, intent(in) :: j
    integer, intent(in) :: k
    integer, intent(in) :: l

    Return Value real(kind=dp)

procedure, public :: elementAccess

  • public function elementAccess(this, index) result(kMatel)

    Arguments

    Type IntentOptional Attributes Name
    class(kMat_t) :: this
    integer(kind=int64), intent(in) :: index

    Return Value real(kind=dp)

Source Code

    type :: kMat_t
        private
        ! mpi shared memory window
        integer(MPIArg) :: shm_win
        ! pointer to the allocated array
        real(dp), pointer :: kMat_p(:)
        ! size of the array
        integer(int64) :: kMatSize

        ! member functions
    contains
        ! initialization routines
        procedure, public :: readKMatFromFile
        procedure, public :: setupKMat
        ! finalization routine (should be a destructor)
        procedure, public :: freeMemory
        ! exchange/direct matrix elements
        procedure, public :: directElement
        procedure, public :: exchElement

        ! getter for elements of kMat_p
        procedure, public :: elementAccess
    end type kMat_t