calc_total_links Function

private function calc_total_links(this) result(total_links)

Type Bound

lattice

Arguments

Type IntentOptional Attributes Name
class(lattice) :: this

Return Value integer


Source Code

    function calc_total_links(this) result(total_links)
        class(lattice) :: this
        integer :: ind, total_links

        total_links = 0
        do ind = 1, this%get_nsites()
            total_links = total_links + this%get_num_neighbors(ind)
        end do

        total_links = total_links / 2
    end function calc_total_links