map_type Derived Type

type, public :: map_type

map for overlapping atoms, represents many-to-one relation


Contents

Source Code


Components

TypeVisibilityAttributesNameInitial
integer, public :: id

id of the atom in the code, which should handle it

integer, public, dimension(:), allocatable:: codes

ids of codes in which this atom is present (excluding the current one)

integer, public, dimension(:), allocatable:: atoms

atom ids of this atom in other codes


Type-Bound Procedures

procedure, public :: init => init_map

  • private pure subroutine init_map(this, id, codes, atoms)

    Arguments

    TypeIntentOptionalAttributesName
    class(map_type), intent(inout) :: this
    integer, intent(in) :: id
    integer, intent(in), dimension(:):: codes
    integer, intent(in), dimension(:):: atoms

procedure, public :: add_entry => add_map_entry

  • private subroutine add_map_entry(this, code_id, atom_id)

    add an overlap entry to the map

    Arguments

    TypeIntentOptionalAttributesName
    class(map_type), intent(inout) :: this
    integer, intent(in) :: code_id

    id of the code, treating the overlapped atom

    integer, intent(in) :: atom_id

    id of an overlapped atom within its treating code

procedure, private :: copy => copy_map

  • private subroutine copy_map(dest, source)

    add an overlap entry to the map

    Arguments

    TypeIntentOptionalAttributesName
    class(map_type), intent(out) :: dest
    class(map_type), intent(in) :: source

generic, public :: assignment(=) => copy

  • private subroutine copy_map(dest, source)

    add an overlap entry to the map

    Arguments

    TypeIntentOptionalAttributesName
    class(map_type), intent(out) :: dest
    class(map_type), intent(in) :: source

Source Code

    type :: map_type
        private
        !> id of the atom in the code, which should handle it
        integer, public :: id
        !> ids of codes in which this atom is present
        !> (excluding the current one)
        integer, dimension(:), allocatable, public :: codes
        !> atom ids of this atom in other codes
        integer, dimension(:), allocatable, public :: atoms
    contains
        private
        procedure, public :: init => init_map
        procedure, public :: add_entry => add_map_entry
        procedure :: copy=>copy_map
        generic, public :: assignment(=) => copy
    end type map_type