get_num_neighbors_lattice Function

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

Type Bound

lattice

Arguments

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

Return Value integer


Contents


Source Code

    function get_num_neighbors_lattice(this, ind) result(n_neighbors)
        class(lattice) :: this
        integer, intent(in) :: ind
        integer :: n_neighbors
#ifdef DEBUG_
        character(*), parameter :: this_routine = "get_num_neighbors_lattice"
#endif

        ! make all assert on a seperate line, so we exactly know what is
        ! going wrong..
        ASSERT(ind <= this%get_nsites())
        ASSERT(ind > 0)
        ASSERT(allocated(this%sites))
        ASSERT(allocated(this%sites(ind)%neighbors))

        n_neighbors = this%sites(ind)%get_num_neighbors()

    end function get_num_neighbors_lattice