rectangle Derived Type

type, private, extends(lattice) :: rectangle


Contents

Source Code


Components

Type Visibility Attributes Name Initial
integer, public, allocatable :: k_to_sym(:,:,:)
integer, public, allocatable :: sym_to_k(:,:)
integer, public, allocatable :: mult_table(:,:)
integer, public, allocatable :: inv_table(:)
integer, private :: length(2) = -1

Type-Bound Procedures

procedure, public :: get_nsites

  • private elemental function get_nsites(this)

    Arguments

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

    Return Value integer

procedure, public :: get_ndim

  • private elemental function get_ndim(this)

    Arguments

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

    Return Value integer

procedure, public :: get_nconnect_max

  • private function get_nconnect_max(this)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this

    Return Value integer

procedure, public :: is_periodic_x

  • private function is_periodic_x(this)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this

    Return Value logical

procedure, public :: is_periodic_y

  • private function is_periodic_y(this)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this

    Return Value logical

procedure, public :: get_site_index

  • private function get_site_index(this, ind)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this
    integer, intent(in) :: ind

    Return Value integer

procedure, public :: get_neighbors => get_neighbors_lattice

  • private function get_neighbors_lattice(this, ind) result(neighbors)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this
    integer, intent(in) :: ind

    Return Value integer, allocatable, (:)

procedure, public :: get_num_neighbors => get_num_neighbors_lattice

  • private function get_num_neighbors_lattice(this, ind) result(n_neighbors)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this
    integer, intent(in) :: ind

    Return Value integer

procedure, public :: get_spinorb_neighbors => get_spinorb_neighbors_lat

  • private function get_spinorb_neighbors_lat(this, spinorb) result(neighbors)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this
    integer, intent(in) :: spinorb

    Return Value integer, allocatable, (:)

procedure, public :: is_k_space

  • private function is_k_space(this)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this

    Return Value logical

procedure, public :: print_lat

  • private subroutine print_lat(this)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this

procedure, public :: add_k_vec

  • private pure function add_k_vec(this, k_1, k_2) result(k_out)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice), intent(in) :: this
    integer, intent(in) :: k_1(3)
    integer, intent(in) :: k_2(3)

    Return Value integer, (3)

procedure, public :: inv_k_vec

  • private function inv_k_vec(this, k) result(k_inv)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this
    integer, intent(in) :: k(3)

    Return Value integer, (3)

procedure, public :: get_sym

  • private pure function get_sym(this, orb) result(sym)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice), intent(in) :: this
    integer, intent(in) :: orb

    Return Value integer

procedure, public :: subtract_k_vec

  • private function subtract_k_vec(this, k_1, k_2) result(k_out)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this
    integer, intent(in) :: k_1(3)
    integer, intent(in) :: k_2(3)

    Return Value integer, (3)

procedure, public :: get_sym_from_k

  • private pure function get_sym_from_k(this, k) result(sym)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice), intent(in) :: this
    integer, intent(in) :: k(3)

    Return Value integer

procedure, public :: set_sym

  • private subroutine set_sym(this, orb, sym)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this
    integer, intent(in) :: orb
    integer, intent(in) :: sym

procedure, public :: get_name

  • private function get_name(this) result(lattice_name)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this

    Return Value character(len=NAME_LEN)

procedure, public :: dispersion_rel_orb

  • private function dispersion_rel_orb(this, orb) result(disp)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this
    integer, intent(in) :: orb

    Return Value real(kind=dp)

procedure, public :: dispersion_rel_spin_orb

  • private function dispersion_rel_spin_orb(this, orb) result(disp)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this
    integer, intent(in) :: orb

    Return Value real(kind=dp)

procedure, public :: get_k_vec

  • private pure function get_k_vec(this, orb) result(k_vec)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice), intent(in) :: this
    integer, intent(in) :: orb

    Return Value integer, (3)

procedure, public :: get_r_vec

  • private function get_r_vec(this, orb) result(r_vec)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this
    integer, intent(in) :: orb

    Return Value integer, (3)

