subroutine init_sites_star(this)
! create the lattice structure of the star geometry..
! with one special pivot site with index 1, which is connected
! to all the other sites and the other sites are just connected to
! the pivot site!
class(star) :: this
character(*), parameter :: this_routine = "init_sites_star"
integer :: i
if (this%get_nsites() <= 0) then
call stop_all(this_routine, &
"something went wrong: negative or 0 number of sites!")
else if (this%get_nsites() == 1) then
this%sites(1) = site(ind=1, n_neighbors=0, neighbors=[integer ::])
else
! first to the special pivot site in the middle of the star
this%sites(1) = site(ind=1, n_neighbors=this%get_nconnect_max(), &
neighbors=[(i, i=2, this%get_nsites())])
! and all the others are just connected to the pivot
do i = 2, this%get_nsites()
this%sites(i) = site(ind=i, n_neighbors=1, neighbors=[1])
end do
end if
end subroutine init_sites_star