get_site_index Function

private function get_site_index(this, ind)

Type Bound

lattice

Arguments

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

Return Value integer


Contents

Source Code


Source Code

    integer function get_site_index(this, ind)
        ! for now.. since i have not checked how efficient this whole
        ! data-structure is to it in the nicest, safest way.. until i profile!
        class(lattice) :: this
        integer, intent(in) :: ind
#ifdef DEBUG_
        character(*), parameter :: this_routine = "get_site_index"
#endif

        ASSERT(ind <= this%get_nsites())
        ASSERT(allocated(this%sites))

        get_site_index = this%sites(ind)%get_index()

    end function get_site_index