procedure, public :: round_sym

  • private elemental function round_sym(this, sym_in) result(sym_out)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice), intent(in) :: this
    type(BasisFN), intent(in) :: sym_in

    Return Value type(BasisFN)

procedure, public :: map_k_vec

  • private pure function map_k_vec(this, k_in) result(k_out)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice), intent(in) :: this
    integer, intent(in) :: k_in(3)

    Return Value integer, (3)

procedure, public :: get_orb_from_k_vec

  • private function get_orb_from_k_vec(this, k_in, spin) result(orb)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this
    integer, intent(in) :: k_in(3)
    integer, intent(in), optional :: spin

    Return Value integer

procedure, public :: init_hop_cache_bounds

  • private subroutine init_hop_cache_bounds(this, r_min, r_max)

    Arguments

    Type IntentOptional Attributes Name
    class(lattice) :: this
    integer, intent(out), optional :: r_min(3)
    integer, intent(out), optional :: r_max(3)

procedure, private, :: init_basis_vecs_rect_base

  • private subroutine init_basis_vecs_rect_base(this, l)

    Base function for setting up a the basis vector array for rectangular lattices (extracted from the previous init_basis_vecs_rect) @param[in] l Maximal number of unit vectors to be combined into a basis vector

    Arguments

    Type IntentOptional Attributes Name
    class(rectangle), intent(inout) :: this
    integer, intent(in) :: l

procedure, public :: get_length => get_length_rect

  • private pure function get_length_rect(this, dimen)

    Arguments

    Type IntentOptional Attributes Name
    class(rectangle), intent(in) :: this
    integer, intent(in), optional :: dimen

    Return Value integer

procedure, public :: is_periodic => is_periodic_rect

  • private pure function is_periodic_rect(this, dimen)

    Arguments

    Type IntentOptional Attributes Name
    class(rectangle), intent(in) :: this
    integer, intent(in), optional :: dimen

    Return Value logical

procedure, public :: dispersion_rel => dispersion_rel_rect

  • private function dispersion_rel_rect(this, k_vec) result(disp)

    Arguments

    Type IntentOptional Attributes Name
    class(rectangle) :: this
    integer, intent(in) :: k_vec(3)

    Return Value real(kind=dp)

procedure, private, :: set_length => set_length_rect

  • private subroutine set_length_rect(this, length_x, length_y, length_z)

    Arguments

    Type IntentOptional Attributes Name
    class(rectangle) :: this
    integer, intent(in) :: length_x
    integer, intent(in) :: length_y
    integer, intent(in), optional :: length_z

procedure, private, :: calc_nsites => calc_nsites_rect

  • private function calc_nsites_rect(this, length_x, length_y, length_z) result(n_sites)

    Arguments

    Type IntentOptional Attributes Name
    class(rectangle) :: this
    integer, intent(in) :: length_x
    integer, intent(in) :: length_y
    integer, intent(in), optional :: length_z

    Return Value integer

procedure, private, :: initialize_sites => init_sites_rect

procedure, private, :: init_basis_vecs => init_basis_vecs_rect

procedure, public :: dot_prod => dot_prod_rect

  • private function dot_prod_rect(this, k_vec, r_vec) result(dot)

    Arguments

    Type IntentOptional Attributes Name
    class(rectangle) :: this
    integer, intent(in) :: k_vec(3)
    integer, intent(in) :: r_vec(3)

    Return Value real(kind=dp)

Source Code

    type, extends(lattice) :: rectangle
        private

        ! how to encode the length?
        integer :: length(2) = -1
    contains
        private

        procedure :: init_basis_vecs_rect_base

        procedure, public :: get_length => get_length_rect
        procedure, public :: is_periodic => is_periodic_rect
        procedure, public :: dispersion_rel => dispersion_rel_rect

        procedure :: set_length => set_length_rect
        procedure :: calc_nsites => calc_nsites_rect
        procedure :: initialize_sites => init_sites_rect
        procedure :: init_basis_vecs => init_basis_vecs_rect
        procedure, public :: dot_prod => dot_prod_rect

    end type rectangle