Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(site) | :: | this | ||||
integer, | intent(in) | :: | n_neighbors |
subroutine allocate_neighbors(this, n_neighbors)
class(site) :: this
integer, intent(in) :: n_neighbors
! the procedure bound routine already checks if neighbors is
! allocated.
call this%deallocate_neighbors()
allocate(this%neighbors(n_neighbors))
end subroutine allocate_neighbors