ky_type Derived Type

type, private :: ky_type

This is the next level up of data and represents the ky type. A ky block consists of a number of supercells


Contents

Source Code


Components

Type Visibility Attributes Name Initial
type(supercell_type), public, dimension(:), allocatable :: supercells

These are the supercells

integer, public :: nsupercell
logical, public :: is_local

Does this supercell have any data on this proc?

logical, public :: is_empty

Have we got any data for this supercell on this proc?

logical, public :: is_all_local

Is all of this supercells data on this proc?

logical, public :: initdone

Have we finished initialising this block?

type(comm_type), public :: ky_sub_all

Sub communicator involving all processors with this ky

type(comm_type), public :: parent_sub

Sub communicator involving all processors in parent

integer, public :: ik_ind

Type-Bound Procedures

procedure, private, :: deallocate => ky_deallocate

  • private subroutine ky_deallocate(self)

    Deallocate storage space

    Arguments

    Type IntentOptional Attributes Name
    class(ky_type), intent(inout) :: self

procedure, private, :: allocate => ky_allocate

  • private subroutine ky_allocate(self)

    Allocate storage space

    Arguments

    Type IntentOptional Attributes Name
    class(ky_type), intent(inout) :: self

procedure, private, :: init => ky_init

  • private subroutine ky_init(self, ik, itmins, nsupercell, nfield, nbound)

    Setup properties of ky_type instance

    Arguments

    Type IntentOptional Attributes Name
    class(ky_type), intent(inout) :: self
    integer, intent(in) :: ik
    integer, intent(in), dimension(:) :: itmins
    integer, intent(in) :: nsupercell
    integer, intent(in) :: nfield
    integer, intent(inout) :: nbound

procedure, private, :: debug_print => ky_debug_print

  • private subroutine ky_debug_print(self)

    Debug printing

    Arguments

    Type IntentOptional Attributes Name
    class(ky_type), intent(in) :: self

procedure, private, :: get_field_update => ky_get_field_update

  • private subroutine ky_get_field_update(self, fq, fqa, fqp)

    Get the field update for this ik

    Arguments

    Type IntentOptional Attributes Name
    class(ky_type), intent(inout) :: self
    complex, intent(in), dimension(:,:) :: fq
    complex, intent(in), dimension(:,:) :: fqa
    complex, intent(in), dimension(:,:) :: fqp

procedure, private, :: reset => ky_reset

  • private subroutine ky_reset(self)

    A routine to reset the object

    Arguments

    Type IntentOptional Attributes Name
    class(ky_type), intent(inout) :: self

procedure, private, :: set_locality => ky_set_locality

  • private subroutine ky_set_locality(self)

    Set the locality of each object

    Arguments

    Type IntentOptional Attributes Name
    class(ky_type), intent(inout) :: self

procedure, private, :: is_from_it => ky_is_from_it

  • private function ky_is_from_it(self, it)

    Given it say what the supercell id is

    Arguments

    Type IntentOptional Attributes Name
    class(ky_type), intent(inout) :: self
    integer, intent(in) :: it

    Return Value integer

procedure, private, :: store_fq => ky_store_fq

  • private subroutine ky_store_fq(self, fq, fqa, fqp, ifl_in, it_in, ig_in)

    Store the field equation at row level

    Arguments

    Type IntentOptional Attributes Name
    class(ky_type), intent(inout) :: self
    complex, intent(in), dimension(:,:,:) :: fq
    complex, intent(in), dimension(:,:,:) :: fqa
    complex, intent(in), dimension(:,:,:) :: fqp
    integer, intent(in) :: ifl_in
    integer, intent(in) :: it_in
    integer, intent(in) :: ig_in

procedure, private, :: prepare => ky_prepare

  • private subroutine ky_prepare(self, prepare_type)

    Prepare the field matrix for calculating field updates

    Arguments

    Type IntentOptional Attributes Name
    class(ky_type), intent(inout) :: self
    integer, intent(in) :: prepare_type

procedure, private, :: make_subcom_1 => ky_make_subcom_1

  • private subroutine ky_make_subcom_1(self)

    Create the primary subcommunicators

    Arguments

    Type IntentOptional Attributes Name
    class(ky_type), intent(inout) :: self

procedure, private, :: make_subcom_2 => ky_make_subcom_2

  • private subroutine ky_make_subcom_2(self)

    Create the secondary subcommunicators

    Arguments

    Type IntentOptional Attributes Name
    class(ky_type), intent(inout) :: self

Source Code

  type, private :: ky_type
     type(supercell_type), dimension(:), allocatable :: supercells !< These are the supercells
     integer :: nsupercell
     logical :: is_local !< Does this supercell have any data on this proc?
     logical :: is_empty !< Have we got any data for this supercell on this proc?
     logical :: is_all_local !< Is all of this supercells data on this proc?
     logical :: initdone !< Have we finished initialising this block?
     type(comm_type) :: ky_sub_all !< Sub communicator involving all processors with this ky
     type(comm_type) :: parent_sub !< Sub communicator involving all processors in parent
     !Cell and parent properties. Mostly for debug printing.
     integer :: ik_ind
   contains
     private
     procedure :: deallocate => ky_deallocate
     procedure :: allocate => ky_allocate
     procedure :: init => ky_init
     procedure :: debug_print => ky_debug_print
     procedure :: get_field_update => ky_get_field_update
     procedure :: reset => ky_reset
     procedure :: set_locality => ky_set_locality
     procedure :: is_from_it => ky_is_from_it
     procedure :: store_fq => ky_store_fq
     procedure :: prepare => ky_prepare
     procedure :: make_subcom_1 => ky_make_subcom_1
     procedure :: make_subcom_2 => ky_make_subcom_2
  end type ky_type